Skip to content

Fix an undefined class error running gen_stub in php8 #5369

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

Closed
wants to merge 1 commit into from

Conversation

TysonAndre
Copy link
Contributor

For whatever reason, php 8 would not have loaded the subsequent classes when
running php build/gen_stub.php path/to/filename.php.
I assume it didn't load the classes immediately because there's a possibility
the code before it would throw. (newly added class?)

Also, fix a typo

For whatever reason, php 8 would not have loaded the subsequent classes when
running `php build/gen_stub.php path/to/filename.php`.
I assume it didn't load the classes immediately because there's a possibility
the code before it would throw.

Also, fix a typo
Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

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

This is probably due to a very recently added __toString() method, which currently prevents early binding on PHP 8.

We should do this move in any case though, it's best to avoid relying on early-binding.

@php-pulls php-pulls closed this in 047d814 Apr 11, 2020
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