Skip to content

Commit bb543a0

Browse files
Merge branch '6.4' into 7.2
* 6.4: [Routing] Add test to validate that default value is allowed to not match requirement fix handling required options Fix @var phpdoc [Lock] [MongoDB] Enforce readPreference=primary and writeConcern=majority [FrameworkBundle] fix phpdoc in `MicroKernelTrait` Fixed validator translations for Albanian
2 parents f1e3356 + 3c9cdc6 commit bb543a0

File tree

44 files changed

+305
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+305
-103
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'@PHPUnit75Migration:risky' => true,
3131
'@Symfony' => true,
3232
'@Symfony:risky' => true,
33+
'phpdoc_var_annotation_correct_order' => true,
3334
'protected_to_private' => false,
3435
'header_comment' => ['header' => $fileHeaderComment],
3536
])

src/Symfony/Bridge/Twig/Extension/FormExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ private function createFieldChoicesList(iterable $choices, string|false|null $tr
155155
continue;
156156
}
157157

158-
/* @var ChoiceView $choice */
158+
/** @var ChoiceView $choice */
159159
$translatableLabel = $this->createFieldTranslation($choice->label, $choice->labelTranslationParameters, $translationDomain);
160160
yield $translatableLabel => $choice->value;
161161
}

src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
182182
}
183183

184184
$file = (new \ReflectionObject($this))->getFileName();
185-
/* @var ContainerPhpFileLoader $kernelLoader */
185+
/** @var ContainerPhpFileLoader $kernelLoader */
186186
$kernelLoader = $loader->getResolver()->resolve($file);
187187
$kernelLoader->setCurrentDir(\dirname($file));
188188
$instanceof = &\Closure::bind(fn &() => $this->instanceof, $kernelLoader, $kernelLoader)();
@@ -208,7 +208,7 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
208208
public function loadRoutes(LoaderInterface $loader): RouteCollection
209209
{
210210
$file = (new \ReflectionObject($this))->getFileName();
211-
/* @var RoutingPhpFileLoader $kernelLoader */
211+
/** @var RoutingPhpFileLoader $kernelLoader */
212212
$kernelLoader = $loader->getResolver()->resolve($file, 'php');
213213
$kernelLoader->setCurrentDir(\dirname($file));
214214
$collection = new RouteCollection();

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function testFile()
233233
$controller = $this->createController();
234234
$controller->setContainer($container);
235235

236-
/* @var BinaryFileResponse $response */
236+
/** @var BinaryFileResponse $response */
237237
$response = $controller->file(new File(__FILE__));
238238
$this->assertInstanceOf(BinaryFileResponse::class, $response);
239239
$this->assertSame(200, $response->getStatusCode());
@@ -248,7 +248,7 @@ public function testFileAsInline()
248248
{
249249
$controller = $this->createController();
250250

251-
/* @var BinaryFileResponse $response */
251+
/** @var BinaryFileResponse $response */
252252
$response = $controller->file(new File(__FILE__), null, ResponseHeaderBag::DISPOSITION_INLINE);
253253

254254
$this->assertInstanceOf(BinaryFileResponse::class, $response);
@@ -264,7 +264,7 @@ public function testFileWithOwnFileName()
264264
{
265265
$controller = $this->createController();
266266

267-
/* @var BinaryFileResponse $response */
267+
/** @var BinaryFileResponse $response */
268268
$fileName = 'test.php';
269269
$response = $controller->file(new File(__FILE__), $fileName);
270270

@@ -281,7 +281,7 @@ public function testFileWithOwnFileNameAsInline()
281281
{
282282
$controller = $this->createController();
283283

284-
/* @var BinaryFileResponse $response */
284+
/** @var BinaryFileResponse $response */
285285
$fileName = 'test.php';
286286
$response = $controller->file(new File(__FILE__), $fileName, ResponseHeaderBag::DISPOSITION_INLINE);
287287

@@ -298,7 +298,7 @@ public function testFileFromPath()
298298
{
299299
$controller = $this->createController();
300300

301-
/* @var BinaryFileResponse $response */
301+
/** @var BinaryFileResponse $response */
302302
$response = $controller->file(__FILE__);
303303

304304
$this->assertInstanceOf(BinaryFileResponse::class, $response);
@@ -314,7 +314,7 @@ public function testFileFromPathWithCustomizedFileName()
314314
{
315315
$controller = $this->createController();
316316

317-
/* @var BinaryFileResponse $response */
317+
/** @var BinaryFileResponse $response */
318318
$response = $controller->file(__FILE__, 'test.php');
319319

320320
$this->assertInstanceOf(BinaryFileResponse::class, $response);

src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function downloadPackages(array $importMapEntries, ?callable $progressCal
196196

197197
$dependencies = [];
198198
$extraFiles = [];
199-
/* @var ImportMapEntry $entry */
199+
/** @var ImportMapEntry $entry */
200200
$contents[$package] = [
201201
'content' => $this->makeImportsBare($response->getContent(), $dependencies, $extraFiles, $entry->type, $entry->getPackagePathString()),
202202
'dependencies' => $dependencies,

src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public function testUpdateAll()
248248
->method('resolvePackages')
249249
->with($this->callback(function ($packages) {
250250
$this->assertInstanceOf(PackageRequireOptions::class, $packages[0]);
251-
/* @var PackageRequireOptions[] $packages */
251+
/** @var PackageRequireOptions[] $packages */
252252
$this->assertCount(2, $packages);
253253

254254
$this->assertSame('lodash', $packages[0]->packageModuleSpecifier);

src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function testInlineStyleOptions(string $tag, ?string $expected = null, ?s
177177
$expected = $tag.$input.'</'.$styleString.'>';
178178
$this->assertSame($expected, $formatter->format($expected));
179179
} else {
180-
/* @var OutputFormatterStyle $result */
180+
/** @var OutputFormatterStyle $result */
181181
$this->assertInstanceOf(OutputFormatterStyle::class, $result);
182182
$this->assertSame($expected, $formatter->format($tag.$input.'</>'));
183183
$this->assertSame($expected, $formatter->format($tag.$input.'</'.$styleString.'>'));

src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ public function testAddObjectResource()
11361136

11371137
$this->assertCount(1, $resources);
11381138

1139-
/* @var FileResource $resource */
1139+
/** @var FileResource $resource */
11401140
$resource = end($resources);
11411141

11421142
$this->assertInstanceOf(FileResource::class, $resource);

src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function validate(mixed $form, Constraint $formConstraint): void
3939
return;
4040
}
4141

42-
/* @var FormInterface $form */
42+
/** @var FormInterface $form */
4343
$config = $form->getConfig();
4444

4545
$validator = $this->context->getValidator()->inContext($this->context);

src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(
4040
// the DIC, where the XML file is loaded automatically. Thus the following
4141
// code must be kept synchronized with validation.xml
4242

43-
/* @var ClassMetadata $metadata */
43+
/** @var ClassMetadata $metadata */
4444
$metadata->addConstraint(new Form());
4545
$metadata->addConstraint(new Traverse(false));
4646
}

0 commit comments

Comments
 (0)