Skip to content

Do not block mongodb/mongodb versions that support PHP < 8.1 - #810

Merged
ondrejmirtes merged 1 commit into
2.1.xfrom
allow-mongodb-advisories-php-7
Nov 1, 2026
Merged

ondrejmirtes merged 1 commit into
2.1.xfrom
allow-mongodb-advisories-php-7

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

Composer 2.9 blocks package versions with security advisories during composer install/update. CVE-2026-81525 and CVE-2026-88023 cover every mongodb/mongodb release up to 1.21.4. The fixed releases (1.21.5+) require PHP ^8.1, so doctrine/mongodb-odm can't be installed on PHP 7.4 and 8.0:

- doctrine/mongodb-odm[2.5.0, ..., 2.5.5] require mongodb/mongodb ^1.10.0 -> satisfiable by mongodb/mongodb[1.21.5, v1.21.x-dev].
- mongodb/mongodb[1.21.5, ..., v1.21.x-dev] require php ^8.1 -> your php version (7.4.33) does not satisfy that requirement.

This breaks every PHP 7.4 and 8.0 job here and the phpstan-doctrine extension tests in phpstan-src (e.g. https://github.com/phpstan/phpstan-src/actions/runs/41318224514/job/124885326539).

mongodb/mongodb is only a dev dependency for the test suite. This change ignores the two advisories for blocking only (apply: block), so composer audit still reports them. With a simulated PHP 7.4 and 8.0 platform, Composer now resolves mongodb/mongodb again for both highest and lowest dependencies.

The PHP 8.1+ make phpstan failure in phpstan-src (NameNode::$name) is a separate problem caused by phpdoc-parser 2.4. #808 fixes it.

Composer 2.9 blocks package versions with security advisories when
resolving dependencies. CVE-2026-81525 and CVE-2026-88023 affect every
mongodb/mongodb release that supports PHP < 8.1 (up to 1.20.0), so
doctrine/mongodb-odm cannot be installed on PHP 7.4 and 8.0 and
composer install/update fails there.

mongodb/mongodb is only a dev dependency used by the test suite, so
ignore the two advisories for blocking only; composer audit still
reports them.

Amp-Thread-ID: https://ampcode.com/threads/T-01a197ab-5c2e-71e3-9f7a-7dfb82a80328
@ondrejmirtes
ondrejmirtes merged commit f6219f6 into 2.1.x Nov 1, 2026
42 of 50 checks passed
@ondrejmirtes
ondrejmirtes deleted the allow-mongodb-advisories-php-7 branch November 1, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant