Resolve mounted paths through workspace refs#797
Merged
Conversation
Contributor
Homeboy Results —
|
PHPStan level 7 flagged two errors on this PR's diff: - MountedRuntimeBootstrap::mounted_workspace_path_aliases(): the mount shape guarantees a non-null 'path' string, so the ?? '' fallback was a redundant null-coalesce. - WorkspaceAbilities::mounted_workspace_path_aliases(): the callee returns array<string,string>, so the is_array() guard always evaluated to true. Drop both redundant guards to get the Lint check green.
0d15f35 to
f733c22
Compare
The streaming read path in WorkspaceReader uses fopen/fread/fclose for bounded/offset reads (WP_Filesystem has no streaming API). The existing phpcs:ignore on fopen referenced the wrong sniff code (file_system_read_fopen) and the fread/fclose calls had no ignore at all, so PHPCS flagged 6 file_system_operations warnings that failed Lint. Correct the fopen code and annotate the fread/fclose calls with the exact reported sniff codes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
php tests/smoke-workspace-file-policy.phpphp tests/mounted-runtime-context.phpphp tests/mounted-workspace-path-alias.phpgit diff --checkAI assistance