You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Language: bare throw; rethrow — parse error in catch block (Zend/zend_compile.c) #17691
Zend PHP 8.0+ allows a bare throw; inside a catch block to rethrow the active exception. This compiler rejects the construct at parse time (unexpected token ";"), so exception propagation chains cannot match php-src.
Bare `throw;` catch rethrow was already implemented on the PHP 8.4 forward profile (`SourceBareThrowRewriter` → `TYPE_RETHROW`). This PR adds the missing maintainer-gap repro and compliance guard.
`PHP_COMPILER_PROFILE=8.4 vendor/bin/phpunit test/compliance/VMTest.php --filter bare_throw_rethrow` → OK
`TryCatchComplianceTest::testBareThrow*` → OK
Reference profile (8.2) correctly rejects bare `throw;` per Zend; enable via `PHP_COMPILER_PROFILE=8.4` or source pragma `// php-compiler-language-profile=8.4`.
Activity
PurHur commentedon Jul 10, 2026
claim: cursor-agent-lane-a — starting this run
Add maintainer_gap repro and compliance guard for bare throw; rethrow (…
PurHur commentedon Jul 10, 2026
Merged via #17705.
Bare `throw;` catch rethrow was already implemented on the PHP 8.4 forward profile (`SourceBareThrowRewriter` → `TYPE_RETHROW`). This PR adds the missing maintainer-gap repro and compliance guard.
Verification (all green):
Reference profile (8.2) correctly rejects bare `throw;` per Zend; enable via `PHP_COMPILER_PROFILE=8.4` or source pragma `// php-compiler-language-profile=8.4`.