Skip to content

Lint: Register Phase-2 blockers in UnsupportedRegistry (ternary, .=, break) #258

Description

@PurHur

Problem

phpc lint maps some unsupported CFG kinds to GitHub issues via lib/Lint/UnsupportedRegistry.php, but several Phase-2 P0 constructs still fall through to generic errors:

Syntax Tracking issue Registry today
Ternary ?: #114 missing (mis-filed Expr_Yield#114)
Compound .= / += #136 missing
break / continue #115 missing
match #143 missing

Contributors running ./phpc lint examples/003-MiniWebApp/... do not get actionable issue links for common blockers.

Goal

Extend UnsupportedRegistry::KIND_TO_ISSUE and docs/unsupported-syntax.md so lint output references the correct issue numbers.

Tasks

Acceptance criteria

./phpc lint -r '\$x = \$a ? \$b : \$c;'

stderr mentions #114 (or structured lint code linking to it).

Verification (local only)

./script/ci-local.sh --filter UnsupportedRegistry
# or Docker:
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
  vendor/bin/phpunit --filter Lint

Dependencies

Blocks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions