Closed duskwuff closed 5 years ago
Thank you for your feedback. I'm trying to reproduce the error to find a possible solution.
A possible temporary workaround is to use the notPath
method to exclude the problematic package/file. I'll keep you updated.
To reproduce:
composer require symfony/polyfill-php73
composer require kcs/class-finder
php <<EOF
<?php
require("vendor/autoload.php");
iterator_to_array(new Kcs\ClassFinder\Finder\ComposerFinder);
EOF
@duskwuff I've just pushed a modification of the ComposerFinder
which now should skip all the files already processed by composer classmap.
Unfortunately, if the file is not in classmap definitions and is present inside a psr0/psr4 namespace a filter MUST be applied to avoid fatal errors or a non-including finder should be used (like PhpDocumentorFinder
).
Can you please test the master branch and tell me if this problem is fixed?
That's solved the initial issue I ran into, but I'm still seeing some weird, intermittent issues while iterating over a variety of other Composer modules, including:
Fatal error: Trait 'Symfony\Component\VarDumper\Test\VarDumperTestTrait' not found in …/vendor/symfony/var-exporter/Tests/VarExporterTest.php
PHP Fatal error: Interface 'Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface' not found in …/vendor/symfony/translation/DataCollectorTranslator.php on line 23
Fatal error: Cannot redeclare Amp\coroutine() (previously declared in …/vendor/amphp/amp/lib/functions.php:21) in …/vendor/vimeo/psalm/src/Psalm/Internal/Stubs/Amp.php
Some of these may represent bugs in the upstream code. For the time being, though, I'm probably going to have to take another approach from what I was planning. :/
I like the concept of this package, but it's incompatible with some common packages like
symfony/polyfill-php73
which define classes which conflict with PHP builtin classes: