Skip to content

Language: gate pipe operator |> on PROFILE≥8.5 (#22792) - #22809

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-22792-pipe-operator-profile85
Jul 24, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-22792-pipe-operator-profile85

Conversation

@PurHur

@PurHur PurHur commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Gate CompilerVersion::supportsPipeOperator() on languageProfileVersion() >= 8.5.0 (was 8.4.0) so |> matches Zend/php-src (PHP 8.5-only).
  • PHP_COMPILER_PROFILE=8.4 / reference profile: Zend-shaped parse error; PROFILE=8.5 still desugars.
  • Compliance: update forward-profile case to 8.5; add pipe_operator_profile84_reject.phpt.

Closes #22792

php-src: Zend/zend_language_parser.y (ZEND_AST_PIPE, 8.5+). PHP impl: lib/CompilerVersion.php, lib/PipeOperatorSyntaxRejector.php, lib/Ast/PipeOperatorDesugar.php.

Test plan

  • Issue repro (Docker):
=== Zend === Parse error … EXIT_ZEND:255
=== VM default === Parse error … EXIT_DEFAULT:255
=== VM 8.4 === Parse error … EXIT_VM84:255
=== VM 8.5 === HELLO EXIT_VM85:0
  • vendor/bin/phpunit --filter CompilerVersionGateTest::testSupportsPipeOperator → OK 3
  • vendor/bin/phpunit --filter PipeOperatorReferenceProfileTest|PipeOperatorSyntaxRejectorTest → OK
  • vendor/bin/phpunit --filter pipe_operator test/compliance/VMTest.php → OK 3 (forward 8.5, profile84 reject, reference reject)

Pillar 1 note: user_release_ready=no on master (spine/xmlrpc drift + stale gen-0 #22642); this PR is Pillar 4 language only.

Made with Cursor

|> is PHP 8.5-only in Zend; PROFILE=8.4 and the reference profile must
parse-error like php-src. Keep desugar under PHP_COMPILER_PROFILE=8.5.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit b4515c7 into master Jul 24, 2026
@PurHur
PurHur deleted the agent/issue-22792-pipe-operator-profile85 branch July 24, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: pipe operator |> accepted on PROFILE=8.4 — Zend 8.4/8.5-only parse (re-#16675, Zend/zend_language_parser.y)

1 participant