Skip to content

Commit 2183dd5

Browse files
authored
E_STRICT is no longer used by default for PHP > 8.3 (#902)
1 parent 8c1eb8f commit 2183dd5

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎docs/FunctionalTests.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,14 @@ Also check all available *Public Properties* of the used modules to get full acc
219219

220220
## Error Reporting
221221

222-
By default Codeception uses the `E_ALL & ~E_STRICT & ~E_DEPRECATED` error reporting level.
222+
By default Codeception uses the `E_ALL & ~E_DEPRECATED` error reporting level (PHP < 8.4: `E_ALL & ~E_STRICT & ~E_DEPRECATED`).
223223
In functional tests you might want to change this level depending on your framework's error policy.
224224
The error reporting level can be set in the suite configuration file:
225225

226226
```yaml
227227
actor: FunctionalTester
228228
...
229-
error_level: E_ALL & ~E_STRICT & ~E_DEPRECATED
229+
error_level: E_ALL & ~E_DEPRECATED
230230
```
231231

232232
`error_level` can also be set globally in `codeception.yml` file. In order to do that, you need to specify `error_level` as a part of `settings`. For more information, see [Global Configuration](https://codeception.com/docs/reference/Configuration). Note that suite specific `error_level` value will override global value.

‎docs/UnitTests.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,14 @@ public function testSingleton()
489489

490490
## Error Reporting
491491

492-
By default Codeception uses the `E_ALL & ~E_STRICT & ~E_DEPRECATED` error reporting level.
492+
By default Codeception uses the `E_ALL & ~E_DEPRECATED` error reporting level (PHP < 8.4: `E_ALL & ~E_STRICT & ~E_DEPRECATED`).
493493
In unit tests you might want to change this level depending on your framework's error policy.
494494
The error reporting level can be set in the suite configuration file:
495495

496496
```yaml
497497
actor: UnitTester
498498
...
499-
error_level: E_ALL & ~E_STRICT & ~E_DEPRECATED
499+
error_level: E_ALL & ~E_DEPRECATED
500500
```
501501

502502
`error_level` can also be set globally in `codeception.yml` file. In order to do that, you need to specify `error_level` as a part of `settings`. For more information, see [Global Configuration](https://codeception.com/docs/reference/Configuration). Note that suite specific `error_level` value will override global value.

‎docs/reference/Configuration.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Possible settings:
9797
* PhpStorm: `'phpstorm://open?file=%%file%%&line=%%line%%'`
9898
* Visual Studio Code: `'vscode://file/%%file%%:%%line%%'`
9999
* Atom: `'atom://core/open/file?filename=%%file%%&line=%%line%%'`
100-
* `error_level: E_ALL & ~E_STRICT & ~E_DEPRECATED`: Set the error_reporting level. You can specify either a predefined constant or an integer value, see https://www.php.net/manual/en/function.error-reporting.php and https://www.php.net/manual/en/errorfunc.constants.php
100+
* `error_level: E_ALL & ~E_DEPRECATED`: Set the error_reporting level. You can specify either a predefined constant or an integer value, see https://www.php.net/manual/en/function.error-reporting.php and https://www.php.net/manual/en/errorfunc.constants.php. For PHP < 8.4 `E_ALL & ~E_STRICT & ~E_DEPRECATED` is used by default.
101101
* `memory_limit: 1024M`: Tests (especially functional) can take a lot of memory. We set a high limit for them by default.
102102
* `lint: true`: Enable/disable syntax of test files before loading. For PHP < 7 `exec('php -l')` is used. Disable if you need to speed up tests execution.
103103
* `log_incomplete_skipped: false`: Log the incomplete and skipped tests into junit report ,see https://phpunit.de/manual/current/en/appendixes.configuration.html Section logging > junit

0 commit comments

Comments
 (0)