Skip to content

[PHP] fix: canonicalize cwd after chdir#741

Open
brandonpayton wants to merge 1 commit into
integration/kd-6nz-php-phpt-harness-only-basefrom
gascity/kd-6nz/split-pr717-canonicalize-cwd-after-chdir
Open

[PHP] fix: canonicalize cwd after chdir#741
brandonpayton wants to merge 1 commit into
integration/kd-6nz-php-phpt-harness-only-basefrom
gascity/kd-6nz/split-pr717-canonicalize-cwd-after-chdir

Conversation

@brandonpayton

Copy link
Copy Markdown
Member

Supersedes fork-headed PR #721. This replacement keeps the same head commit (429390c8d27dc5fb46c9b47208e7bbf6a3e7513c) but moves the PR head onto an Automattic/kandelo branch.

Why this is needed

PHP PHPTs exercise chdir() and relative path resolution heavily. If Kandelo preserves a non-canonical current working directory after chdir, later file operations can resolve through a stale or syntactically different path than PHP expects.

Why this shape makes sense

The fix belongs in cwd handling, not in the PHPT harness. PHP is relying on normal POSIX path behavior, and other packages will hit the same class of bug whenever they mix chdir() with relative paths.

Why this is the correct fix

Canonicalizing cwd after directory changes keeps process state internally consistent and makes subsequent path resolution deterministic. That addresses the runtime invariant directly instead of papering over individual PHP tests.

Verification

Branch-location correction only; replacement head SHA matches #721 exactly.

(cherry picked from commit 02deaca)
(cherry picked from commit 6c459b8)
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.

1 participant