Skip to content

Commit 02e28c4

Browse files
[AssetMapper] Make argument $projectDir of ImportMapRequireCommand mandatory
1 parent 8dd2c5c commit 02e28c4

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/Symfony/Component/AssetMapper/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Remove `ImportMapConfigReader::splitPackageNameAndFilePath()`, use `ImportMapEntry::splitPackageNameAndFilePath()` instead
8+
* Make argument `$projectDir` of `ImportMapRequireCommand` mandatory
89

910
7.3
1011
---

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,8 @@ final class ImportMapRequireCommand extends Command
3636
public function __construct(
3737
private readonly ImportMapManager $importMapManager,
3838
private readonly ImportMapVersionChecker $importMapVersionChecker,
39-
private readonly ?string $projectDir = null,
39+
private readonly string $projectDir,
4040
) {
41-
if (null === $projectDir) {
42-
trigger_deprecation('symfony/asset-mapper', '7.3', 'The "%s()" method will have a new `string $projectDir` argument in version 8.0, not defining it is deprecated.', __METHOD__);
43-
}
44-
4541
parent::__construct();
4642
}
4743

@@ -149,9 +145,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
149145
array_map(fn (ImportMapEntry $package): array => [
150146
$package->importName,
151147
$package->version ?? '-',
152-
// BC layer for AssetMapper < 7.3
153-
// When `projectDir` is not null, we use the absolute path of the package
154-
null !== $this->projectDir ? Path::makeRelative($package->path, $this->projectDir) : $package->path,
148+
Path::makeRelative($package->path, $this->projectDir),
155149
], $newPackages),
156150
);
157151
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy