Skip to content

[6.x] Improved the reflector#33184

Merged
taylorotwell merged 2 commits into
6.xfrom
reflector
Jun 11, 2020
Merged

[6.x] Improved the reflector#33184
taylorotwell merged 2 commits into
6.xfrom
reflector

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Collaborator
  1. Fixed treatment of union types in PHP 8. Foo|null and ?Foo will be treated as "Foo", Foo|Bar will be treated as null.
  2. Fixed treatment of self typing. self declared in a parameter in a method defined in class Foo will be treated as "Foo", even if the reflection parameter was generated from querying a class Bar that extends or implements Foo. This mimics the behaviour of getClass on PHP 7, which was removed in PHP 8 (which is what we are here to simulate).

Closes #33177.

@taylorotwell taylorotwell merged commit 86c43ad into 6.x Jun 11, 2020
@driesvints driesvints deleted the reflector branch June 11, 2020 14:04
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