Analyzer::Php::PhpEngine
Inherits FileScanEngine < Analyzer < FileHelper < Reference < Object
Constants
PHP double-quoted strings interpolate $var, {$var}, and
${var}. The route extractor captures the literal characters
between the quotes, so "/api/{$VERSION}/items" came out as
/api/{$VERSION}/items with the $ leaking into the URL.
Rewrite each shape to {name} so the path-parameter
extractor picks it up and the URL template reads cleanly.
Same posture as the Python f-string and Ruby #{} fixes.
Class methods
Standard PHP test-source conventions:
/Tests/— PSR-4 / Symfony convention (src/Symfony/Bundle/FrameworkBundle/Tests/...)/tests/— Laravel / CakePHP / PHPUnit default*Test.phpfilename — PHPUnit suffix convention*Tests.phpfilename — pluralized variant (rare)
symfony/symfony's own repo accounts for ~63 phantom endpoints
under src/Symfony/Bundle/FrameworkBundle/Tests/.... The
conventions are unambiguous — production routing never adopts
any of them.
Takes the scan-base-relative path (Analyzer#base_relative_path),
never the absolute one. The conventions describe a location inside
the project, so matching the absolute path handed the decision to
whatever directory the checkout happened to live in: the same tree
scanned from ~/work/tests/myapp reported 0 endpoints instead of
235.