-
Notifications
You must be signed in to change notification settings - Fork 998
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
When the following is in the composer.json
file of a WordPress project that is using Composer to manage dependencies:
"require-dev": {
"wp-cli/wp-cli-bundle": "^2.4"
},
Running composer install
with Composer version 1.10.1
generates four (4) deprecation notices saying:
Deprecation Notice: Class XXX ... does not comply with psr-0 autoloading standard.
It will not autoload anymore in Composer v2.0.
This is problematic as we need to fail during CI/CD if Composer generates a deprecation notice because the error might be our code.
Describe how other contributors can replicate this bug
- Ensure you have Composer
v1.10
or later installed. - Run
composer require-dev wp-cli/wp-cli-bundle
on a project. - Run
composer install
. - See the deprecation notices in the attached screenshot.
Describe what you expect as the correct outcome
That Composer would not generate deprecation notices for WP-CLI.
Let us know what environment you are running this on
OS: Darwin 18.7.0 Darwin Kernel Version 18.7.0: Sun Dec 1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64 x86_64
Shell: /bin/bash
PHP binary: /usr/local/Cellar/php/7.3.6/bin/php
PHP version: 7.3.6
php.ini used: /usr/local/etc/php/7.3/php.ini
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /Users/mikeschinkel/Sites/wp-cl2.local/www/wp-content/mu-plugins/client-name/common
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.2.0
Provide a possible solution
Rework the class hierarchy so that it is compatible with PSR-0
. I would be happy to submit a patch but I assume that restructuring the directory hierarchy is something you'd want to do yourself.
Provide additional context/screenshots