This repository has been archived by the owner on Jan 16, 2025. It is now read-only.
Collect and expose all collected dependencies (core change) #49361
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.
This adds a new class method
@@collected_dependencies
toDependencyCollector
and exposes them via a class methodcollected_dependencies
.We need this change for the Homebrew PHP tap. See Homebrew/homebrew-php#2889.
The PHP tap has a
PhpMetaRequirement
that works as a "just depend on any of the php versions"-dependency.Unfortunately it currently can only work flawlessly if one of the php versions has already been installed and linked. If no PHP version has been installed yet it will fallback to
default_package php56
.This is a problem for packages like phan which depends on
php70
. Since no php version is installedPhpMetaRequirement
will fallback tophp56
. And since two different php versions can't be linked at the same time the install will fail. This happens very when @BrewTestBot is testing formulas in the PHP tap.To work around this we need to know all the dependencies collected by
DependencyCollector
.See Homebrew/homebrew-php#2889 for the change in Homebrew-PHP that will take advantage of this feature and the discussion around it.
All Submissions:
Changes to Homebrew's Core:
brew tests
with your changes locally?