BedrockStreaming/Statsd

Namespace issues - Composer 2.0 Deprecation warnings

Closed this issue ยท 4 comments

Since some versions composer displays deprecation messages for the tests:

Deprecation Notice: Class M6Web\Component\Statsd\tests\units\Client located in ./vendor/m6web/statsd/src/M6Web/Component/Tests/Units/Client.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in /usr/share/php/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class M6Web\Component\Statsd\tests\units\MessageEntity located in ./vendor/m6web/statsd/src/M6Web/Component/Tests/Units/MessageEntity.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in /usr/share/php/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class M6Web\Bundle\StatsdBundle\DependencyInjection\tests\units\M6WebStatsdExtension located in ./vendor/m6web/statsd-bundle/src/Tests/Units/DependencyInjection/M6WebStatsdExtension.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in /usr/share/php/Composer/Autoload/ClassMapGenerator.php:201

Additionally it would be good to exclude them in productive autoload via https://getcomposer.org/doc/04-schema.md#exclude-files-from-classmaps and include in autoload-devif needed

๐Ÿ‘‹ thanks

I think that we've never tried to migrate from composer v1 to v2 yet... so it would be great if you could open a PR on this project to show us how to do that properly ๐Ÿ™

Started a pull request.
In my first attempt I did some more changes and tried to move the tests to /tests.
But it seemed to be too much trouble to configure atoum or change the tests in this way.

@Oliboy50
The StatsdBundle fix is out. Could this be merged and tagged as well?