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
CI: Introduce composer-unused
#7536
CI: Introduce composer-unused
#7536
Conversation
I wanted to handle <?php
declare(strict_types=1);
use ComposerUnused\ComposerUnused\Configuration\Configuration;
return static function (Configuration $config): Configuration {
$config
->setAdditionalFilesFor('composer/xdebug-handler', [
__DIR__.'/../php-cs-fixer',
])
;
return $config;
}; but it fails:
So in the end I just excluded this package. CC: @icanhazstring |
`XdebugHandler` is used in `php-cs-fixer` file, but it can't be processed properly by `composer-unused` (using custom config file): Fatal error: Uncaught Error: Call to undefined method PhpParser\Node\Expr\Closure::getParts() in dev-tools/vendor/composer-unused/symbol-parser/src/Parser/PHP/DefinedSymbolCollector.php:65
b27ea9e
to
2560178
Compare
Nice catch. Would You be so kind to create a quick issue in https://github.com/composer-unused/symbol-parser I will take a look 🙂 |
Currently AFK and 🚘, so maybe later or manage it by yourself if it's not a problem 🙂. |
Also abroad. 😅 |
Thank you @Wirone |
This tool verifies if
composer.json
contains dependencies that are not used in the code, so it's possible to find packages that can be removed.