[PHP-DEV] Re: Allow default parameters before non-default ones?

2021-12-08 Thread Mark Randall
On 09/12/2021 05:22, André Hänsel wrote: This is very useful because I can add an optional parameter to a function and prevent users of my function from using the parameter in a positional way. This way I don't have to make a compatibility promise to never change the position of this parameter.

[PHP-DEV] Allow default parameters before non-default ones?

2021-12-08 Thread André Hänsel
PHP 8 has named parameters in function calls, Kotlin has named parameters in function calls. Kotlin has this handy feature that you can put parameters with defaults before normal ones. Those parameters can then only be used by naming them. See also:

Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)?

2021-12-08 Thread David Zuelke via internals
Yes, of course; it happens with any extension, because the Makefile generated by 8.1's 'phpize' now lists those header dependencies even for 'make install'. Like I described, you can reproduce this by 'make'ing the extension, then moving the PHP you used to build the extension, then running 'make

Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)?

2021-12-08 Thread Glash Gnome
Thanks, I'll check it out. I'm confused. Can you tell me if you have this problem with this extension (PHP8 / 7/5>): https://github.com/gtkphp/php-ext-cairo-src checkout PHP-8.0 At the moment I need to check some dependency to try your extension. I'll keep you informed. Best Regards Le jeu. 9

Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)?

2021-12-08 Thread David Zuelke via internals
That's... sort of... irrelevant for this question; the problem appears before that step. You could make a tarball of the built extension, create a .deb archive, whatever; the point is that it should be installable standalone (think e.g. 'apt-get install php81-imagick'). On Thu, Dec 9, 2021 at

Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)?

2021-12-08 Thread Glash Gnome
Hello, Can you tell me what the program is in step 7) > package up Thanks you, Le mer. 8 déc. 2021 à 16:25, David Zuelke via internals < internals@lists.php.net> a écrit : > Hi all, > > When building shared extensions for PHP for the purpose of packaging > and distributing the builds, the

Re: [PHP-DEV] Re: Finishing AVIF support in getimagesize()

2021-12-08 Thread Christoph M. Becker
On 08.12.2021 at 19:22, Yannis Guyon via internals wrote: >> On a general principle, I understood that bundling libs should be avoided. > > libavifinfo was designed more as a copy-pastable snippet than a library. Thanks for clarifying. > Unfortunately AVIF is complex and avifinfo.c is lengthier

Re: [PHP-DEV] Re: Finishing AVIF support in getimagesize()

2021-12-08 Thread Yannis Guyon via internals
> > On a general principle, I understood that bundling libs should be avoided. > libavifinfo was designed more as a copy-pastable snippet than a library. Unfortunately AVIF is complex and avifinfo.c is lengthier than expected, although I believe 700 lines are still reasonable and way below a

Re: [PHP-DEV] Re: Finishing AVIF support in getimagesize()

2021-12-08 Thread Pierre Joye
Good evening, On Wed, Dec 8, 2021, 6:40 PM Christoph M. Becker wrote: > On 01.12.2021 at 00:52, Ben Morss via internals wrote: > > l > > Thanks for your and your colleague's work! It's highly appreciated. > > Anyhow, a respective PR[1] has been submitted now, and I'm in favor of > bundling

Re: [PHP-DEV] Automatic implementation of Stringable may conflict with old, untyped arginfo declarations

2021-12-08 Thread Jeremy Mikola
On Fri, Nov 12, 2021 at 7:00 AM Nikita Popov wrote: > > With the introduction of Stringable PHP also started automatically adding > the string result type to __toString(), specifically for compatibility with > the interface. As such, it should be safe to add the string return type > everywhere

[PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)?

2021-12-08 Thread David Zuelke via internals
Hi all, When building shared extensions for PHP for the purpose of packaging and distributing the builds, the build environment obviously needs PHP installed in the destination directory structure (for headers, phpize, and so forth). But the resulting archive of the built extension should only

[PHP-DEV] Re: Finishing AVIF support in getimagesize()

2021-12-08 Thread Christoph M. Becker
On 01.12.2021 at 00:52, Ben Morss via internals wrote: > Earlier this year, I added support for AVIF images > to libgd > . My ultimate goal was to bring support for > this new image format to PHP, so that the world's top

Re: [PHP-DEV] RFC [Discussion] array_column results grouping

2021-12-08 Thread Hassan Ahmed
Hendra Gunawan IMHO your suggestions is not related to `array_group()`, you are talking about a great change in PHP as mentioned by Larry, since we can have `Array($input, group(), reducer(), mapper(), filter() . and so forth);` or even any other way to handle the list comprehensions. but for