[META] Convert use of InvocationMocker::withConsecutive()

Created on 4 December 2023, about 1 year ago
Updated 21 May 2024, 7 months ago

Problem/Motivation

In 📌 InvocationMocker::withConsecutive() is deprecated in PHPUnit 9.6 and removed from PHPUnit 10 RTBC Drupal created a workaround that mimics the behavior or InvocationMocker::withConsecutive() to facilitate the upgrade to PHPUnit 10 but the method was removed because it was complicated and was code smell for tests that where generally over complicated and mocking too much.

https://thephp.cc/articles/do-not-mock-what-you-do-not-own

This replacement is just a stop gap though and each use should be reviewed and refactored to use a different mechanism of mocking or stubbing to improve the test.

Proposed resolution

  • Replace uses of MockTrait::consecutiveCalls
  • Deprecate MockTrait::consecutiveCalls

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

11.0 🔥

Component
PHPUnit 

Last updated about 23 hours ago

Created by

🇺🇸United States neclimdul Houston, TX

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024