Skip to content

feat(doctrine): state options repositoryMethod for query builder#7115

Merged
soyuka merged 1 commit into
api-platform:mainfrom
soyuka:feat/doctrine-repository-method
May 21, 2026
Merged

feat(doctrine): state options repositoryMethod for query builder#7115
soyuka merged 1 commit into
api-platform:mainfrom
soyuka:feat/doctrine-repository-method

Conversation

@soyuka
Copy link
Copy Markdown
Member

@soyuka soyuka commented Apr 29, 2025

…ding

Q A
Branch? main
Tickets na
License MIT

Follows up #7113

@stale
Copy link
Copy Markdown

stale Bot commented Jul 6, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Jul 6, 2025
@stale stale Bot closed this Jul 13, 2025
@soyuka soyuka reopened this Jul 15, 2025
@stale stale Bot removed the stale label Jul 15, 2025
@soyuka soyuka added this to the 4.3 milestone Aug 18, 2025
@soyuka soyuka force-pushed the feat/doctrine-repository-method branch from f5def52 to 1eb1e2e Compare May 21, 2026 08:13
@soyuka
Copy link
Copy Markdown
Member Author

soyuka commented May 21, 2026

Note: PHPUnit api-platform/doctrine-orm (PHP 8.4 lowest) and PHPUnit api-platform/doctrine-odm (PHP 8.4 lowest) will stay red until release.

The new repositoryMethod param lives on ApiPlatform\Doctrine\Common\State\Options::__construct, and the provider lookup goes through StateOptionsTrait::getStateOptionsRepositoryMethod() (in api-platform/state).

In --prefer-lowest mode the doctrine-orm/doctrine-odm subtrees resolve api-platform/doctrine-common and api-platform/state to the currently released 4.2.x packages, which don't have the new param/method yet — so local Orm\Options::__construct forwarding repositoryMethod: to the vendor parent fatals.

To fix: bump api-platform/doctrine-common and api-platform/state constraints in src/Doctrine/Common/composer.json, src/Doctrine/Orm/composer.json, src/Doctrine/Odm/composer.json when cutting the next release that ships these packages.

@soyuka soyuka force-pushed the feat/doctrine-repository-method branch from 1eb1e2e to d25facf Compare May 21, 2026 09:21
@soyuka soyuka changed the title feat(doctrine): state options repositoryMethod for initial query buil… feat(doctrine): state options repositoryMethod for query builder May 21, 2026
@soyuka soyuka merged commit 98dc77b into api-platform:main May 21, 2026
113 of 118 checks passed
@soyuka soyuka deleted the feat/doctrine-repository-method branch May 21, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant