Configs
{
"require": {
"ext-mbstring": "*",
"symfony/polyfill-php84": "^1.31"
},
"require-dev": {
"shipmonk/composer-dependency-analyser": "^1.8.4"
},
"autoload": {
"classmap": [
"src/MyClass.php"
]
}
}
<?php declare(strict_types = 1);
class MyClass {
public function trim(string $string): string {
return mb_trim($string);
}
}
Actual
PHP 8.4
Found 1 unused dependency!
(those are listed in composer.json, but no usage was found in scanned paths)
β’ symfony/polyfill-php84
PHP 8.3
Found 1 unused dependency!
(those are listed in composer.json, but no usage was found in scanned paths)
β’ ext-mbstring
Expected
On PHP 8.3 it should not report that ext-mbstring is unused because mb_trim is related to ext-mbstring.
Proposal
Maybe some way to tell composer-dependency-analyser about extensions and their functions, but it should be "soft" (= should not lead to report about unused symfony/polyfill-php84 on PHP 8.3).