Skip to content

Lint: Map ClassMethod and Expr_MethodCall to tracking issues in UnsupportedRegistry #463

@PurHur

Description

@PurHur

Problem

phpc lint reports generic messages for OOP syntax in 003-MiniWebApp:

unsupported Expr_MethodCall
unsupported Unsupported class body element: PHPCfg\Op\Stmt\ClassMethod

lib/Lint/UnsupportedRegistry.php has no entries for these kinds, so contributors cannot see #58 / #145 in lint output or docs/unsupported-syntax.md.

Goal

Register mappings so lint output includes GitHub issue numbers:

CFG kind Issue
Stmt_ClassMethod / class body method #58 (implementation), #145 (visibility/ctors follow-up)
Expr_MethodCall #58

Scope

  • Add kinds to UnsupportedRegistry::KIND_TO_ISSUE (exact php-cfg class names from Linter diagnostics)
  • Regenerate or update docs/unsupported-syntax.md via existing script/check
  • Assert in test/unit/MiniWebAppSkeletonTest.php that lint JSON mentions #58 for method call line

Acceptance criteria

./phpc lint examples/003-MiniWebApp/public/index.php 2>&1 | grep -E '#58|#145'

Verification

./script/ci-local.sh --filter MiniWebAppSkeletonTest

Local/Docker only — no GitHub Actions.

Dependencies

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions