- Issue created by @acbramley
- Merge request !7373Add type hints to addressEquals, addressNotEquals, and cleanUrl → (Closed) created by acbramley
- Status changed to Needs review
over 1 year ago 2:32am 9 April 2024 - Status changed to RTBC
over 1 year ago 3:41pm 10 April 2024 - 🇺🇸United States smustgrave
Typehints seem fine to me, happy to see nothing broke from making that change.
Assuming this would be a 11.x only change?
- Status changed to Needs work
over 1 year ago 7:43pm 11 April 2024 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
We can't add return typehints without breaking things.
- Status changed to Needs review
over 1 year ago 10:48pm 11 April 2024 - Status changed to RTBC
over 1 year ago 10:25pm 16 April 2024 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
Committed and pushed 5397521df4 to 11.x and b918dd3238 to 10.3.x. Thanks!
-
alexpott →
committed b918dd32 on 10.3.x
Issue #3439527 by acbramley, smustgrave, alexpott: Add type hints to...
-
alexpott →
committed b918dd32 on 10.3.x
- Status changed to Fixed
over 1 year ago 11:58pm 16 April 2024 -
alexpott →
committed 5397521d on 11.x
Issue #3439527 by acbramley, smustgrave, alexpott: Add type hints to...
-
alexpott →
committed 5397521d on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇺🇸United States maskedjellybean Portland, OR
This is causing PHPUnit tests to fail in Drupal core 10.4.5 and behat/mink 1.10.0. Tests are failing with this error:
"Fatal error: Declaration of Drupal\Tests\WebAssert::addressEquals(Drupal\Core\Url|string $page) must be compatible with Behat\Mink\WebAssert::addressEquals($page) in /app/docroot/core/tests/Drupal/Tests/WebAssert.php on line 775"
Even PhpStorm flags this as an issue. Not sure how this is not causing trouble for anyone else.
- 🇺🇸United States maskedjellybean Portland, OR
I found that updating behat/mink to 1.12.0 fixes a similar declaration error for \Drupal\Tests\WebAssert::fieldValueEquals but does not solve the issues for \Drupal\Tests\WebAssert::addressEquals and \Drupal\Tests\WebAssert::addressNotEquals.
I suspect these changes need to be rolled back. All documentation I've found for overriding methods in PHP suggest it's not possible to do what was done here.
- 🇺🇸United States maskedjellybean Portland, OR
Nevermind! Updating behat/mink solved all issues. That's because sometime between 1.10.0 and 1.12.0 \Behat\Mink\WebAssert::addressEquals and \Behat\Mink\WebAssert::addressNotEquals were properly type hinted. In 1.10.0 the arguments are not type hinted leading to this error when used in combination with Drupal core 10.4.5.