Using arginfo generating stubs in PECL extensions
| From: | Calvin Buckley | Date: | Fri, 11 Dec 2020 15:39:11 +0000 |
| Subject: | Using arginfo generating stubs in PECL extensions | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-17104@lists.php.net to get a copy of this message | ||
Might be better in php-internals (haven't subbed yet), but:
I noticed one of the new facilities in PHP 8 was generating arginfo
from a PHP stub. This is pretty useful for reasons elaborated
elsewhere, but I'm wondering how this should be used for PECL
extensions. I noticed what PHP itself does is keep the generated
arginfo header. My questions are:
1. Should this be used at all PECL extensions yet? That is, is this
some PHP facility that isn't ready for external usage yet?
2. I noticed the build system deletes the stub after it's built the
object files. Since I might want to keep the header (for PHP 7.x
users), this is a bit annoying, especially as PHP itself keeps them.
3. Are the headers that get generated have any guarantees on usability
in PHP 7.x?
4. Part of #2, because it deletes the headers, it makes rebuilding if
you generate a change in source *very* annoying, because the header
won't be found.
5. Actually downloading PHP-Parser during build is really unexpected. I
assume if I have it on my include path it won't do that, but for
isolated builds it could be really confusing. I assume if I ship
arginfo header in a release tarball, it won't do that?
This facility isn't really documented yet, so I'm left wondering.