Merged
Conversation
Closed
…(Products, Orders, Customers, Carts)
5a5cbf1 to
4b27307
Compare
…nto feat/ecommerce-core
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.
E-commerce Core Integration
This PR adds a full E-commerce module to the MailerLite PHP SDK, introducing support for Products, Orders, Customers, and Carts endpoints.
Highlights
Added PSR-18/PSR-17 compliant HTTP layer (HttpLayerPsr, HttpLayerPsrBridge)
Implemented Psr17FactoryAggregate for unified Request/Stream handling
Introduced ClientInterface to align with PSR-18 client contracts
Clean repository-like endpoint structure (Product, Order, Customer, Cart)
Added strong type hints, PHPDoc, and tests for each new endpoint
Updated composer.json and README with examples
Architecture
Bridge pattern: connects the SDK’s internal HttpLayer with PSR clients
Factory pattern: uses PSR-17 for consistent request creation
SOLID: single-purpose classes, full DI, no hard-coded dependencies
Usage
Runs locally without Docker.
Status
All tests passing • PSR-12 compliant • No breaking changes • Ready for merge