Category
bootstrap | language | pairs #7460
Problem
./script/apply-patches.sh logs:
php-cfg-asymmetric-visibility: Param.php promotionSetVisibility anchor missing
The asymmetric visibility php-cfg overlays (#5059, #4690) no longer match current vendor/ircmaxell/php-cfg/lib/PHPCfg/Op/Expr/Param.php. Parser therefore rejects valid PHP 8.4 syntax:
Multiple access type modifiers are not allowed
Runtime work from closed #3165 cannot be verified until php-cfg exposes promotionSetVisibility / combined visibility on promoted properties.
php-src reference
Repro
./script/docker-exec.sh -- bash -lc '
./script/apply-patches.sh 2>&1 | grep asymmetric
grep promotionSetVisibility vendor/ircmaxell/php-cfg/lib/PHPCfg/Op/Expr/Param.php || echo NO_PROMO_SET_VIS
php bin/vm.php test/repro-maintainer/asymmetric_visibility_regression.php 2>&1 | head -3
'
<?php
class A {
public private(set) string $x = 'hi';
}
echo (new A())->x;
Scope
Done when
apply-patches.sh reports asymmetric overlay applied (no anchor-missing stderr)
public private(set) string $x parses; repro prints hi
- Foreign-scope write throws
Error (php-src-strict)
- Compliance
test/compliance/cases/language/asymmetric_visibility.phpt green
Category
bootstrap|language| pairs #7460Problem
./script/apply-patches.shlogs:The asymmetric visibility php-cfg overlays (#5059, #4690) no longer match current
vendor/ircmaxell/php-cfg/lib/PHPCfg/Op/Expr/Param.php. Parser therefore rejects valid PHP 8.4 syntax:Runtime work from closed #3165 cannot be verified until php-cfg exposes
promotionSetVisibility/ combined visibility on promoted properties.php-src reference
Zend/zend_compile.c— asymmetric property visibility (ZEND_ACC_PUBLIC_SET_PRIVATE, etc.)Zend/zend_language_parser.y—public private(set)modifier listRepro
Scope
patches/php-cfg-asymmetric-visibility.patchorscript/apply-patches.shPython overlays (apply_php_cfg_asymmetric_*) against current Param/Property anchorslib/Compiler.phpproperty tables (runtime guards already partially inlib/VM.phpfrom Language: PHP 8.4 asymmetric property visibility (public/private(set), etc.) #3165)Done when
apply-patches.shreports asymmetric overlay applied (no anchor-missing stderr)public private(set) string $xparses; repro printshiError(php-src-strict)test/compliance/cases/language/asymmetric_visibility.phptgreen