thephpleague / uri-schemes

Collection of URI Immutable Value Objects
https://uri.thephpleague.com/schemes/
MIT License
216 stars 7 forks source link

PSR-4 non-conformance warnings about imminent breakage to happen with Composer 2.0 #19

Open rulatir opened 4 years ago

rulatir commented 4 years ago

Issue summary

I am receiving deprecation notices concerning this package's non-conformance to PSR-4 during composer dump-autoload of a project that requires this package.

System informations

Information Description
League\Uri\Schemes version 1.2.1
PHP/HHVM version 7.4.x
OS Platform Arch Linux

Standalone code, or other way to reproduce the problem

composer dump-autoload -a in any project that requries league/uri-schemes

Expected result

No deprecation notices.

Actual result

Deprecation Notice: Class League\Uri\Schemes\AbstractUri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class League\Uri\Schemes\Data located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class League\Uri\Schemes\File located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class League\Uri\Schemes\Ftp located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class League\Uri\Schemes\Http located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class League\Uri\Schemes\Uri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class League\Uri\Schemes\UriException located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class League\Uri\Schemes\Ws located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
nyamsprod commented 4 years ago

@rulatir this issue originated from a "hack" use to deprecate the League\Uri\Schemes\ namespace from the package during the 1.x cycle.

I'll see if this can be easily fix it but if you can provide a PR to resolve the issue I will also review and add in a fix release.

Keep in mind that this package is no longer maintained (use league/uri v6 instead) but I may make an exception for this particular issue as this does not change the code (resolve or fix issue as this is no longer possible since this release is no longer maintained).