Skip to content

Feat/ecommerce core#33

Merged
gaurang404 merged 2 commits intomainfrom
feat/ecommerce-core
Nov 12, 2025
Merged

Feat/ecommerce core#33
gaurang404 merged 2 commits intomainfrom
feat/ecommerce-core

Conversation

@gaurang404
Copy link
Contributor

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.

composer install
vendor/bin/phpunit

Status
All tests passing • PSR-12 compliant • No breaking changes • Ready for merge

@gaurang404 gaurang404 mentioned this pull request Nov 12, 2025
@gaurang404 gaurang404 merged commit cd40146 into main Nov 12, 2025
8 checks passed
@gaurang404 gaurang404 self-assigned this Feb 5, 2026
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