The form's view data is expected to be an instance of class Symfony\Component\HttpFoundation\File\File, but is an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image to an instance of Symfony\Component\HttpFoundation\File\File.
F.e.: vendor/lakion/sylius-cms-bundle/src/Form/Type/ProductBlockType.php
line 31 - ->add('image', FileType::class, [
needs to be
->add('image', ImageType::class, [
The form's view data is expected to be an instance of class Symfony\Component\HttpFoundation\File\File, but is an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image to an instance of Symfony\Component\HttpFoundation\File\File.
F.e.: vendor/lakion/sylius-cms-bundle/src/Form/Type/ProductBlockType.php line 31 - ->add('image', FileType::class, [ needs to be ->add('image', ImageType::class, [