Skip to content

Remove return types from all interfaces#75

Merged
alcaeus merged 1 commit intodoctrine:masterfrom
alcaeus:remove-return-types
Dec 16, 2019
Merged

Remove return types from all interfaces#75
alcaeus merged 1 commit intodoctrine:masterfrom
alcaeus:remove-return-types

Conversation

@alcaeus
Copy link
Member

@alcaeus alcaeus commented Dec 11, 2019

This partially reverts commit 3e2fad5.

To avoid a hard BC break from 1.x to 2.0, we remove the milestone, as that allows people to install either 1.x or 2.0.

With this, the upgrade process is as follows:

  • 1.3.x will deprecate the Doctrine\Common\Persistence namespace in favour of the Doctrine\Persistence namespace.
  • Once the above has been changed, a project can change its version constraint for doctrine/persistence to ^1.3 || ^2.0 without further changes.
  • Projects now have to add return type hints to all methods extended from persistence interfaces and classes.
  • After a while, we will release version 3.0 which will require return type hints, but will otherwise be compatible with 2.x. This will allow projects to change the version constraint to ^2.0 || ^3.0.

This ensures a smooth transition where the ecosystem has time to catch up. Otherwise, a single package that upgrades to doctrine/persistence 2.0 could fast-travel a user into dependency hell. Projects are discouraged from running any single major version constraint - e.g. running ^2.0 or ^1.0 is discouraged. Dependents should quickly ensure compatibility with 2.0 and update the version constraint as suggested above.

@alcaeus alcaeus added this to the 2.0.0 milestone Dec 11, 2019
@alcaeus alcaeus requested review from greg0ire and jwage December 11, 2019 15:54
@alcaeus alcaeus self-assigned this Dec 11, 2019
This partially reverts commit 3e2fad5.
@alcaeus alcaeus force-pushed the remove-return-types branch from dcc3344 to 8b10068 Compare December 13, 2019 09:51
@alcaeus alcaeus requested a review from greg0ire December 13, 2019 09:52
@alcaeus alcaeus merged commit a726ec0 into doctrine:master Dec 16, 2019
@alcaeus alcaeus deleted the remove-return-types branch December 16, 2019 06:12
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.

3 participants