buendon/pwinty-bundle
Symfony bundle providing a service and OO API to interact with the Pwinty photo printing API (via php-pwinty fork). Configure merchant ID, API key, and sandbox/production endpoints, then create and submit orders from your Symfony app.
Container and Kernel introduces high architectural friction.PwintyService class could be adapted into a Laravel service provider with minimal refactoring.ContainerInterface and Kernel, which are not natively available in Laravel. Workarounds include:
php-pwinty (dev-api_2.3) introduces versioning risk. The original repo’s compatibility with API 2.3 is untested, requiring PR coordination with Pwinty.config.yml format clashes with Laravel’s config/services.php. Migration would require a custom config loader or manual mapping.php-pwinty repo to stabilize the API 2.3 branch.OrderException is generic; Laravel’s exception handling (e.g., throw_if) would need alignment.php-pwinty fork?
config.yml → Laravel’s config/services.php.retry helper).Guzzle + Pwinty API docs for a lighter approach.php-pwinty library and wrap it in a Laravel service provider (e.g., PwintyServiceProvider).laravel-pwinty) using Laravel’s Container and Config.symfony/dependency-injection and symfony/http-kernel. These can be excluded if refactored, but may pull in unnecessary Symfony components.php-pwinty logic is needed.php-pwinty directly with Guzzle.AppKernel.php registration with a Laravel service provider:
// app/Providers/PwintyServiceProvider.php
public function register() {
$this->app->singleton(PwintyService::class, function ($app) {
return new PwintyService(
$app['config']['services.pwinty.merchantId'],
$app['config']['services.pwinty.apiKey'],
$app['config']['services.pwinty.apiType']
);
});
}
// config/services.php
'pwinty' => [
'api_type' => env('PWINTY_API_TYPE', 'sandbox'),
'merchant_id' => env('PWINTY_MERCHANT_ID'),
'api_key' => env('PWINTY_API_KEY'),
],
Container::get() with Laravel’s DI (e.g., $this->container->get() → $this->app->make() or constructor injection).Kernel dependencies with Laravel’s Request/Response or standalone logic.php-pwinty dev-api_2.3, but the original repo may diverge. Solution:
composer.json:
"pwinty/php-pwinty": "dev-api_2.3#abc123"
merchantId/apiKey to Laravel’s .env:
PWINTY_MERCHANT_ID=your_id
PWINTY_API_KEY=your_key
PWINTY_API_TYPE=sandbox
OrderException to Laravel’s Exception hierarchy or use throw_if for validation.php-pwinty works with API 2.3.PwintyService (mock HTTP calls)..env requirements and error cases.php-pwinty repo to avoid fork drift..env + config/services.php will need updates if Pwinty’s API keys or endpoints change.Cache facade.retry helper with exponential backoff.How can I help you explore Laravel packages today?