angular / angular

Deliver web apps with confidence 🚀
https://angular.dev
MIT License
94.71k stars 24.68k forks source link

fix(migrations): handle more cases in HttpClientModule migration #55640

Closed cexbrayat closed 1 week ago

cexbrayat commented 2 weeks ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

This commit handles two cases that were breaking applications when using the new migration:

What is the new behavior?

It now properly adds provideHttpClient(withInterceptorsFromDi()) and related imports to the test for the tests that were using HttpClientModule It also adds the necessary imports for provideHttpClient and withInterceptorsFromDi for tests that were using HttpClientTestingModule

Does this PR introduce a breaking change?

Other information

cexbrayat commented 1 week ago

@crisbeto Thank you for the review. I updated the PR with your feedback, PTAL.

AndrewKushnir commented 1 week ago

This PR was merged into the repository by commit 7a2efd442df66cfcee28105405550635f152c51d.