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
This commit is contained in:
Nicolas Grekas
2025-07-15 13:30:57 +02:00
6 changed files with 7 additions and 7 deletions

View File

@@ -39,7 +39,7 @@ class FormValidator extends ConstraintValidator
return;
}
/* @var FormInterface $form */
/** @var FormInterface $form */
$config = $form->getConfig();
$validator = $this->context->getValidator()->inContext($this->context);

View File

@@ -40,7 +40,7 @@ class ValidatorExtension extends AbstractExtension
// the DIC, where the XML file is loaded automatically. Thus the following
// code must be kept synchronized with validation.xml
/* @var ClassMetadata $metadata */
/** @var ClassMetadata $metadata */
$metadata->addConstraint(new Form());
$metadata->addConstraint(new Traverse(false));
}

View File

@@ -248,7 +248,7 @@ class ViolationMapper implements ViolationMapperInterface
// Test mapping rules as long as we have any
foreach ($rules as $key => $rule) {
/* @var MappingRule $rule */
/** @var MappingRule $rule */
// Mapping rule matches completely, terminate.
if (null !== ($form = $rule->match($chunk))) {
@@ -312,7 +312,7 @@ class ViolationMapper implements ViolationMapperInterface
// Cut the piece out of the property path and proceed
$propertyPathBuilder->remove($i);
} else {
/* @var \Symfony\Component\PropertyAccess\PropertyPathInterface $propertyPath */
/** @var \Symfony\Component\PropertyAccess\PropertyPathInterface $propertyPath */
$propertyPath = $scope->getPropertyPath();
if (null === $propertyPath) {

View File

@@ -76,7 +76,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
if ($error instanceof FormError) {
$string .= 'ERROR: '.$error->getMessage()."\n";
} else {
/* @var self $error */
/** @var self $error */
$string .= $error->getForm()->getName().":\n";
$string .= self::indent((string) $error);
}

View File

@@ -118,7 +118,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface
$this->innerType->finishView($view, $form, $options);
foreach ($this->typeExtensions as $extension) {
/* @var FormTypeExtensionInterface $extension */
/** @var FormTypeExtensionInterface $extension */
$extension->finishView($view, $form, $options);
}
}

View File

@@ -1052,7 +1052,7 @@ class SimpleFormTest extends TestCase
$config = $this->getBuilder()->setData('DEFAULT')->getFormConfig();
$form = new Form($config);
/* @var Form $form */
/** @var Form $form */
$form->initialize();
$this->assertSame('DEFAULT', $form->getData());