Skip to content
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

Add ReturnTypeWillChange to extended reflection classes #189

Merged
merged 1 commit into from
Jun 5, 2021

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Jun 5, 2021

PHP 8.1 will introduce a process to add return types to internal methods, see https://wiki.php.net/rfc/internal_method_return_types

This library extends ReflectionProperty and overrides public methods that are affected by this change. PHP 8.1 triggers deprecation warnings unless we declare that a future version of this library will add these return types as well. We can do so by adding the ReturnTypeWillChange attribute to those methods.

This PR suggests to do just that because adding the actual return types would break code that extends our classes. As there's already a 3.0.x branch open, I suggest to add the return types once this PR has been merged up.

@greg0ire greg0ire added this to the 2.2.2 milestone Jun 5, 2021
@greg0ire greg0ire merged commit 79e97bc into doctrine:2.2.x Jun 5, 2021
@greg0ire
Copy link
Member

greg0ire commented Jun 5, 2021

Thanks @derrabus !

@derrabus derrabus deleted the bugfix/return-type-will-change branch June 5, 2021 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants