Replies: 4 comments 1 reply
-
I'm not sure what you are trying to achieve with this code: $request = new Request();
$em = $moduleContainer->getModule('Doctrine')->_getEntityManager();
$controller = $I->grabService(SomeCustomController::class);
$controller->testAddForm($em, $request); |
Beta Was this translation helpful? Give feedback.
-
Just to be clear, your problem has nothing to do with authentication, even if you wrote the code there, right? Can you explain why you think this is a Codeception or module-symfony issue rather than a behavioral change in Symfony itself? |
Beta Was this translation helpful? Give feedback.
-
Hey @TavoNiievez , thank you for your response. I'm trying to call the testAddForm method which is also a route for the web admin interface, which eventually renders a form. I posted a minimal version of that method because in the real app there are additional parameters and logic. But forget my code. This example from symfony-module-test is throwing the same error.
When running the test with
|
Beta Was this translation helpful? Give feedback.
-
I see. This behavior is not specific to Symfony 7 either. It corresponds to a deprecation in SF 5.4, and it fails since SF 6.0. We cannot integrate this workaround into the Codeception code. Also some attempts to integrate similar solutions into Symfony's own code have not gotten attention so far. |
Beta Was this translation helpful? Give feedback.
-
I am having a problem with Sessions on a Symfony 7 application (updated from 5.4) that i was able to replicate on (symfony-module-tests). Before the update the tests were running fine now i am getting "[Symfony\Component\HttpFoundation\Exception\SessionNotFoundException] There is currently no session available."
When running
i get
You can test this behaviour here: https://github.com/TibuTudor/symfony-module-tests/. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions