-
Notifications
You must be signed in to change notification settings - Fork 231
Address deprecations from persistence library #617
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
Address deprecations from persistence library #617
Conversation
Is it the correct target branch? Do we consider "fixing" deprecations a patch? Note that it's future deprecations… |
7983394
to
4d5593f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AbstractDriverTest.php still has Doctrine\Common\Persistence\Mapping\MappingException
in use. Shouldn't the test fail with this old namespace?
4d5593f
to
2aa6500
Compare
Good catch, fixed! And no it shouldn't fail IMO, the old name is an alias for the new one, so using one in place of the other should produce the same result. |
Sorry for the long delay here. Yes, we will fix these in a patch release, and yes, this is the right target branch: 3.6 can't deal with the new persistence version as it must be compatible with PHP 5, so 4.0 is the lowest version that gets these fixed. |
Ah, small correction: 4.1.x is the current supported minor version. Could you please rebase to fix conflicts? Thanks! |
A backwards-compatibility layer has been added to persistence to help consumers move to the new namespacing. It is based on class aliases, which means the type declaration changes should not be a BC-break: types are the same. See doctrine/persistence#71 This means: - using the new namespaces - adding autoload calls for new types to types that may be extended and use persistence types in methods signatures for which compatibility checks may happen, so that signature compatibility is recognized by old versions of php. More details on this at https://dev.to/greg0ire/how-to-deprecate-a-type-in-php-48cf Fixes doctrine#616 as a side effect, but the real fix is at symfony/symfony#35728
2aa6500
to
ce5f39b
Compare
@alcaeus done :) |
Thanks a lot @greg0ire! |
A backwards-compatibility layer has been added to persistence to help
consumers move to the new namespacing. It is based on class aliases,
which means the type declaration changes should not be a BC-break: types
are the same.
See doctrine/persistence#71
This means:
use persistence types in methods signatures for which compatibility
checks may happen,
so that signature compatibility is recognized by old versions of php.
More details on this at
https://dev.to/greg0ire/how-to-deprecate-a-type-in-php-48cf
Fixes #616 as a side effect, but the real fix is at
symfony/symfony#35728