Repository navigation
fix(lang-php): scope Composer PSR-4 to the importing application - #774
Merged
Merged
Conversation
Bind PSR-4 rules to the closest Composer manifest and reachable local path dependencies. Closes #762
This was referenced Dec 2, 2026
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
Resolve PHP PSR-4 imports using the closest Composer manifest and its declared local path dependencies.
Workspace packages can resolve declared dependencies made available by an enclosing workspace.
Shared packages retain every target that their consuming applications resolve.
Closes #762
Tier
Tier 2 from
cargo xtask risk-tier --base origin/main, the default for the PHP plugin and CLI test paths.Task
b/main.phptob/src/Service.php.a/src/Service.phpdisconnected.Fail-first test
trace_resolves_php_psr4_in_the_importing_application,trace_resolves_php_psr4_through_declared_path_dependencies, andtrace_keeps_php_psr4_targets_from_each_consuming_application.2910ef78):0 passed; 2 failed. The CLI reportedb/main.php -> a/src/Service.phpandNo runtime import path from b/main.php to b/src/Service.php. It also found a path to the undeclaredpackages/other/src/Extra.php.3 passed; 0 failed.1 passed; 2 failed.Checks
52112b28dffe77adand52112b28(3 PHP trace tests rerun independently after the refactor).52112b28Safety proof
acme/authclass from a sibling workspace package.interrogate: Not run below Tier 3.Runtime evidence
PASS for the trace feature map at
52112b28.Run
cargo test --locked -p codeint --test integration php_psr4against the isolated PHP repositories.The CLI reported
b/main.php -> b/src/Service.phpandNo runtime import path from b/main.php to a/src/Service.php.The test also checks the graph through the CLI's structured
pathsandconnectedoutput.Each test removes its temporary repository.
Metric effects on unchanged code
0.6667to0).0.5to0).0.3333, Finding ID7f9f19759dc6ca20tof5128112a45409eb).1to0).0to0.3333).0to0.3333).The combined follow-up for #757 through #763 will increment each affected Metric version once, following ADR 0044.
Gaps