Skip to content

Add ReturnTypeWillChange to extended reflection classes#189

Merged
greg0ire merged 1 commit intodoctrine:2.2.xfrom
derrabus:bugfix/return-type-will-change
Jun 5, 2021
Merged

Add ReturnTypeWillChange to extended reflection classes#189
greg0ire merged 1 commit intodoctrine:2.2.xfrom
derrabus:bugfix/return-type-will-change

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