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

fix: complete ReflectionEnum polyfill #150

Closed
wants to merge 1 commit into from

Conversation

alanpoulain
Copy link

Q A
Documentation no
Bugfix yes
BC Break no
New Feature no
RFC no
QA no

Description

Since the polyfill is autoloaded, PHPStan seems to discover the class, even with the early return:

Call to an undefined method ReflectionEnum::getCases()

Completing this polyfill solves the issue.

Since the polyfill is autoloaded, PHPStan seems to discover the class, even with the early return:
Call to an undefined method ReflectionEnum::getCases()
Completing this polyfill solves the issue.

Signed-off-by: Alan Poulain <contact@alanpoulain.eu>
@@ -5,10 +5,27 @@
}

/** @internal */
class ReflectionEnum
class ReflectionEnum extends \ReflectionClass
Copy link
Member

Choose a reason for hiding this comment

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

I decided to drop PHP 8.0 support anyway, which will remove the polyfill entirely.

That said, patch stays open until I'm done with my changes.

@Ocramius
Copy link
Member

Ocramius commented Dec 8, 2022

Handled in #154

@Ocramius Ocramius closed this Dec 8, 2022
@Ocramius Ocramius added the Duplicate This issue or pull request already exists label Dec 8, 2022
@Ocramius Ocramius removed this from the 4.8.0 milestone Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate This issue or pull request already exists Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants