Description
Q | A |
---|---|
Bug report? | maybe |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.4.4 |
Hi,
I have problem when submitting user form. I use FOSUserBundle and there's simple form with only two fields:
->add('name', TextType::class, [ 'label' => 'name and surname', ])
->add('department', TextType::class, [ 'label' => 'department', ])
It's also standard in controller:
$editForm = $this->createForm('Company\AdminBundle\Form\UserEditType', $user);
$editForm->handleRequest($request);
When I submit form in production env I get error in prod.log:
[2018-02-26 08:50:35] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Cache\Exception\InvalidArgumentException: "Cache key "email@address" contains reserved characters {}()/\@:" at /Users/local/Sites/projectname/vendor/symfony/cache/CacheItem.php line 162 {"exception":"[object] (Symfony\\Component\\Cache\\Exception\\InvalidArgumentException(code: 0): Cache key \"email@address\" contains reserved characters {}()/\\@: at /Users/local/Sites/projectname/vendor/symfony/cache/CacheItem.php:162)"} []
As far as I can check, the problem occurs on handleRequest($request)
in controller and later on Symfony Form
class when dispatches POST_SUBMIT
$dispatcher->dispatch(FormEvents::POST_SUBMIT, $event);
and then in ValidationListener
class when running
$violations = $this->validator->validate($form);
I do not use any custom cache bundles / vendors and it's first time I have such problem. Just don't know why. I understand error itself, that there's problem with "@
" character in cache and with PSR-6, but have no idea what to check or change.
Thank you for help.