Skip to content

Commit 7c9aef4

Browse files
authored
Merge pull request #786 from Seldaek/patch-2
Fix handling of wildcards without slash in update command
2 parents c260522 + 49bf9e6 commit 7c9aef4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PackageResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function resolve(array $arguments = [], bool $isRequire = false): array
4747
// second pass to resolve package names
4848
$packages = [];
4949
foreach ($explodedArguments as $i => $argument) {
50-
if (false === strpos($argument, '/') && !preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $argument) && !\in_array($argument, ['mirrors', 'nothing'])) {
50+
if (false === strpos($argument, '/') && !preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $argument) && !preg_match('{(?<=[a-z0-9_/-])\*|\*(?=[a-z0-9_/-])}i', $argument) && !\in_array($argument, ['mirrors', 'nothing'])) {
5151
if (null === self::$aliases) {
5252
self::$aliases = $this->downloader->get('/aliases.json')->getBody();
5353
}

0 commit comments

Comments
 (0)