Skip to content

Commit

Permalink
Support for Codeception 5 (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
TavoNiievez committed Feb 6, 2022
1 parent 6cbbd24 commit cb10c02
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
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
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
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

0 comments on commit cb10c02

Please sign in to comment.