Skip to content

Commit 97354d5

Browse files
committed
Spread information about argument's projectDir deprecation
1 parent 9238bf7 commit 97354d5

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

UPGRADE-7.3.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,8 @@ VarDumper
109109

110110
* Deprecate `ResourceCaster::castCurl()`, `ResourceCaster::castGd()` and `ResourceCaster::castOpensslX509()`
111111
* Mark all casters as `@internal`
112+
113+
AssetMapper
114+
-----------
115+
116+
* Deprecated passing null to `ImportMapRequireCommand` constructor argument `projectDir`

src/Symfony/Component/AssetMapper/CHANGELOG.md

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

77
* Add support for pre-compressing assets with Brotli, Zstandard, Zopfli, and gzip
88
* Add option `--dry-run` to `importmap:require` command
9+
* Deprecated passing null to `ImportMapRequireCommand` constructor argument `projectDir`
910

1011
7.2
1112
---

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,13 @@ final class ImportMapRequireCommand extends Command
3333
{
3434
use VersionProblemCommandTrait;
3535

36-
private readonly string $projectDir;
37-
3836
public function __construct(
3937
private readonly ImportMapManager $importMapManager,
4038
private readonly ImportMapVersionChecker $importMapVersionChecker,
41-
/* private readonly string $projectDir, */
39+
private readonly ?string $projectDir = null,
4240
) {
43-
if (\func_num_args() < 3) {
41+
if (null === $projectDir) {
4442
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__);
45-
} else {
46-
$this->projectDir = func_get_arg(2);
4743
}
4844

4945
parent::__construct();

0 commit comments

Comments
 (0)