Repository navigation
Deprecate ClassMetadataFactory::hasMetadataFor() - #533
Merged
Merged
Conversation
mpdude
force-pushed
the
deprecate-hasmetadatafor
branch
from
November 6, 2026 22:24
cfa19d5 to
a7cd236
Compare
mpdude
force-pushed
the
deprecate-hasmetadatafor
branch
from
November 6, 2026 22:28
a7cd236 to
0edbdb8
Compare
GromNaN
approved these changes
Nov 7, 2026
Member
|
Thanks @mpdude ! |
ondrejmirtes
added a commit
to phpstan/phpstan
that referenced
this pull request
Nov 9, 2026
phpunit and drupal: phpstan/phpstan-src#7006 now runs restricted-usage checks on nullable receivers, so calls on ?Driver and \JsonSchema\Validator|null are reported. symfony: doctrine/persistence 4.3.x-dev deprecated ClassMetadataFactory::hasMetadataFor() (doctrine/persistence#533). Amp-Thread-ID: https://ampcode.com/threads/T-01a19770-5331-74b2-963f-e324ae0f7635
Member
|
Thanks, nothing to change in |
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 method exposes an implementation detail: whether a class's metadata has already been lazily loaded from the mapping driver in the current process.
That detail doesn't make sense for every
ClassMetadataFactoryimplementation. A factory backed by a precompiled/snapshot-based metadata source, as explored in doctrine/orm#12760, has no notion of "not yet loaded" to report.The ORM can live without this method on the interface. As far as I can tell, the ODM does not currently use it either.
Closes #532