Category
bootstrap | language · php-src-strict · regression
Problem
Closed #7468 / #7460 tracked PHP 8.4 asymmetric visibility (public private(set) string $x), but valid syntax still fails at parse/compile:
Multiple access type modifiers are not allowed
./script/apply-patches.sh cannot apply php-cfg asymmetric visibility overlays — Param.php promotionSetVisibility anchor missing. Until php-cfg exposes combined visibility on promoted/ordinary properties, runtime work from #3165 cannot be verified.
php-src reference
Repro
test/repro/maintainer_asymmetric_visibility_public_private_set.php:
<?php
class C {
public private(set) int $x = 1;
}
$c = new C();
echo $c->x, "\n";
try {
$c->x = 2;
} catch (Error $e) {
echo get_class($e), ': ', $e->getMessage(), "\n";
}
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php test/repro/maintainer_asymmetric_visibility_public_private_set.php 2>&1 | head -2
./script/apply-patches.sh 2>&1 | grep -i asymmetric || true'
| Engine |
Parse |
| Zend PHP 8.4+ |
parses; external write → Error |
| VM |
parseAndCompile failure (same message text, no runtime) ❌ |
Scope
| Layer |
Path |
| Patches |
patches/php-cfg-asymmetric-visibility/ — fix Param.php anchor |
| Parser |
lib/Ast/AsymmetricVisibilityRewriter.php — consume php-cfg visibility ops |
| VM |
write guards once parse succeeds (#8760, #7070) |
| Self-host |
spine must compile promoted asymmetric examples |
Done when
Links
#1492 · re-open #7468 / #7460 · runtime pairs #8760
Category
bootstrap|language· php-src-strict · regressionProblem
Closed #7468 / #7460 tracked PHP 8.4 asymmetric visibility (
public private(set) string $x), but valid syntax still fails at parse/compile:./script/apply-patches.shcannot apply php-cfg asymmetric visibility overlays —Param.php promotionSetVisibility anchor missing. Until php-cfg exposes combined visibility on promoted/ordinary properties, runtime work from #3165 cannot be verified.php-src reference
Zend/zend_compile.c—ZEND_ACC_PUBLIC_SET_PRIVATE, asymmetric parseZend/zend_property_hooks.c— write-time guards after parseRepro
test/repro/maintainer_asymmetric_visibility_public_private_set.php:ErrorScope
patches/php-cfg-asymmetric-visibility/— fixParam.phpanchorlib/Ast/AsymmetricVisibilityRewriter.php— consume php-cfg visibility opsDone when
./script/apply-patches.shapplies asymmetric overlay without anchor-missing log$c->xreads1; external$c->x = 2throwsErrormatching Zendtest/compliance/cases/language/*asymmetric*greenphp script/bootstrap-inventory.php --checkstill green after patchLinks
#1492 · re-open #7468 / #7460 · runtime pairs #8760