Skip to content

Add native return types to fix compat with v7 #50890

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
merged 1 commit into from
Jul 6, 2023

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 6.4
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

@nicolas-grekas nicolas-grekas force-pushed the compat-v7 branch 3 times, most recently from e7c4be9 to 133bb13 Compare July 5, 2023 14:43
@nicolas-grekas nicolas-grekas force-pushed the compat-v7 branch 6 times, most recently from e9fef32 to 404ea2f Compare July 6, 2023 06:22
Copy link
Member Author

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All green, PR is ready.

What this does is adding a few return types on some selected classes on 6.4.
Technically, this is a BC break, but I think the patched methods have a very low chance of being overridden in a child class.

Note that while preparing this PR, I reverted some native return types on 7.0 as well, see full list in:
https://github.com/symfony/symfony/blob/7.0/.github/expected-missing-return-types.diff

Alternatively to this PR, we could revert more native return types on 7.0, and we could also declare v6 and v7 as being incompatible for the related packages. This is a matter of finding the sweet spot between those approaches, and this PR is my proposal :)

I'm merging it now to unlock the CI, but feel free to discuss the topic even after merge, we still have a few months to adjust this before the release.

@nicolas-grekas nicolas-grekas merged commit 20cd059 into symfony:6.4 Jul 6, 2023
@nicolas-grekas nicolas-grekas deleted the compat-v7 branch July 6, 2023 07:15
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