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 #72305: ReflectionParameter::isCallable not implemented properly #2302

Closed
wants to merge 1 commit into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Jan 12, 2017

ZEND_ARG_CALLABLE_INFO() is available as of PHP 7.0.0, so we finally
use it.

ZEND_ARG_CALLABLE_INFO() is available as of PHP 7.0.0, so we finally
use it.
@krakjoe
Copy link
Member

krakjoe commented Jan 12, 2017

@weltling okay for 7.0 ?

@krakjoe krakjoe self-assigned this Jan 12, 2017
@cmb69
Copy link
Member Author

cmb69 commented Jan 12, 2017

Anyhow, let's wait if Travis would be fine with these changes. :-)

@krakjoe
Copy link
Member

krakjoe commented Jan 12, 2017

@cmb69 yeah, that will happen whatever, just getting in early to get the right people involved ;)

@nikic
Copy link
Member

nikic commented Jan 12, 2017

I'm -1 on any changes adding arginfo argument types until such a time as we do not validate them for internal functions. Otherwise this results in duplicate validation, which especially for callables is very expensive.

Additionally, it should be noted that adding types changes the error behavior outside of strict mode.

@krakjoe
Copy link
Member

krakjoe commented Jan 12, 2017

@nikic @dstogov commented on a closed PR that it would be okay to add types in master ... is the reason I considered it okay ...

But these are good points you raise ...

Guess it probably is too late for 7.0/7.1, but wanted to start a conversation ... mission accomplished ... let's see what others say ;)

@cmb69
Copy link
Member Author

cmb69 commented Jan 12, 2017

But these are good points you raise ...

Indeed, and considering the BC impact confirmed by Travis, I don't think we can add the arginfo types in a revision; even a minor version appears to be too much of an issue.

@krakjoe
Copy link
Member

krakjoe commented Jan 12, 2017

It's almost impressive to make that many tests fail at once 🤣

It was pretty obviously going to happen ... still, that there is disconnect between what the manual says, and what is actually the case is a thing worth trying to fix ... even if it will take another few years to actually do it ...

Maybe it's another thing we slab for PHP 8 ?

@nikic
Copy link
Member

nikic commented Jan 12, 2017

Maybe add an arginfo option for unenforced type hints (only for reflection and inheritance)? We can't add type hints as is and changing them all to unenforced may have side-effects on 3rd party extensions.

@krakjoe
Copy link
Member

krakjoe commented Jan 12, 2017

More good points ...

Without having thought about it too deeply, that seems viable, @cmb69 want to have a go at that ?

@cmb69
Copy link
Member Author

cmb69 commented Jan 12, 2017

@cmb69 want to have a go at that ?

Sorry, I'm not familiar enough with reflection and the engine to do that with reasonable effort.

I assume that this PR isn't of any value, so I'm closing.

@cmb69 cmb69 closed this Jan 12, 2017
@krakjoe
Copy link
Member

krakjoe commented Jan 12, 2017

Thanks for the effort @cmb69 ... we did advance the conversation, that's valuable ;)

@carusogabriel
Copy link
Contributor

@cmb69 @krakjoe @nikic Should we re-open this one for PHP 8.0?

@nikic
Copy link
Member

nikic commented Feb 10, 2019

@carusogabriel This is still blocked on https://wiki.php.net/rfc/consistent_type_errors.

@cmb69 cmb69 deleted the callable-arginfo branch September 29, 2019 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants