[php-src] PR #13705: Improve BC support of arginfo files fenerated by gen_stub.php
| From: | kocsismate | Date: | Wed, 13 Mar 2024 22:41:23 +0000 |
| Subject: | [php-src] PR #13705: Improve BC support of arginfo files fenerated by gen_stub.php | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-25412@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/13705
Author: kocsismate
- Declared compatibility expectations of stub files are now enforced by a ZEND_STATIC_ASSERT calll
at the top of arginfo files
- Property registration for PHP 7 is fixed: function zend_declare_property_ex() is used again
instead of zend_declare_typed_property(). This has been a regression since I added support for
exposing doc comments.
- As a defensive measure, deep cloning is performed before newer features (type declarations,
attributes etc.) are discarded before generating legacy arginfo files. Until now, some of the
objects were forgotten to be taken care of. These omissions may have resulted in some weird bugs in
theory (but probably they didn't have much impact in practice).
- PHP version related conditions inside *non-legacy arginfo files* used to possibly check for the
70000 version iD until now if compatibility with PHP 7.0 was declared in a stub. This was not 100%
correct, since non-legacy arginfo files are only for PHP 8.0+. Now, I made sure that at least PHP
version ID 80000 is used in the preprocessor conditions. The solution was a bit tricky though...