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

chore: expect exception classes in tests and phpDoc rather than strings #6051

Merged
merged 2 commits into from
Apr 10, 2023

Conversation

vishwarajanand
Copy link
Contributor

@vishwarajanand vishwarajanand commented Apr 10, 2023

Changes:

  1. Pass appropriate exception class in $this->expectException(..) rather than string, since its difficult to get type checked.
  2. Added relevant imports where missing
  3. Datastore/tests/Unit/DatastoreSessionHandlerTest.php now uses explicit exceptExceptions.
  4. Fix references to @throws in phpDoc.

BEGIN_COMMIT_OVERRIDE
chore: use exception::class instead of strings (#6051)
END_COMMIT_OVERRIDE

@vishwarajanand vishwarajanand changed the title fix: rename exceptions in test and phpDoc fix: expect exception classes in tests and phpDoc rather than strings Apr 10, 2023
@vishwarajanand vishwarajanand marked this pull request as ready for review April 10, 2023 15:07
@vishwarajanand vishwarajanand requested review from a team as code owners April 10, 2023 15:07
@bshaffer bshaffer merged commit e707aa3 into googleapis:main Apr 10, 2023
@bshaffer bshaffer changed the title fix: expect exception classes in tests and phpDoc rather than strings chore: expect exception classes in tests and phpDoc rather than strings Apr 10, 2023
@bshaffer
Copy link
Contributor

bshaffer commented Apr 10, 2023

I noticed it too late, but this is a chore and not a fix, as it does not fix a bug or anything like that. This is important because otherwise it'll show up in all the release notes

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

Successfully merging this pull request may close these issues.

2 participants