codeception-mailcatcher-module icon indicating copy to clipboard operation
codeception-mailcatcher-module copied to clipboard

Allow codeception 5

Open akalineskou opened this issue 2 years ago • 5 comments

These were the changes I had to do to make this work with codeception 5.

I've ran the whole test suite in a project (private) and had no issues.

  • [x] needs v5 release of codeception https://github.com/Codeception/Codeception/releases
  • [x] Update compoer.json codeception to ^5.0

akalineskou avatar May 07 '22 12:05 akalineskou

Codeception v5 does not support php <8 https://github.com/Codeception/Codeception/blob/5.0.0-RC3/composer.json So I removed it from composer.json and the tests

Will have to wait for v5 to be released, since as of writing this the latest version is RC3 https://github.com/Codeception/Codeception/releases

We can run the tests with 5.0.0-RC3 in composer.json to see if they pass (and it will be updated when v5 is released)

akalineskou avatar May 08 '22 12:05 akalineskou

Codeception 5 was released today https://github.com/Codeception/Codeception/releases

wazum avatar Jul 28 '22 12:07 wazum

Updated composer with codeception v5 Also added to allow v3 of codeception/module-asserts https://github.com/Codeception/module-asserts/releases

akalineskou avatar Jul 28 '22 12:07 akalineskou

Test failure @akalineskou

Jamesking56 avatar Aug 10 '22 07:08 Jamesking56

Hit a bit of a problem here in trying to support both Codeception v4 and v5 in Module class:

In Codeception v4, $config has no type:

https://github.com/Codeception/Codeception/blob/18beff367306d66f955add5fa74e590a5210e219/src/Codeception/Module.php#L57

However, in v5 it does:

https://github.com/Codeception/Codeception/blob/667dfa4acde020b4328aa5570818cc8cb305f8c4/src/Codeception/Module.php#L49

We need to extend $config, so how do we do so without causing a PHP fatal error due to not matching the typing of the parent?

Jamesking56 avatar Aug 29 '22 18:08 Jamesking56

You could release version 3 which would not support codeception 4... I mean at some point people will have to upgrade...

akalineskou avatar Oct 04 '22 19:10 akalineskou

You could release version 3 which would not support codeception 4... I mean at some point people will have to upgrade...

@Jamesking56 Please do that :)

schmunk42 avatar Jan 27 '23 15:01 schmunk42

Codeception v5 is now supported in v3.0.0

Jamesking56 avatar Aug 08 '23 13:08 Jamesking56