Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POC][WIP] Pack recipes #917

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Configurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public function populateUpdate(RecipeUpdate $recipeUpdate): void

public function unconfigure(Recipe $recipe, Lock $lock)
{
if ('kbond/homepage-scaffold' === $recipe->getPackage()->getName()) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not figure out how to determine if the recipe is a pack or not here. $recipe->getPackage()->getType === null.

return;
}

$manifest = $recipe->getManifest();
foreach (array_keys($this->configurators) as $key) {
if (isset($manifest[$key])) {
Expand Down
8 changes: 0 additions & 8 deletions src/Unpacker.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@ public function unpack(Operation $op, Result $result = null, &$links = [], bool
}
$devRequires = $pkg->getDevRequires();

foreach ($devRequires as $i => $link) {
if (!isset($requires[$link->getTarget()])) {
throw new \RuntimeException(sprintf('Symfony pack "%s" must duplicate all entries from "require-dev" into "require" but entry "%s" was not found.', $package['name'], $link->getTarget()));
}
$devRequires[$i] = $requires[$link->getTarget()];
unset($requires[$link->getTarget()]);
}

$versionSelector = null;
foreach ([$requires, $devRequires] as $dev => $requires) {
$dev = $dev ?: $devRequire ?: $package['dev'];
Expand Down