Skip to content

Commit 9b88b14

Browse files
Merge branch '5.4' into 6.3
* 5.4: Fix implicitly-required parameters List CS fix in .git-blame-ignore-revs Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2 parents a4d5e97 + 23e7060 commit 9b88b14

30 files changed

+48
-48
lines changed

AppVariable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function getLocale(): string
161161
* * getFlashes('notice') returns a simple array with flash messages of that type
162162
* * getFlashes(['notice', 'error']) returns a nested array of type => messages.
163163
*/
164-
public function getFlashes(string|array $types = null): array
164+
public function getFlashes(string|array|null $types = null): array
165165
{
166166
try {
167167
if (null === $session = $this->getSession()) {

Command/DebugCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class DebugCommand extends Command
4848

4949
private ?FileLinkFormatter $fileLinkFormatter;
5050

51-
public function __construct(Environment $twig, string $projectDir = null, array $bundlesMetadata = [], string $twigDefaultPath = null, FileLinkFormatter $fileLinkFormatter = null)
51+
public function __construct(Environment $twig, ?string $projectDir = null, array $bundlesMetadata = [], ?string $twigDefaultPath = null, ?FileLinkFormatter $fileLinkFormatter = null)
5252
{
5353
parent::__construct();
5454

@@ -217,7 +217,7 @@ private function displayPathsJson(SymfonyStyle $io, string $name): void
217217
$io->writeln(json_encode($data));
218218
}
219219

220-
private function displayGeneralText(SymfonyStyle $io, string $filter = null): void
220+
private function displayGeneralText(SymfonyStyle $io, ?string $filter = null): void
221221
{
222222
$decorated = $io->isDecorated();
223223
$types = ['functions', 'filters', 'tests', 'globals'];
@@ -279,7 +279,7 @@ private function displayGeneralJson(SymfonyStyle $io, ?string $filter): void
279279
$io->writeln($decorated ? OutputFormatter::escape($data) : $data);
280280
}
281281

282-
private function getLoaderPaths(string $name = null): array
282+
private function getLoaderPaths(?string $name = null): array
283283
{
284284
$loaderPaths = [];
285285
foreach ($this->getFilesystemLoaders() as $loader) {

Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private function displayJson(OutputInterface $output, array $filesInfo): int
224224
return min($errors, 1);
225225
}
226226

227-
private function renderException(SymfonyStyle $output, string $template, Error $exception, string $file = null, GithubActionReporter $githubReporter = null): void
227+
private function renderException(SymfonyStyle $output, string $template, Error $exception, ?string $file = null, ?GithubActionReporter $githubReporter = null): void
228228
{
229229
$line = $exception->getTemplateLine();
230230

DataCollector/TwigDataCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ class TwigDataCollector extends DataCollector implements LateDataCollectorInterf
3232
private ?Environment $twig;
3333
private array $computed;
3434

35-
public function __construct(Profile $profile, Environment $twig = null)
35+
public function __construct(Profile $profile, ?Environment $twig = null)
3636
{
3737
$this->profile = $profile;
3838
$this->twig = $twig;
3939
}
4040

41-
public function collect(Request $request, Response $response, \Throwable $exception = null): void
41+
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
4242
{
4343
}
4444

ErrorRenderer/TwigErrorRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class TwigErrorRenderer implements ErrorRendererInterface
3232
/**
3333
* @param bool|callable $debug The debugging mode as a boolean or a callable that should return it
3434
*/
35-
public function __construct(Environment $twig, HtmlErrorRenderer $fallbackErrorRenderer = null, bool|callable $debug = false)
35+
public function __construct(Environment $twig, ?HtmlErrorRenderer $fallbackErrorRenderer = null, bool|callable $debug = false)
3636
{
3737
$this->twig = $twig;
3838
$this->fallbackErrorRenderer = $fallbackErrorRenderer ?? new HtmlErrorRenderer();

Extension/AssetExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ public function getFunctions(): array
4343
* If the package used to generate the path is an instance of
4444
* UrlPackage, you will always get a URL and not a path.
4545
*/
46-
public function getAssetUrl(string $path, string $packageName = null): string
46+
public function getAssetUrl(string $path, ?string $packageName = null): string
4747
{
4848
return $this->packages->getUrl($path, $packageName);
4949
}
5050

5151
/**
5252
* Returns the version of an asset.
5353
*/
54-
public function getAssetVersion(string $path, string $packageName = null): string
54+
public function getAssetVersion(string $path, ?string $packageName = null): string
5555
{
5656
return $this->packages->getVersion($path, $packageName);
5757
}

Extension/CodeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function fileExcerpt(string $file, int $line, int $srcContext = 3): ?stri
154154
/**
155155
* Formats a file path.
156156
*/
157-
public function formatFile(string $file, int $line, string $text = null): string
157+
public function formatFile(string $file, int $line, ?string $text = null): string
158158
{
159159
$file = trim($file);
160160

Extension/DumpExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class DumpExtension extends AbstractExtension
2929
private ClonerInterface $cloner;
3030
private ?HtmlDumper $dumper;
3131

32-
public function __construct(ClonerInterface $cloner, HtmlDumper $dumper = null)
32+
public function __construct(ClonerInterface $cloner, ?HtmlDumper $dumper = null)
3333
{
3434
$this->cloner = $cloner;
3535
$this->dumper = $dumper;

Extension/FormExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ final class FormExtension extends AbstractExtension
3535
{
3636
private ?TranslatorInterface $translator;
3737

38-
public function __construct(TranslatorInterface $translator = null)
38+
public function __construct(?TranslatorInterface $translator = null)
3939
{
4040
$this->translator = $translator;
4141
}

Extension/HtmlSanitizerExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function getFilters(): array
3333
];
3434
}
3535

36-
public function sanitize(string $html, string $sanitizer = null): string
36+
public function sanitize(string $html, ?string $sanitizer = null): string
3737
{
3838
return $this->sanitizers->get($sanitizer ?? $this->defaultSanitizer)->sanitize($html);
3939
}

0 commit comments

Comments
 (0)