Closed luislard closed 2 years ago
Tried to trigger the issue in PHPUnit.
I checked what happens if I remove the attribute in any of the files by PHPUnit itself and the PHPUnit suite didn't catch the error. See my test
I will just add the attribute in the required places.
PR merged.
Description of the bug
I am checking if we can move one of our projects to PHP8.1 and I am getting a deprecation notice in wp-app-container see:
This error is documented in Backward Incompatible Changes
I tried to change the return type but it will fail in PHP7.* because the mixed return type was introduced in PHP8
As I can see we are trying to support PHP7 in the v3.x of this package -> inferred because of this
So we have 3 options: Create a new major v4 that only supports PHP >= 8.0 Stay in v3 but add the #[\ReturnTypeWillChange] to the method (easiest) Ignore the deprecation
Reproduction instructions
Use v3 of this package with PHP8.1
Expected behavior
Remove the deprecation notice
Environment info
ddev with PHP8.1
Relevant log output
No response
Additional context
No response
Code of Conduct