Repository navigation
Read package dependencies as the traversal visits them - #1308
Closed
andreybolonin wants to merge 2 commits into
Closed
andreybolonin wants to merge 2 commits into
andreybolonin wants to merge 2 commits into
Conversation
4 tasks done
crazywhalecc
approved these changes
Nov 28, 2026
henderkes
requested changes
Nov 29, 2026
| private static function visitSubDeps( | ||
| string $pkg_name, | ||
| array $dep_map, | ||
| array $dependency_overrides, |
Collaborator
There was a problem hiding this comment.
as far as I can see this functionality is not even needed?
Cover a FrankenPHP root that reaches PHP transitively. Its linker flags must still include the libraries of PHP's static extensions and virtual SAPIs.
Author
|
@henderkes you dont understand the point of this PR? |
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.
What does this PR do?
getSubDependencies()andgetResolvedPackageClosure()currently build a dependency map for the entire resolved package set on every call. Read dependency fields when the traversal visits a package. The traversal still filters edges through the resolved set and retains the ordering of required dependencies, overrides, and suggestions.This applies to link dependency lookup in the framework on all supported platforms. The package configuration format, recipes, toolchains, and public CLI behavior stay the same. The regression test covers overrides on a transitive dependency, filtering an override outside the resolved set, and deduplication across roots.
On macOS arm64 with PHP 8.6.0, a benchmark using the built-in registry and a PHP build graph with eight extensions reduced the median time for 8,000 closure queries from 387 ms to 190 ms (−51%). Median peak RSS went from 40.61 to 40.56 MiB. The incremental peak PHP heap dropped from 26.8 to 8.5 KiB. Baseline and candidate returned identical results in the benchmark.
Checklist before merging
composer cs-fixcomposer analysecomposer testbin/spc dev:lint-configThe benchmark isolates dependency lookup. Full static builds and other host platforms were outside local validation. Documentation updates are unnecessary because the lookup behavior stays the same.