Skip to content

fix(doctrine): drop the unused doctrine/common requirement - #8838

Merged
soyuka merged 1 commit into
api-platform:5.0from
Zegui81:fix/drop-doctrine-common
Nov 13, 2026
Merged

soyuka merged 1 commit into
api-platform:5.0from
Zegui81:fix/drop-doctrine-common

Conversation

@Zegui81

@Zegui81 Zegui81 commented Nov 11, 2026 •

Copy link
Copy Markdown
Q A
Branch? 5.0
Tickets Closes #8835
License MIT
Doc PR —

api-platform/doctrine-common requires doctrine/common (^3.2.2), which is abandoned on Packagist. Every downstream project therefore gets an abandoned-package report on composer install and a failing composer audit by default.

No class from doctrine/common (ClassLoader, CommonException, Comparable, Proxy\*, Util\*) is referenced in src/ or tests/ anymore: every Doctrine\Common\… match belongs to the ApiPlatform\Doctrine\Common\… namespace. The requirement looks like a leftover from the ClassUtils removal (#6331).

This PR drops it from the component's require and from the root require-dev. The root conflict on doctrine/common <3.2.2 is left untouched.

Component test suite on 5.0 (src/Doctrine/Common, run standalone with doctrine/common no longer installed): OK, 35 tests, 160 assertions (the 3 PHPUnit deprecations are pre-existing any() expectations in PersistProcessorTest).

Also checked downstream on a production app (API Platform 4.4.7, Doctrine ORM 3.7, PHP 8.5) with doctrine/common removed: PHPStan level 8 clean, lint:container valid, full Playwright e2e suite green (148/148).

🤖 Generated with Claude Code

@soyuka
soyuka changed the base branch from 4.4 to 5.0 November 12, 2026 10:34
@soyuka

soyuka commented Nov 12, 2026

Copy link
Copy Markdown
Member

Thanks! 4.4 only gets security fixes now so I moved this to 5.0, can you rebase on 5.0 (and update the Branch in the description)? Thanks!

doctrine/common is abandoned on Packagist, and no class from it
(ClassLoader, CommonException, Comparable, Proxy\*, Util\*) is used
by api-platform/doctrine-common or by the test suite anymore, likely
since the ClassUtils removal (api-platform#6331). Requiring it makes every
downstream project report an abandoned package on composer install
and composer audit.

Closes api-platform#8835

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Zegui81
Zegui81 force-pushed the fix/drop-doctrine-common branch from 5ffd8c5 to 8b6be9c Compare November 12, 2026 17:00
@Zegui81

Zegui81 commented Nov 12, 2026

Copy link
Copy Markdown
Author

Done, rebased on 5.0 and updated the description. The component suite still passes standalone without doctrine/common (35 tests). Thanks for the quick review!

@soyuka
soyuka merged commit 5b95001 into api-platform:5.0 Nov 13, 2026
113 of 117 checks passed
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.

2 participants