BedrockStreaming / Statsd

PHP component easing the statsd usage
13 stars 14 forks source link

Namespace issues - Composer 2.0 Deprecation warnings #26

Closed simonberger closed 4 years ago

simonberger commented 4 years ago

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

Oliboy50 commented 4 years ago

👋 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 🙏

simonberger commented 4 years ago

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.

simonberger commented 4 years ago

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

Oliboy50 commented 4 years ago

thanks 👌 => https://github.com/M6Web/Statsd/releases/tag/v1.3.2