diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2bab7b32..b4704343 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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 @@ -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 diff --git a/composer.json b/composer.json index d1f94fa0..0d2d5a5a 100644 --- a/composer.json +++ b/composer.json @@ -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", @@ -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", diff --git a/src/Codeception/Module/Symfony.php b/src/Codeception/Module/Symfony.php index bea67e14..164e58b3 100644 --- a/src/Codeception/Module/Symfony.php +++ b/src/Codeception/Module/Symfony.php @@ -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; @@ -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');