Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6042c00

Browse files
committed
bug#50215 [AssetMapper] Fixing wrong values being output in command (weaverryan)
This PR was merged into the 6.3 branch.Discussion----------[AssetMapper] Fixing wrong values being output in command| Q | A| ------------- | ---| Branch? | 6.3| Bug fix? | yes| New feature? | no| Deprecations? | none| Tickets | None| License | MIT| Doc PR | Not neededA leftover from working on the component. `$newPackages` is an indexed array of `ImportMapEntry`. So, before this, the message would output "new packages (0, 1)". Now:<img width="966" alt="Screenshot 2023-05-02 at 12 59 12 PM" src="https://user-images.githubusercontent.com/121003/235734153-93050033-9fc2-4ebe-9258-60d92400a081.png">Cheers!Commits-------50a4aaf [AssetMapper] Fixing wrong values being output in command
2 parents22a932e +50a4aaf commit6042c00

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/Symfony/Component/AssetMapper/Command/ImportMapRequireCommand.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
useSymfony\Bundle\FrameworkBundle\Console\Application;
1515
useSymfony\Component\AssetMapper\AssetMapperInterface;
16+
useSymfony\Component\AssetMapper\ImportMap\ImportMapEntry;
1617
useSymfony\Component\AssetMapper\ImportMap\ImportMapManager;
1718
useSymfony\Component\AssetMapper\ImportMap\PackageRequireOptions;
1819
useSymfony\Component\Console\Attribute\AsCommand;
@@ -95,7 +96,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9596

9697
$message .='.';
9798
}else {
98-
$message =sprintf('%d new packages (%s) added to the importmap.php!',\count($newPackages),implode(',',array_keys($newPackages)));
99+
$names =array_map(fn (ImportMapEntry$package) =>$package->importName,$newPackages);
100+
$message =sprintf('%d new packages (%s) added to the importmap.php!',\count($newPackages),implode(',',$names));
99101
}
100102

101103
$messages = [$message];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp