-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
use standard way to generate arginfo - discussion #423
base: master
Are you sure you want to change the base?
Conversation
To be honest, I'm totally lost about the way you want to handle this, and your util/fixup_arginfo.php script (which I try to avoid in this one) |
the second commit apply the same change for ImagePixel and move the logic for It also fix the arginfo for getColorValue / getColorValueQuantum (color is mandatory Reflection diff:
|
The general idea is that I'd really like to have a single source of truth for which functions take/return int or float depending on the HDRI compile option, so that I can go generate the appropriate documentation from that, rather than having to edit that by hand. Although it would certainly be better to have the arginfo regenerated automatically (and there should definitely be something that checks it hasn't forgotten to be regenerated, if nothing else), I don't think I want to be editing stuff like this:
myself.
One reason I didn't try doing that, is that it is my understanding that the stub generator doesn't run on the ancient versions of PHP that I stupidly still support. e.g.
And I didn't feel like investigating making the stub generator work on the versions it doesn't currently support.
insert customary joke about going back to school to learn carpentry/plumbing. I think what I'll do is:
|
I have open bug #424 for arginfo fix needed (some being fix here, but only for discussion PoC)
Yes, need to use PHP 8 only to generate the arginfo from the stub, but can be use with all versions The main thing with this PoC is type hinting introduced for PHP 7 |
@Danack I noticed you have tried to fix compatibility in shim_php7_to_php8.h
This PR is only a PoC, onlyfor 1 class (kernel)
Notice, this way seems cleaner but
P.S. tested only with 5.6, 7.4 and 8.0