Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 #95

Open
booooza opened this issue Jan 27, 2021 · 1 comment

Comments

@booooza
Copy link

booooza commented Jan 27, 2021

Hello there

Just noticed while checking php update compatibility of our packages that PHPCompatibility spits out some errors regarding the use of soft reserved keyword object which seems to be prohibited from being used in namespaces. Ref. https://www.php.net/manual/en/reserved.other-reserved-words.php

FILE: Flowpack.ElasticSearch/Tests/Functional/Indexer/Object/IndexInformerTest.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Tests/Functional/Indexer/Object/ObjectIndexerTest.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/Signal/SignalEmitter.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/Signal/Doctrine/EmitterAdapter.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/Signal/EmitterAdapterInterface.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/ObjectIndexer.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 4 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/Transform/StringCastTransformer.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/Transform/TextCastTransformer.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/Transform/DateTransformer.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/Transform/TransformerInterface.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/Transform/CollectionStringCastTransformer.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/Transform/TransformerFactory.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/Transform/ObjectIdentifierTransformer.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 2 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: Flowpack.ElasticSearch/Classes/Indexer/Object/IndexInformer.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 4 | ERROR | 'object' is a soft reserved keyword as of PHP version 7.0 and a reserved keyword as of PHP version 7.2 and should not be
   |       | used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
-----------------------------------------------------------------------------------------------------------------------------------------

Cheers

@kitsunet
Copy link
Member

Needs a breaking change moving the namespace around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants