mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 06:18:44 +02:00
N°9319 increase php min. version to 8.2 (#887)
* Update minimum PHP version to 8.2 * Fix previous wrong resolution of merge conflict
This commit is contained in:
@@ -39,17 +39,23 @@ class ValidatorExtension extends AbstractExtension
|
||||
/** @var ClassMetadata $metadata */
|
||||
$metadata = $validator->getMetadataFor(\Symfony\Component\Form\Form::class);
|
||||
|
||||
$this->validator = $validator;
|
||||
$this->formRenderer = $formRenderer;
|
||||
$this->translator = $translator;
|
||||
|
||||
// Register the form constraints in the validator programmatically.
|
||||
// This functionality is required when using the Form component without
|
||||
// the DIC, where the XML file is loaded automatically. Thus the following
|
||||
// code must be kept synchronized with validation.xml
|
||||
|
||||
foreach ($metadata->getConstraints() as $constraint) {
|
||||
if ($constraint instanceof Form) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$metadata->addConstraint(new Form());
|
||||
$metadata->addConstraint(new Traverse(false));
|
||||
|
||||
$this->validator = $validator;
|
||||
$this->formRenderer = $formRenderer;
|
||||
$this->translator = $translator;
|
||||
}
|
||||
|
||||
public function loadTypeGuesser(): ?FormTypeGuesserInterface
|
||||
|
||||
Reference in New Issue
Block a user