Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Dec 2023 at 16:10 UTC
Updated:
21 May 2024 at 10:59 UTC
Jump to comment: Most recent
Comments
Comment #2
catchIs this done?
Comment #3
spokjeNope, still four suppressed warnings
Call to deprecated method withConsecutive() of class PHPUnitFrameworkMockObjectBuilderInvocationMocker.in the PHPStan baseline.Comment #4
catchYeah I should have grepped instead of asking:
Comment #5
andypostWith applied patch from #3419288: Remove withConsecutive() in RouteBuilderTest
Comment #6
longwavePHPStan hasn't flagged MigrateExecutableMemoryExceededTest for some reason.
Comment #8
longwaveAll child issues are in. Also crediting @mondrake here for discussions and the techniques learned in #3306554: InvocationMocker::withConsecutive() is deprecated in PHPUnit 9.6 and removed from PHPUnit 10
Comment #9
longwaveSaving credits.
Comment #10
neclimdulMoving 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!
Comment #11
smustgrave commentedWith the 2 RTBC tickets applied and searching for withConsecutive seems all have been replaced.
Comment #12
catchCommitted 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.
Comment #13
joachim commented> 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
Comment #14
catchI 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.
Comment #15
quietone commented@catch, thanks for updating the change records