Closed (fixed)
Project:
Rules
Version:
8.x-3.x-dev
Component:
Tests
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 Feb 2022 at 09:28 UTC
Updated:
8 Mar 2022 at 07:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tr commentedComment #4
tr commentedThat fixed the initial problems, but exposed some new ones. I'll roll a new patch tomorrow.
Comment #5
tr commentedI believe this was broken by #3252757: Update Drupal 10 to depend on Symfony 6.0, but again no change notice from core for this huge API change.
Let's try this. I'm using some conditional code in the test to check the PHP version, because Drupal 10 now requires Symfony 6, and Symfony 6 uses features that are only available in PHP 8. Specifically, the 'mixed' return type hint. The conditional code is needed because using the hint is required for D10 but the hint can't be used in D9/PHP 7.
Comment #6
tr commentedLet me see if I can do this without the version_compare.
Comment #7
tr commentedComment #8
tr commentedSessionInterface also uses a 'mixed' parameter type in some places, which will cause errors in PHP 7. While we can use
#[ReturnTypeWillChange]to suppress the return type errors if we leave off the 'mixed' return type, there is no equivalent to suppress the errors from leaving off the parameter type, and no way to use the 'mixed' parameter type in PHP 7. We can't even get around that with the conditional code in #5.Not sure what to try next, other than a new D10-specific branch ...
If someone else has some ideas, please offer a patch!
Comment #9
tr commentedComment #10
tr commentedComment #11
tr commentedWell, it's quite ugly, but it works. Now let me try to eliminate the coding standards messages.
Comment #12
tr commentedJust a few more.
Comment #13
tr commentedAnd it has to work for all test configurations ...
Comment #15
tr commentedCommitted #13.