jdesrosiers / silex-cors-provider

A silex service provider that adds CORS services to silex
MIT License
78 stars 25 forks source link

Fix composer deprecation notice #43

Closed adlacruzes closed 4 years ago

adlacruzes commented 4 years ago

Hi @jdesrosiers,

composer now shows deprecation notice when a file does not comply with psr-4 autoloading standard.

The message is:

Deprecation Notice: Class JDesrosiers\Silex\Provider\Test\CorsEnableControllerTest located in ./vendor/jdesrosiers/silex-cors-provider/src/Test/CorsEnableControlerTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201

Instead of just fixing the namespace, I have moved the src/Test/ directory to tests/ so tests are not loaded when importing from composer.

PHPUnit was also failing:

Error: Class 'File_Iterator_Facade' not found in vendor/phpunit/phpunit/PHPUnit/Util/Configuration.php on line 813

due to an old PHPUnit version.

This PR:

jdesrosiers commented 4 years ago

Thanks! I'll review and will hopefully have a new version deployed by Monday.

adlacruzes commented 4 years ago

Nice, thanks!

jdesrosiers commented 4 years ago

Published as v1.6.1. Thanks for the PR!