Remove the Buzz fallback, accept any 2xx, tolerate '@' in http_client, add CLAUDE.md - #60
Merged
Conversation
…t IP and HTTP client - Client: any 2xx response is a success; only 200 was accepted before - RegisterHttpClientPass: a leading '@' on the configured service id is stripped instead of failing with a confusing "service not found" - README: recommend symfony/http-client's psr18.http_client over the unmaintained Buzz, fix the http_client example, and explain that the customer IP relies on trusted proxies being configured - CLAUDE.md: document how translations are maintained, enforced by a test that every locale carries exactly the English keys The session-guard note in the issue concerned NotifySubscriber, which no longer exists. Fixes #54 Claude-Session: https://claude.ai/code/session_01Mt12J8vdGwwWg4V23uoEf9
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.x #60 +/- ##
============================================
- Coverage 84.90% 84.85% -0.05%
+ Complexity 106 101 -5
============================================
Files 22 21 -1
Lines 550 535 -15
============================================
- Hits 467 454 -13
+ Misses 83 81 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The plugin no longer ships a fallback HTTP client. The http_client option now defaults to psr18.http_client, the PSR-18 adapter Symfony registers when symfony/http-client (a Sylius dependency) is installed, and the compiler pass fails with an actionable message when the configured service does not exist. InterfaceNotFoundException only existed for the Buzz fallback and is removed with it. Claude-Session: https://claude.ai/code/session_01Mt12J8vdGwwWg4V23uoEf9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #54.
Review notes addressed
Client::sendRequest()accepted only200; a204would have been reported as a failure and retried. Tests now cover a status matrix (200/201/204/299 accepted; 199/300/301/404/500 rejected).http_client: '@service'no longer fails — the README documented the@-prefixed form, but the compiler pass looked the id up verbatim, so that example produced "service not found". The pass now strips a leading@; the README example is fixed too.http_clientnow defaults topsr18.http_client, the PSR-18 adapter Symfony registers whensymfony/http-client(already a Sylius dependency) is installed; a PSR-17 factory such asnyholm/psr7is needed alongside it, as it already was for the plugin's own request factory. If the configured service does not exist, the compiler pass fails with a message saying what to install or configure.InterfaceNotFoundException(Buzz-only) is removed,kriswallsmith/buzzleavesrequire-dev, and the README explains the new default. Apps that relied on the automatic Buzz fallback must either havesymfony/http-clientinstalled (Sylius apps do) or sethttp_clientto their PSR-18 client's service id.customerIp(fromRequest::getClientIp()), so trusted proxies must be configured behind a load balancer.NotifySubscriberwas removed in Replace request-time Partner Ads notification with conversion entity + cron command #55.Also in this PR
UPGRADE.mddocumenting the whole 2.x → 3.x upgrade (requirements, install/config changes, migration, the now-required cron command, behaviour changes, removed classes and renamed service ids), linked from the README.3.xhas never been tagged, so one section covers everything up to and including this PR.CLAUDE.md(the repo had none yet): what the plugin does, the invariants that must not be broken (nothing failing during checkout, no unique constraint on the conversion's order, the command lock, partner id validation), the code layout, the maintainer conventions, local development and database setup, CI gotchas, and the translation rules (all 16 locales must carry every key).TranslationCataloguesTestmakes that rule enforceable: it fails when any locale is missing keys, has extra keys, has empty values, or when the shipped locale set differs from the documented one.symfony/yamlis added torequire-devfor it (^6.4 || ^7.4).ECS, PHPStan (level max), 168 tests, and Infection at 100% on the changed source files.