Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertRegExp() is deprecated and will be removed in PHPUnit 10 #51

Closed
ragulka opened this issue Aug 11, 2020 · 4 comments · Fixed by #54
Closed

assertRegExp() is deprecated and will be removed in PHPUnit 10 #51

ragulka opened this issue Aug 11, 2020 · 4 comments · Fixed by #54

Comments

@ragulka
Copy link

ragulka commented Aug 11, 2020

Environment

  • Laravel Version: 7.15.0
  • PHP Version: 7.4.5

Description:

When running the testUserCannotMakeMoreThanFiveAttemptsInOneMinute test, I see the following deprecation warning:

assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead
@DCzajkowski
Copy link
Owner

Thanks for the heads up! You can make a PR or I will update it in the upcoming days 😉

@DCzajkowski
Copy link
Owner

The problem is Laravel 7.x uses phpunit 8.x by default, and phpunit 8 does not have this method yet. I will wait with #53 until Laravel upgrades to 9 or 10.

@drbyte
Copy link

drbyte commented Aug 18, 2020

FYI: It was phpUnit 9.1 where assertRegExp was replaced by assertMatchesRegularExpression

@DCzajkowski
Copy link
Owner

Good to know @drbyte, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants