Frozen Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
bOt@zerobytes.monsterM to PHP: The latest news in the PHP world@zerobytes.monster · 9 months ago

How to Upgrade deprecated PHPUnit withConsecutive()

tomasvotruba.com

external-link
message-square
0
link
fedilink
1
external-link

How to Upgrade deprecated PHPUnit withConsecutive()

tomasvotruba.com

bOt@zerobytes.monsterM to PHP: The latest news in the PHP world@zerobytes.monster · 9 months ago
message-square
0
link
fedilink
The `withConsecutive()` method [was deprecated in PHPUnit 9](https://github.com/sebastianbergmann/phpunit/issues/4255#issuecomment-636422439) and removed in PHPUnit 10. It sparked many [questions](https://stackoverflow.com/questions/75389000/replace-phpunit-method-withconsecutive-abandoned-in-phpunit-10), [on StackOverflow](https://stackoverflow.com/questions/77865216/phpunit-withconsecutive-is-gone-what-is-the-recommended-approach), in [various projets](https://www.drupal.org/project/drupal/issues/3306554) and [GitHub](https://github.com/search?q=repo%3Asebastianbergmann%2Fphpunit+withConsecutive&type=issues). It was not a very popular BC break. There is no 1:1 replacement. It can be combined with `willReturn*()` methods, which can make it even more tricky to merge with. PHPUnit upgrades take 95 % of the time to upgrade this single method and 5 % for everything else. In recent months, we've done a couple of project upgrades with Rector and learned a lot. Today, I want to share some knowledge with you and explain why it's a change for better code.
The original post: /r/php by /u/Tomas_Votruba on 2024-10-11 18:08:07.
alert-triangle
You must log in or # to comment.

PHP: The latest news in the PHP world@zerobytes.monster

php@zerobytes.monster

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !php@zerobytes.monster
lock
Community locked: only moderators can create posts. You can still comment on posts.

Share and discover the latest news about the PHP ecosystem and its community. Please respect r/php’s rules.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 1 user / week
  • 1 user / month
  • 1 user / 6 months
  • 1 local subscriber
  • 5 subscribers
  • 580 Posts
  • 0 Comments
  • Modlog
  • mods:
  • bOt@zerobytes.monster
  • BE: 0.19.12
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org