- Issue created by @neclimdul
- 🇳🇱Netherlands spokje
Nope, still four suppressed warnings
Call to deprecated method withConsecutive() of class PHPUnitFrameworkMockObjectBuilderInvocationMocker.
in the PHPStan baseline. - 🇬🇧United Kingdom catch
Yeah I should have grepped instead of asking:
core/tests/Drupal/Tests/Core/UrlTest.php core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php
- 🇫🇷France andypost
With applied patch from 📌 Remove withConsecutive() in RouteBuilderTest RTBC
core$ git grep withConsecutive core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php:85: ->withConsecutive( core/phpstan-baseline.neon:3407: message: "#^Call to deprecated method withConsecutive\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\Builder\\\\InvocationMocker\\.$#" core/tests/Drupal/Tests/Core/UrlTest.php:123: ->withConsecutive(
- 🇬🇧United Kingdom longwave UK
PHPStan hasn't flagged MigrateExecutableMemoryExceededTest for some reason.
- 🇬🇧United Kingdom longwave UK
All child issues are in. Also crediting @mondrake here for discussions and the techniques learned in 📌 InvocationMocker::withConsecutive() is deprecated in PHPUnit 9.6 and removed from PHPUnit 10 RTBC
- Status changed to Needs review
11 months ago 11:05pm 5 February 2024 - 🇺🇸United States neclimdul Houston, TX
Moving parent since we dropped the deprecation path.
Thought this had stalled but looks like a lot of great work was happening I just wasn't watching the right issues! Thanks!
- Status changed to RTBC
10 months ago 3:34pm 12 February 2024 - 🇺🇸United States smustgrave
With the 2 RTBC tickets applied and searching for withConsecutive seems all have been replaced.
- Status changed to Needs work
10 months ago 3:52pm 12 February 2024 - 🇬🇧United Kingdom catch
Committed the last two RTBC. But https://www.drupal.org/node/3365413 → needs an update. I think it might be a good idea to link to core issues with examples and show a couple of diffs on the MR for different approaches like using callbacks.
- 🇬🇧United Kingdom joachim
> Instead, prophecies should be instantiated from the prophet factory directly
Does this mean using it like how it's explained here?
https://github.com/phpspec/prophecy?tab=readme-ov-file#how-to-use-it
- Status changed to Fixed
8 months ago 8:38am 1 May 2024 - 🇬🇧United Kingdom catch
I updated https://www.drupal.org/node/3365413 → to point to more examples in core and remove the reference to the shim that we ended up not needing, I think that's enough to close this issue but the CR could use more help in general - however it's going to be very hard to provide example before/after since it all depends on what people are doing.
Automatically closed - issue fixed for 2 weeks with no activity.