Open bogdandubyk opened 1 year ago
It looks like the PHP requirements in that package are too open. For example, they claim to support PHP 8.4 and 8.9 (neither of which have been released): https://github.com/doctrine/mongodb-odm/blob/2.5.2/composer.json#L24. Getting that fixed should solve this particular problem going forward, as Composer will refuse to install packages which are not compatible with the running (or configured) PHP version.
It seems that you have already reported this problem upstream in https://github.com/doctrine/mongodb-odm/issues/2539. I think the work-around is to use a supported PHP version (which may take some experimentation given the broad claim in their composer.json
).
thank you @fredden, but still is it very hard to provide some configuration option similar to symbol-whitelist
where files that should be skipped can be lister? I'm not asking to introduce this feature right away but can imagine more cases like mine, and it's nice to have the option to ignore some file/path. Something similar implemented by unused checker https://github.com/composer-unused/composer-unused#exclude-folders-and-packages
What we could do is drop eager scanning of all vendors, relying on the autoloader only: tricky, but possibly necessary for these conditional logic blocks.
As for MongoDB ODM: are you 100% sure that you have a version installed that is compatible with your PHP version?
Marco Pivetta
@.***
On Mon, 26 Jun 2023 at 23:03, Bogdan Dubyk @.***> wrote:
thank you @fredden https://github.com/fredden, but still is it very hard to provide some configuration option similar to symbol-whitelist where files that should be skipped can be lister? I'm not asking to introduce this feature right away but can imagine more cases like mine, and it's nice to have the option to ignore some file/path. Something similar implemented by unused checker https://github.com/composer-unused/composer-unused#exclude-folders-and-packages
— Reply to this email directly, view it on GitHub https://github.com/maglnet/ComposerRequireChecker/issues/407#issuecomment-1608256826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABFVEAGY4YMGAU5LHSXFGTXNH2I7ANCNFSM6AAAAAAZUTY3VQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
The class that this project is complaining about is deprecated and exists solely for BC reasons: https://github.com/doctrine/mongodb-odm/blob/69e64e7eb51f07bcfc09bc8e7ea8329f301b44ff/lib/Doctrine/ODM/MongoDB/Aggregation/Stage/Match.php#L11-L14. Said class is not used from within the ODM and the project works perfectly fine with PHP 8.2
yes, I'm on the latest stable version which supports PHP 8.2, all works perfectly, only CI failing because the checker analyzing this deprecated file and failing.
My very simplistic endorsement here would be to make something as simple as rm vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Aggregation/Stage/GraphLookup/Match.php
in a pre-tool step :+1:
Assuming you don't actually need that file, it's probably best to even drop it from your final build artifact that goes to production, to avoid anything ever touching it :)
I have an issue with doctrine-ODM, particularly with this file https://github.com/doctrine/mongodb-odm/blob/2.6.x/lib/Doctrine/ODM/MongoDB/Aggregation/Stage/Match.php , checker failing with an error:
and it's because I'm using PHP 8.2 where
match
is a reserved word, I tried adding a file to a white list like thisbut not sure if I'm doing it correctly or if it's possible at all, but anyway issue is still there. Is there a way to handle this? In general this file is deprecated and my app is working only checker failing