Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer autoload deprecation warnings on install #1924

Closed
dgw opened this issue Feb 28, 2020 · 4 comments
Closed

composer autoload deprecation warnings on install #1924

dgw opened this issue Feb 28, 2020 · 4 comments

Comments

@dgw
Copy link

dgw commented Feb 28, 2020

Describe the bug
composer install complains about non-compliant classes ("Deprecation Notice: Class insert\path\here does not comply with psr-4 autoloading standard").

Steps To Reproduce
Steps to reproduce the behavior:

  1. Clone v0.28.2
  2. Run composer install

Expected behavior
I expect not to see a flood of deprecation warnings during installation.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.28.2
  • PHP Version: 7.2.27
  • Composer Version: 1.9.3
  • Hosting Method (Nginx/Apache/Docker): n/a (issue occurs outside webapp)

Additional context
Full list of deprecation warnings:

Class Tests\ConfigTest located in ./tests/Unit/ConfigTest.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:185
Class Tests\UrlTest located in ./tests/Unit/UrlTest.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:185
Class Tests\SocialAuthTest located in ./tests/Auth/SocialAuthTest.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:185
Class Tests\LdapTest located in ./tests/Auth/LdapTest.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:185
Class Tests\UserInviteTest located in ./tests/Auth/UserInviteTest.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:185
Class Tests\Saml2Test located in ./tests/Auth/Saml2Test.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:185
Class Tests\AuthTest located in ./tests/Auth/AuthTest.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:185
Class Tests\AttachmentTest located in ./tests/Uploads/AttachmentTest.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:185
Class Tests\RestrictionsTest located in ./tests/Permissions/RestrictionsTest.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:185
Class Tests\RolesTest located in ./tests/Permissions/RolesTest.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:185
Class Tests\UserProfileTest located in ./tests/User/UserProfileTest.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:185
Class Tests\UserPreferencesTest located in ./tests/User/UserPreferencesTest.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:185
Class Tests\ApiDocsTest located in ./tests/Api/ApiDocsTest.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:185
Class Tests\BooksApiTest located in ./tests/Api/BooksApiTest.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:185
Class Tests\ApiAuthTest located in ./tests/Api/ApiAuthTest.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:185
Class Tests\ApiConfigTest located in ./tests/Api/ApiConfigTest.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:185
Class Tests\ApiListingTest located in ./tests/Api/ApiListingTest.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:185
Class Tests\ExportTest located in ./tests/Entity/ExportTest.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:185
Class Tests\CommentSettingTest located in ./tests/Entity/CommentSettingTest.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:185
Class Tests\SortTest located in ./tests/Entity/SortTest.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:185
Class Tests\CommentTest located in ./tests/Entity/CommentTest.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:185
Class Tests\EntitySearchTest located in ./tests/Entity/EntitySearchTest.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:185
Class Tests\MarkdownTest located in ./tests/Entity/MarkdownTest.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:185
Class Tests\PageDraftTest located in ./tests/Entity/PageDraftTest.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:185
Class Tests\PageContentTest located in ./tests/Entity/PageContentTest.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:185
Class Tests\TagTest located in ./tests/Entity/TagTest.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:185
Class Tests\EntityTest located in ./tests/Entity/EntityTest.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:185
Class Tests\BookShelfTest located in ./tests/Entity/BookShelfTest.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:185

It appears the only classes affected are in the Tests namespace, so this probably won't affect actually running BookStack in production.

@dgw dgw changed the title composer warnings on install related to autoload composer autoload deprecation warnings on install Feb 28, 2020
@ssddanbrown ssddanbrown added this to the v0.29.0 milestone Mar 2, 2020
@ssddanbrown
Copy link
Member

You sure you're on composer 1.9.3? I had to use the unreleased 1.10.0-RC build to get these warnings to show.

Either way, Thanks for reporting! Have assigned to be addressed for the next feature release.

@dgw
Copy link
Author

dgw commented Mar 2, 2020

We should be on composer 1.9.3, since the PHP setup action we use (shivammathur/setup-php) "always" uses the latest version, per its documentation. The last workflow run log shows composer/composer 1.9.2 being installed during the composer install step, though. Not sure if related.

@ssddanbrown
Copy link
Member

@dgw Ah, okay, thanks. Looks like that action may have been installing pre-releases up until two days ago:
shivammathur/setup-php#192

@dgw
Copy link
Author

dgw commented Mar 2, 2020

@ssddanbrown Confirmed the version in install log is irrelevant. Forcing a new workflow run with the latest setup-php action (the repo needed a readme anyway 😉), I don't see the deprecation warnings from composer any more. Apologies for the wrong version info; next time I'll add a "Check composer version" step to the job before reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants