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

fix: use assertMatchesRegularExpression instead of deprecated assertRegexp #1927

Merged

Conversation

vishwarajanand
Copy link
Member

We are seeing warnings like below which will be fixed by this PR:

There was 1 warning:

1) Google\Cloud\Samples\PubSub\PubSubTest::testPublishAndSubscribeWithOrderingKeys
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.

ref: sebastianbergmann/phpunit#4086

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Oct 13, 2023
@vishwarajanand vishwarajanand marked this pull request as ready for review October 13, 2023 15:11
@vishwarajanand vishwarajanand requested review from bshaffer and a team as code owners October 13, 2023 15:11
@yash30201 yash30201 merged commit 9c67145 into GoogleCloudPlatform:main Oct 16, 2023
@bshaffer
Copy link
Contributor

bshaffer commented Oct 19, 2023

Very minor nit here, but to "deprecate" means to mark something as no longer recommended for use. So this PR does not deprecate anything, but rather updates the methods being used because they were deprecated by PHPUnit.

@bshaffer bshaffer changed the title fix: deprecate assertRegexp usage over assertMatchesRegularExpression fix: use assertRegexp instead of deprecated assertMatchesRegularExpression Oct 19, 2023
@bshaffer bshaffer changed the title fix: use assertRegexp instead of deprecated assertMatchesRegularExpression fix: use assertMatchesRegularExpression instead of deprecated assertRegexp Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants