-
-
Notifications
You must be signed in to change notification settings - Fork 501
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 #2150
Address deprecations from persistence #2150
Conversation
db88e53
to
b159e4b
Compare
The build fails because persistence requires php 7.1 . Could we drop php 7.0? |
I think we can safely do that in 2.1 👍 |
🤔 why not 2.0.4 ? Also, should we forbid persistence 1.4 and up on this branch? That way people don't get deprecations they cannot fix? |
Oh this is targeting
PHP version can be bumped in a minor release, we even made a blog post about it :) https://www.doctrine-project.org/2017/07/25/php-7.1-requirement-and-composer.html |
But… 2.0.x already requires |
Yeah, this is what happens when I'm replying in the night. I'm sorry @greg0ire you're right, we can totally include this in 2.0.4. I was confused by you saying we need to drop 7.0 and thought 2.0 is still supporting that version. |
332138b
to
ea62187
Compare
The persistence part of the common library has been extracted in a separate library.
38aca92
to
f1eb2af
Compare
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 type declarations of non-constructor methods, 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
f1eb2af
to
3a23dde
Compare
There! Got it to a mergeable state again :P |
Thanks @greg0ire! |
Summary
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 type declarations of non-constructor methods,
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