mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-23 09:59:34 +00:00
Ran rector to convert some our twig extensions to use #[AsTwigXX] attributes
This commit is contained in:
parent
c8b1320bb9
commit
f69b0889eb
11 changed files with 34 additions and 67 deletions
|
|
@ -122,9 +122,7 @@ class AttachmentFormType extends AbstractType
|
|||
],
|
||||
'constraints' => [
|
||||
//new AllowedFileExtension(),
|
||||
new File([
|
||||
'maxSize' => $options['max_file_size'],
|
||||
]),
|
||||
new File(maxSize: $options['max_file_size']),
|
||||
],
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class FieldToProviderMappingType extends AbstractType
|
|||
'style' => 'width: 80px;'
|
||||
],
|
||||
'constraints' => [
|
||||
new Range(['min' => 1, 'max' => 10]),
|
||||
new Range(min: 1, max: 10),
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,10 +177,7 @@ class UserAdminForm extends AbstractType
|
|||
'required' => false,
|
||||
'mapped' => false,
|
||||
'disabled' => !$this->security->isGranted('set_password', $entity) || $entity->isSamlUser(),
|
||||
'constraints' => [new Length([
|
||||
'min' => 6,
|
||||
'max' => 128,
|
||||
])],
|
||||
'constraints' => [new Length(min: 6, max: 128)],
|
||||
])
|
||||
|
||||
->add('need_pw_change', CheckboxType::class, [
|
||||
|
|
|
|||
|
|
@ -92,9 +92,7 @@ class UserSettingsType extends AbstractType
|
|||
'accept' => 'image/*',
|
||||
],
|
||||
'constraints' => [
|
||||
new File([
|
||||
'maxSize' => '5M',
|
||||
]),
|
||||
new File(maxSize: '5M'),
|
||||
],
|
||||
])
|
||||
->add('aboutMe', RichTextEditorType::class, [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue