Skip to content

Adds Gone, InternalServerError & ServiceUnavailable statuses to AssertStatusToAssertMethodRector #105

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

Merged
merged 3 commits into from
May 11, 2023

Conversation

peterfox
Copy link
Collaborator

Changes

  • Adapted the AssertStatusToAssertMethodRector to handle 410, 500 and 503 status codes.
  • Updates the test to reflect the changes.
  • Updates the test to use a static data provider method.

Why

Updates the AssertStatusToAssertMethodRector with the new HTTP assertion methods introduced in 10.9.

There might be some issues here with a requirement to configure which version of Laravel you're using otherwise you might end up with broken method calls because the method doesn't exist. I'm not sure of the best way to apply this. A configuration to specify which HTTP statuses to refactor.

There's also a minor fix to make the test for this use a static data provider.

@driftingly driftingly merged commit 6043322 into driftingly:main May 11, 2023
@driftingly
Copy link
Owner

Thanks @peterfox 🙌

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