Skip to content

Web: PATH_INFO and front-controller routing (#121)#133

Merged
PurHur merged 1 commit into
masterfrom
issue-121-path-info
May 18, 2026
Merged

Web: PATH_INFO and front-controller routing (#121)#133
PurHur merged 1 commit into
masterfrom
issue-121-path-info

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 18, 2026

Summary

  • Populate $_SERVER['PATH_INFO'] in Superglobals::populateServer() by deriving from REQUEST_URI minus SCRIPT_NAME, or from the CGI PATH_INFO env var when set
  • Update bin/serve.php to route /index.php/foo/bar to the script with PATH_INFO /foo/bar
  • Add PHPT tests web_path_info.phpt and web_path_info_cgi_env.phpt

Closes #121

Test plan

  • vendor/bin/phpunit test/real/RealWorldTest.php — 34/34 pass
  • script/ci-local.sh (full suite) on maintainer host

Made with Cursor

Derive PATH_INFO from REQUEST_URI minus SCRIPT_NAME in Superglobals,
honor CGI PATH_INFO env, route /script.php/path in bin/serve.php, and
add PHPT coverage for VM web tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit d1902e0 into master May 18, 2026
@PurHur PurHur deleted the issue-121-path-info branch May 18, 2026 15:33
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.

Web: PATH_INFO and front-controller routing ($_SERVER)

1 participant