Skip to content

Commit cb10c02

Browse files
authored
Support for Codeception 5 (Codeception#153)
1 parent 6cbbd24 commit cb10c02

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88

99
strategy:
1010
matrix:
11-
php: [7.4, 8.0, 8.1]
12-
symfony: [4.4, 5.3]
11+
php: [8.0, 8.1]
12+
symfony: [4.4, 5.4]
1313

1414
steps:
1515
- name: Checkout code
@@ -29,15 +29,15 @@ jobs:
2929
with:
3030
repository: Codeception/symfony-module-tests
3131
path: framework-tests
32-
ref: 4.4
32+
ref: 4.4_codecept5
3333

34-
- name: Checkout Symfony 5.3 Sample
35-
if: matrix.symfony == 5.3
34+
- name: Checkout Symfony 5.4 Sample
35+
if: matrix.symfony == 5.4
3636
uses: actions/checkout@v2
3737
with:
3838
repository: Codeception/symfony-module-tests
3939
path: framework-tests
40-
ref: main
40+
ref: 5.4_codecept5
4141

4242
- name: Get composer cache directory
4343
id: composer-cache
@@ -70,8 +70,8 @@ jobs:
7070

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

7777
- name: Prepare the test environment

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
"homepage": "https://medium.com/@ganieves"
1515
}
1616
],
17-
"minimum-stability": "RC",
17+
"minimum-stability": "dev",
1818
"require": {
1919
"php": "^7.4 | ^8.0",
2020
"ext-json": "*",
21-
"codeception/lib-innerbrowser": "^2.0",
22-
"codeception/codeception": "^4.1"
21+
"codeception/lib-innerbrowser": "^2.0 | *@dev",
22+
"codeception/codeception": "^5.0.0-alpha1"
2323
},
2424
"require-dev": {
25-
"codeception/module-asserts": "^2.0",
26-
"codeception/module-doctrine2": "^2.0",
25+
"codeception/module-asserts": "^2.0 | *@dev",
26+
"codeception/module-doctrine2": "^2.0 | *@dev",
2727
"doctrine/orm": "^2.10",
2828
"symfony/form": "^4.4 | ^5.0",
2929
"symfony/framework-bundle": "^4.4 | ^5.0",
@@ -32,7 +32,7 @@
3232
"symfony/routing": "^4.4 | ^5.0",
3333
"symfony/security-bundle": "^4.4 | ^5.0",
3434
"symfony/twig-bundle": "^4.4 | ^5.0",
35-
"vlucas/phpdotenv": "^4.2 | ^5.4"
35+
"vlucas/phpdotenv": "^4.2 | ^5.3"
3636
},
3737
"suggest": {
3838
"codeception/module-asserts": "Include traditional PHPUnit assertions in your tests",

src/Codeception/Module/Symfony.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
use Codeception\Module\Symfony\TimeAssertionsTrait;
2626
use Codeception\Module\Symfony\TwigAssertionsTrait;
2727
use Codeception\TestInterface;
28+
use Doctrine\ORM\EntityManagerInterface;
2829
use Exception;
2930
use ReflectionClass;
3031
use ReflectionException;
@@ -241,10 +242,8 @@ protected function onReconfigure(array $settings = []): void
241242
* Retrieve Entity Manager.
242243
*
243244
* EM service is retrieved once and then that instance returned on each call
244-
*
245-
* @return \Doctrine\ORM\EntityManagerInterface
246245
*/
247-
public function _getEntityManager()
246+
public function _getEntityManager(): EntityManagerInterface
248247
{
249248
if ($this->kernel === null) {
250249
$this->fail('Symfony module is not loaded');

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy