Skip to content

Commit 4f6a482

Browse files
committed
whooops, we still need this
1 parent 19b9fb9 commit 4f6a482

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/Test/MakerTestDetails.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function addExtraDependencies(string ...$packages): self
6666

6767
public function setRequiredPhpVersion(int $version): self
6868
{
69-
@trigger_deprecation('symfony/maker-bundle', '0.0.0', 'setRequiredPhpVersion() is no longer used and will be removed in a future version.');
69+
@trigger_deprecation('symfony/maker-bundle', 'v1.44.0', 'setRequiredPhpVersion() is no longer used and will be removed in a future version.');
7070

7171
$this->requiredPhpVersion = $version;
7272

src/Test/MakerTestRunner.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,27 @@ public function copy(string $source, string $destination)
6666

6767
/**
6868
* When using an authenticator "fixtures" file, this adjusts it to support Symfony 5.2/5.3.
69+
*
70+
* @deprecated Legacy PassportInterface support will be dropped in a future version.
6971
*/
7072
public function adjustAuthenticatorForLegacyPassportInterface(string $filename): void
7173
{
74+
// no adjustment needed on 5.4 and higher
75+
if ($this->getSymfonyVersion() >= 50400) {
76+
return;
77+
}
78+
79+
$this->replaceInFile(
80+
$filename,
81+
'\\Passport;',
82+
"\\Passport;\nuse Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;"
83+
);
84+
85+
$this->replaceInFile(
86+
$filename,
87+
': Passport',
88+
': PassportInterface'
89+
);
7290
}
7391

7492
public function renderTemplateFile(string $source, string $destination, array $variables): void

0 commit comments

Comments
 (0)