-
Notifications
You must be signed in to change notification settings - Fork 109
Drop php-http/curl-client dependency
#374
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
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis PR migrates the test suite's HTTP mocking infrastructure from php-http components to Symfony HttpClient. Dependencies are removed and replaced, test kernel configuration is updated to support the new HTTP client, test configuration files are simplified, and HTTP mocking implementations across multiple test files are refactored to use Symfony's MockHttpClient with PSR-18 wrappers. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (12)
Comment |
170bb10 to
14b6cc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/Functional/GeocoderListenerTest.php (1)
46-48: Critical: Test uses TestKernel instead of CustomTestKernel.The pipeline failures show "The 'http_client' service is private, you cannot replace it" at multiple injection points.
This test needs to use
CustomTestKernel(which makes the http_client service public) instead ofTestKernel.protected static function getKernelClass(): string { - return TestKernel::class; + return CustomTestKernel::class; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
composer.json(1 hunks)tests/DependencyInjection/Compiler/AddProvidersPassTest.php(2 hunks)tests/Functional/CustomTestKernel.php(3 hunks)tests/Functional/GeocoderListenerTest.php(7 hunks)tests/Functional/PluginInteractionTest.php(3 hunks)tests/Functional/config/fakeip_with_cache_cn.yml(0 hunks)tests/Functional/config/fakeip_with_cache_fr.yml(0 hunks)tests/Functional/config/framework.yml(1 hunks)tests/Functional/config/listener.yml(0 hunks)tests/Functional/config/listener_php7.yml(0 hunks)tests/Functional/config/listener_php8.yml(0 hunks)tests/Validator/Constraint/AddressValidatorTest.php(1 hunks)tests/baseline-ignore(0 hunks)
💤 Files with no reviewable changes (6)
- tests/Functional/config/listener_php7.yml
- tests/baseline-ignore
- tests/Functional/config/fakeip_with_cache_fr.yml
- tests/Functional/config/listener.yml
- tests/Functional/config/listener_php8.yml
- tests/Functional/config/fakeip_with_cache_cn.yml
🧰 Additional context used
🧬 Code graph analysis (1)
tests/Functional/CustomTestKernel.php (2)
src/DependencyInjection/Compiler/FactoryValidatorPass.php (1)
process(34-41)src/DependencyInjection/Compiler/ProfilerPass.php (1)
process(30-41)
🪛 GitHub Actions: CI
tests/Functional/PluginInteractionTest.php
[error] 78-78: The "http_client" service is private, you cannot replace it.
tests/Functional/GeocoderListenerTest.php
[error] 105-105: The "http_client" service is private, you cannot replace it.
[error] 145-145: The "http_client" service is private, you cannot replace it.
[error] 187-187: The "http_client" service is private, you cannot replace it.
[error] 220-220: The "http_client" service is private, you cannot replace it.
[error] 253-253: The "http_client" service is private, you cannot replace it.
tests/Validator/Constraint/AddressValidatorTest.php
[error] 32-32: Class "Symfony\Component\HttpClient\Response\JsonMockResponse" not found
[error] 103-103: Class "Symfony\Component\HttpClient\Response\JsonMockResponse" not found
🪛 PHPMD (2.15.0)
tests/Functional/PluginInteractionTest.php
99-99: Avoid unused parameters such as '$options'. (undefined)
(UnusedFormalParameter)
🔇 Additional comments (3)
composer.json (1)
69-69: LGTM - Dependency migration is correct.The migration from
php-http/*packages tosymfony/http-clientis properly configured.tests/Functional/config/framework.yml (1)
11-12: LGTM!Enabling the
http_clientservice in the framework configuration is correct.tests/DependencyInjection/Compiler/AddProvidersPassTest.php (1)
21-22: LGTM!The migration to Symfony HttpClient mocks is correctly implemented. Using
Psr18Clientto wrapMockHttpClientprovides PSR-18 compatibility for the BingMaps provider.Also applies to: 38-38
ea8b9de to
c062abb
Compare
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.