Skip to content

Commit ab0453b

Browse files
committed
bug #941 [recipes:update] Only requiring PackageInterface (weaverryan)
This PR was merged into the 1.x branch. Discussion ---------- [recipes:update] Only requiring PackageInterface Hi! Reported by a user: https://symfonycasts.com/screencast/symfony6-upgrade/upgrade-recipes2#comment-5935097254 Sometimes we end up with `CompleteAliasPackage` objects, which implement `PackageInterface`, but do not extend `Package`. Really, we never needed anything beyond `PackageInterface` as far as I can see, Cheers! Commits ------- 3d45510 only requiring PackageInterface
2 parents d87e0bb + 3d45510 commit ab0453b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Command/UpdateRecipesCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
use Composer\Command\BaseCommand;
1515
use Composer\IO\IOInterface;
1616
use Composer\Package\Package;
17+
use Composer\Package\PackageInterface;
1718
use Composer\Util\ProcessExecutor;
1819
use Symfony\Component\Console\Exception\RuntimeException;
19-
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
2020
use Symfony\Component\Console\Input\InputArgument;
2121
use Symfony\Component\Console\Input\InputInterface;
2222
use Symfony\Component\Console\Output\OutputInterface;
@@ -262,7 +262,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
262262
return 0;
263263
}
264264

265-
private function getRecipe(Package $package, string $recipeRef = null, string $recipeVersion = null): ?Recipe
265+
private function getRecipe(PackageInterface $package, string $recipeRef = null, string $recipeVersion = null): ?Recipe
266266
{
267267
$operation = new InformationOperation($package);
268268
if (null !== $recipeRef) {

0 commit comments

Comments
 (0)