Closed codedge closed 2 years ago
Hi @codedge ,
So far there is no codeception/codeception
release tagged with Symfony 6 support, that's our blocker right now.
Support has already been implemented in 5.0
branch but, 5.0.0
in turn is blocked by PHPUnit 10.0.0
which will probably be released next month.
According to this issue https://github.com/Codeception/Codeception/issues/6294 I hope the 5.0
release is going to happen in the next days as PHPUnit seem to be out of scope for 5.0
.
The last comment in that thread is a month old, we decided to keep waiting for PHPUnit 10 after that...
Hello.
To support php 8 and symfony 6, two lines in the file src/Codeception/Module/Symfony/SessionAssertionsTrait.php
need to be corrected:
return $this->grabService('session.factory')->createSession();
amLoggedInAs
function, you need to remove the second argument from the UsernamePasswordToken
class so line 43 must looks like this $token = new UsernamePasswordToken($user, $firewallName, $user->getRoles());
So far, I've made these changes to my helper class. But I hope that you will add them to the module code.
@semaz Cool.
The tests in symfony-module-tests
also need to be adapted, for example making the change to getCurrentSession()
prints:
Step See in session "_security_main"
Fail No session attribute with name '_security_main'
it may be that this session variable has been renamed, if you have time you can try to send PRs to add this support, I will be very attentive to review it, otherwise I'll do both myself.
Please review it.
It seems to be a special occasion, I'm glad that Codeception is the project that receives your first PR.
Friendly reminder: we have some contribution guides
in case you want to learn more about our workflow and how module-symfony
uses symfony-module-tests
to perform tests.
Currently it is not possible to use the module with Symfony 6 as the reqs in
composer.json
only a Symfony 4 and 5. Any plans to support Symfony 6?