Skip to content

Support for Codeception 5 #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:

strategy:
matrix:
php: [7.4, 8.0, 8.1]
symfony: [4.4, 5.3]
php: [8.0, 8.1]
symfony: [4.4, 5.4]

steps:
- name: Checkout code
Expand All @@ -29,15 +29,15 @@ jobs:
with:
repository: Codeception/symfony-module-tests
path: framework-tests
ref: 4.4
ref: 4.4_codecept5

- name: Checkout Symfony 5.3 Sample
if: matrix.symfony == 5.3
- name: Checkout Symfony 5.4 Sample
if: matrix.symfony == 5.4
uses: actions/checkout@v2
with:
repository: Codeception/symfony-module-tests
path: framework-tests
ref: main
ref: 5.4_codecept5

- name: Get composer cache directory
id: composer-cache
Expand Down Expand Up @@ -70,8 +70,8 @@ jobs:

- name: Install Symfony Sample
run: |
composer remove codeception/module-symfony --dev --no-update
composer install --no-progress
composer remove codeception/module-symfony --dev --no-update --ignore-platform-req=php
composer install --no-progress --ignore-platform-req=php
working-directory: framework-tests

- name: Prepare the test environment
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
"homepage": "https://medium.com/@ganieves"
}
],
"minimum-stability": "RC",
"minimum-stability": "dev",
"require": {
"php": "^7.4 | ^8.0",
"ext-json": "*",
"codeception/lib-innerbrowser": "^2.0",
"codeception/codeception": "^4.1"
"codeception/lib-innerbrowser": "^2.0 | *@dev",
"codeception/codeception": "^5.0.0-alpha1"
},
"require-dev": {
"codeception/module-asserts": "^2.0",
"codeception/module-doctrine2": "^2.0",
"codeception/module-asserts": "^2.0 | *@dev",
"codeception/module-doctrine2": "^2.0 | *@dev",
"doctrine/orm": "^2.10",
"symfony/form": "^4.4 | ^5.0",
"symfony/framework-bundle": "^4.4 | ^5.0",
Expand All @@ -32,7 +32,7 @@
"symfony/routing": "^4.4 | ^5.0",
"symfony/security-bundle": "^4.4 | ^5.0",
"symfony/twig-bundle": "^4.4 | ^5.0",
"vlucas/phpdotenv": "^4.2 | ^5.4"
"vlucas/phpdotenv": "^4.2 | ^5.3"
},
"suggest": {
"codeception/module-asserts": "Include traditional PHPUnit assertions in your tests",
Expand Down
5 changes: 2 additions & 3 deletions src/Codeception/Module/Symfony.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use Codeception\Module\Symfony\TimeAssertionsTrait;
use Codeception\Module\Symfony\TwigAssertionsTrait;
use Codeception\TestInterface;
use Doctrine\ORM\EntityManagerInterface;
use Exception;
use ReflectionClass;
use ReflectionException;
Expand Down Expand Up @@ -241,10 +242,8 @@ protected function onReconfigure(array $settings = []): void
* Retrieve Entity Manager.
*
* EM service is retrieved once and then that instance returned on each call
*
* @return \Doctrine\ORM\EntityManagerInterface
*/
public function _getEntityManager()
public function _getEntityManager(): EntityManagerInterface
{
if ($this->kernel === null) {
$this->fail('Symfony module is not loaded');
Expand Down