Repository navigation
Conversation
…ojects This change intends to announce that nobody outside Doctrine projects should use the ACMF base class for extension or for type-hinting in their own code. It should be considered an internal implementation detail of Doctrine projects and may change or go away at any time without further notice (maybe after we reached the next major version?). That also means Doctrine projects no longer need to use it as a base class for their more specific implementations. This gives us more freedom to change ACMF implementations towards doctrine/orm#12203. Empirical research done by a Claude agent reported that the provided annotations cover the use case for PHPStan, but leave a gap in Psalm that does not prevent type-hinting (only extension). <details> ``` Goal 2 — closed base, but shipped subclasses stay usable Fully achievable in PHPStan, only half achievable in Psalm. /** * @internal * @psalm-inheritors \Acme\Lib\LibConcreteSub */ abstract class LibAbstractBase { ... } - PHPStan: extends blocked, and type-hinting the abstract base itself gets blocked (property.internalClass etc.), while the shipped LibConcreteSub stays completely free to type-hint. Needs both tags — @psalm-inheritors alone doesn't block type-hints; @internal alone happens to cover both in this case. - Psalm: blocks extends fine, but there's no mechanism that discourages type-hinting the abstract base itself — tested three variants, all came back clean. That's a flat gap in Psalm, not a workaround-able one. ``` </details>
greg0ire
previously approved these changes
Nov 7, 2026
GromNaN
reviewed
Nov 7, 2026
GromNaN
reviewed
Nov 7, 2026
GromNaN
reviewed
Nov 7, 2026
Contributor
Author
|
Feedback addressed, thank you! |
stof
reviewed
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change intends to announce that nobody outside Doctrine projects should use the ACMF base class for extension or for type-hinting in their own code. It should be considered an internal implementation detail of Doctrine projects and may change or go away at any time without further notice (maybe after we reached the next major version?).
That also means Doctrine projects no longer need to use it as a base class for their more specific implementations.
This gives us more freedom to change ACMF implementations towards doctrine/orm#12203.
Empirical research done by a Claude agent reported that the provided annotations cover the use case for PHPStan, but leave a gap in Psalm that does not prevent type-hinting (only extension).
Details