Skip to content

Commit 45f2644

Browse files
committed
-
1 parent 19bafc0 commit 45f2644

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/Command/UnpackCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function configure()
3939
$this->setName('unpack')
4040
->setDescription('Unpack a Symfony pack.')
4141
->setDefinition(array(
42-
new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Installed packages to unpack"'),
42+
new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Installed packages to unpack.'),
4343
new InputOption('sort-packages', null, InputOption::VALUE_NONE, 'Sorts packages'),
4444
))
4545
;

src/Unpacker.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,12 @@ public function unpack(Operation $op): Result
3838
foreach ($op->getPackages() as $package) {
3939
$pkg = $this->composer->getRepositoryManager()->findPackage($package['name'], $package['version'] ?: '*');
4040

41-
// force unpack on profiles + add dev deps
42-
if ('symfony-profile' === $pkg->getType()) {
43-
foreach ($pkg->getDevRequires() as $link) {
44-
if (!$manipulator->addLink('require-dev', $link->getTarget(), $link->getPrettyConstraint(), $op->shouldSort())) {
45-
throw new \RuntimeException(sprintf('Unable to unpack package "%s".', $link->getTarget()));
46-
}
47-
}
48-
} elseif (
41+
// not unpackable or no --unpack flag or empty packs (markers)
42+
if (
4943
'symfony-pack' !== $pkg->getType() ||
5044
!$op->shouldUnpack() ||
5145
0 === count($pkg->getRequires()) + count($pkg->getDevRequires())
5246
) {
53-
// not unpackable or no --unpack flag or empty packs (markers)
5447
$result->addRequired($package['name'].($package['version'] ? ':'.$package['version'] : ''));
5548

5649
continue;

0 commit comments

Comments
 (0)