Flowpack.ElasticSearch icon indicating copy to clipboard operation
Flowpack.ElasticSearch copied to clipboard

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

Open booooza opened this issue 4 years ago • 1 comments

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

booooza avatar Jan 27 '21 18:01 booooza

Needs a breaking change moving the namespace around.

kitsunet avatar Jan 25 '23 12:01 kitsunet