79638726

Date: 2025-05-26 10:16:49
Score: 1
Natty:
Report link

Instead of setFormTypeOption, new formalism is now using setFileConstraints like :

ImageField::new('mainImage')->setFileConstraints(
                new File([
                    'maxSize' => '10M',
                    'mimeTypes' => [
                        'image/jpeg',
                        'image/png',
                    ],
                    'mimeTypesMessage' => 'Please upload a valid image.'
                ])
            ),

(source : https://github.com/EasyCorp/EasyAdminBundle/pull/6258#issue-2241587520 )

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Paul ALBERT