Skip to content

Commit 7c4f2c0

Browse files
authored
Fix PHP 8.5 deprecation warning (#81)
* chore(ci): add php 8.5 * chore(ci): bump dependencies * fix: use empty string as array key explicitly because using null is deprecated in php 8.5
1 parent cf2ddaa commit 7c4f2c0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,20 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
php: [8.1, 8.2, 8.3, 8.4]
14+
php: [8.1, 8.2, 8.3, 8.4, 8.5]
1515

1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1919

2020
- name: Setup PHP
2121
uses: shivammathur/setup-php@v2
2222
with:
2323
php-version: ${{ matrix.php }}
24+
# this ini directive seems to be off by default in PHP 8.5
25+
# see https://github.com/php/php-src/issues/20279
26+
# enable it because codeception relies on it.
27+
ini-values: register_argc_argv=1
2428

2529
- name: Validate composer.json and composer.lock
2630
run: composer validate

src/Codeception/Lib/InnerBrowser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ protected function getFormFor(Crawler $node): SymfonyForm
10541054
$this->fail('The selected node is not a form and does not have a form ancestor.');
10551055
}
10561056

1057-
$identifier = $form->attr('id') ?: $form->attr('action');
1057+
$identifier = $form->attr('id') ?: $form->attr('action') ?? '';
10581058
if (!isset($this->forms[$identifier])) {
10591059
$this->forms[$identifier] = $this->getFormFromCrawler($form);
10601060
}

0 commit comments

Comments
 (0)