Problem
phpc lint --all walks include/require edges only when the path operand is a literal string. MiniWebApp and normal PHP apps use:
require __DIR__ . '/../config.php';
include __DIR__ . '/../templates/home.php';
lib/Lint/Linter.php emits stderr warnings (dynamic include/require (not followed)) and does not lint included files, so the project tree looks noisier than the real blocker set and MINIWEBAPP_LINT_GATE=1 cannot flip cleanly after #67.
Goal
When the include expression is __DIR__ concatenated with a literal suffix, resolve the path relative to the including file and recurse lint like a static include.
Scope
Out of scope
Acceptance criteria
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
php bin/lint.php --all examples/003-MiniWebApp 2>&1 | tee /tmp/lint.txt
Verification (local / Docker only)
./script/ci-local.sh --filter PhpcLintProjectTest
Do not require GitHub Actions.
Dependencies
Links
Problem
phpc lint --allwalksinclude/requireedges only when the path operand is a literal string. MiniWebApp and normal PHP apps use:lib/Lint/Linter.phpemits stderr warnings (dynamic include/require (not followed)) and does not lint included files, so the project tree looks noisier than the real blocker set andMINIWEBAPP_LINT_GATE=1cannot flip cleanly after #67.Goal
When the include expression is
__DIR__concatenated with a literal suffix, resolve the path relative to the including file and recurse lint like a static include.Scope
literalStringOperand()/walkCfgBlock()inlib/Lint/Linter.phpto foldConcatofMagicConst __DIR__+ literal (and optional single segment)resolveIncludePath()for normalized absolute pathstest/unit/PhpcLintProjectTest.phpusingexamples/003-MiniWebApp/(expect fewer dynamic warnings; ClassMethod blockers remain until Language: Class methods and property access in JIT #58)docs/unsupported-syntax.mdif truly dynamic paths stay warningsOut of scope
__DIR__dynamic paths ($base . '/tpl.php')Acceptance criteria
dynamic include/requirelines forpublic/index.phprequire/includeusing__DIR__ . '/../…'Verification (local / Docker only)
Do not require GitHub Actions.
Dependencies
__DIR__runtime (compile-time fold can mirror VM magic constant rules)make web-smokelint gate, Reference app: examples/003-MiniWebApp (router, templates, forms) #67 acceptanceLinks