Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged

Conversation

greg0ire
Copy link
Member

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 #616 as a side effect, but the real fix is at
symfony/symfony#35728

@greg0ire
Copy link
Member Author

Is it the correct target branch? Do we consider "fixing" deprecations a patch? Note that it's future deprecations…

@greg0ire greg0ire force-pushed the address-deprecations-from-persistence branch from 7983394 to 4d5593f Compare February 14, 2020 21:41
Copy link
Member

@SenseException SenseException left a 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?

@greg0ire greg0ire force-pushed the address-deprecations-from-persistence branch from 4d5593f to 2aa6500 Compare February 14, 2020 21:54
@greg0ire
Copy link
Member Author

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.

@greg0ire greg0ire requested a review from alcaeus February 15, 2020 08:00
@alcaeus
Copy link
Member

alcaeus commented Mar 11, 2020

Is it the correct target branch? Do we consider "fixing" deprecations a patch? Note that it's future deprecations…

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.

@alcaeus alcaeus self-assigned this Mar 11, 2020
@alcaeus alcaeus added this to the 4.1.1 milestone Mar 11, 2020
@alcaeus alcaeus changed the base branch from 4.0.x to 4.1.x March 11, 2020 19:08
@alcaeus
Copy link
Member

alcaeus commented Mar 11, 2020

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
@greg0ire greg0ire force-pushed the address-deprecations-from-persistence branch from 2aa6500 to ce5f39b Compare March 15, 2020 13:50
@greg0ire
Copy link
Member Author

@alcaeus done :)

@malarzm
Copy link
Member

malarzm commented Mar 22, 2020

Thanks a lot @greg0ire!

@malarzm malarzm merged commit 21ed3a7 into doctrine:4.1.x Mar 22, 2020
@greg0ire greg0ire deleted the address-deprecations-from-persistence branch March 22, 2020 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.