Skip to content

Commit d5f166a

Browse files
committed
Additional fixes
1 parent 5b8dcff commit d5f166a

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
matrix:
99
php: [8.2, 8.3, 8.4]
1010
symfony: ["5.4.*", "6.4.*", "6.4wApi", "7.3.*"]
11+
env:
12+
only_sf73: &only_sf73 ${{ matrix.symfony == '7.3.*' }}
1113

1214
steps:
1315
- name: Checkout code
@@ -79,13 +81,17 @@ jobs:
7981
composer update --prefer-dist --no-progress
8082
8183
- name: Run PHPStan (max)
82-
if: ${{ matrix.symfony == '7.3.*' }}
84+
if: *only_sf73
8385
run: composer phpstan
8486

8587
- name: Run PHP-CS-Fixer
86-
if: ${{ matrix.symfony == '7.3.*' }}
88+
if: *only_sf73
8789
run: composer cs-check
8890

91+
- name: Run Composer Audit
92+
if: *only_sf73
93+
run: composer audit
94+
8995
- name: Validate Composer files
9096
run: composer validate --strict
9197
working-directory: framework-tests

src/Codeception/Module/Symfony.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
use function file_exists;
6666
use function implode;
6767
use function in_array;
68+
use function extension_loaded;
6869
use function ini_get;
6970
use function ini_set;
7071
use function is_object;
@@ -495,6 +496,10 @@ protected function getInternalDomains(): array
495496
*/
496497
private function setXdebugMaxNestingLevel(int $max): void
497498
{
499+
if (!extension_loaded('xdebug')) {
500+
return;
501+
}
502+
498503
if ((int) ini_get('xdebug.max_nesting_level') < $max) {
499504
ini_set('xdebug.max_nesting_level', (string) $max);
500505
}

src/Codeception/Module/Symfony/BrowserAssertionsTrait.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,7 @@ public function seePageRedirectsTo(string $page, string $redirectsTo): void
330330
$client->followRedirects(false);
331331
$this->amOnPage($page);
332332

333-
$this->assertTrue(
334-
$client->getResponse()->isRedirection(),
335-
'The response is not a redirection.'
336-
);
333+
$this->assertThatForResponse(new ResponseIsRedirected(), 'The response is not a redirection.');
337334

338335
$client->followRedirect();
339336
$this->seeInCurrentUrl($redirectsTo);

0 commit comments

Comments
 (0)