-
-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add deprecation layers #1924
Add deprecation layers #1924
Conversation
See also: https://dev.to/greg0ire/how-to-deprecate-a-type-in-php-48cf
You actually can, but conditionally. |
tests/Doctrine/ODM/MongoDB/Tests/Mapping/Driver/XmlDriverTest.php
Outdated
Show resolved
Hide resolved
I'll take your word for |
f8a2964
to
4068402
Compare
@greg0ire updated code with your suggestions and changed |
4068402
to
943667f
Compare
@greg0ire updated the comment to add both reasons. |
Summary
Note: PR is best reviewed commit-by-commit.
This PR brings in a first round of deprecations:
id
element to the mapping schema and deprecate passingid="true"
to afield
elementnamespace
property and its accessor and trigger a deprecation warning when passing non-FQCNClassMetadataInfo
toClassMetadata
, deprecateClassMetadataInfo
and provide an aliaswriteConcern
andfieldName
attributes in schema in favour ofwrite-concern
andfield-name
I might have to revisit the BC layer for
ClassMetadata
once again. @greg0ire has tried the same for ORM in doctrine/orm#6886. What I'd like to do: trigger a deprecation notice when someone usesClassMetadataInfo
but allow usingClassMetadata
in place of it. Usingclass_alias
inClassMetadata.php
means that we can't trigger a deprecation notice. We might have to split this out of this PR.