Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ecommerce Laravel Package

sonata-project/ecommerce

Symfony-based e-commerce platform from Sonata, offering a full shopping stack with product catalog, orders, payments, shipping, customer accounts, admin backend, and integrations. Built for extensibility and customization in complex commerce projects.

View on GitHub
Deep Wiki
Context7

E-Commerce solution provided by Sonata

Frequently asked questions about Ecommerce
Can Sonata eCommerce work in Laravel despite being Symfony-based?
Yes, but with effort. You’ll need to bridge Symfony components (like Doctrine ORM) with Laravel’s ecosystem using tools like `symfony/http-foundation` or `DoctrineBridge`. SonataAdminBundle can be replaced with Laravel-native alternatives like Filament or Nova to reduce conflicts. However, tight coupling with Symfony may require refactoring.
What Laravel versions does Sonata eCommerce support?
The package was last updated in 2021 and lacks official Laravel 10+ support. You’ll need to manually test compatibility with PHP 8.2+ and Symfony 6.x, likely via Docker or Laravel Sail. Expect potential issues with Laravel’s newer features like enums or attributes, which Sonata doesn’t natively support.
How do I migrate existing Sonata eCommerce data to Laravel?
Start by exporting data from Sonata’s Doctrine schema (e.g., products, orders) and importing it into Laravel’s Eloquent models. Use tools like `doctrine/dbal` to generate Laravel migrations or write custom Eloquent factories. For complex relationships, consider a hybrid approach where Doctrine and Eloquent models coexist temporarily.
Are there modern alternatives to Sonata eCommerce for Laravel?
Yes. For modular e-commerce, consider Spatie’s packages (e.g., `laravel-shoppingcart`, `spatie/laravel-money`) or full stacks like Bagisto or Aimeos. Laravel-specific solutions avoid Symfony dependencies and offer better long-term maintenance. If you need a headless API, pair Spatie’s components with Laravel Sanctum or Passport.
How can I replace SonataAdminBundle in Laravel without losing functionality?
Use Filament or Nova to rebuild the admin panel while reusing Sonata’s business logic (e.g., product/customer models). Abstract Sonata-specific services into a facade or repository layer to decouple them. For example, wrap Doctrine queries in Eloquent-compatible methods. This approach minimizes rewrite effort while modernizing the stack.
What payment gateways are supported, and how do I update them for modern APIs?
Sonata supports plugins for Stripe, PayPal, and others, but these may rely on deprecated SDKs. Update the plugins to use the latest gateway APIs (e.g., Stripe’s PHP library v10+) and test thoroughly. If plugins are abandoned, consider building custom services using Laravel’s HTTP client or Cashier for Stripe integration.
Will Sonata eCommerce work with Laravel’s Blade templating system?
No, Sonata uses Twig by default. You can gradually migrate Twig templates to Blade by rewriting them or using Inertia.js to render views in Vue/React. For dynamic content, consider a hybrid approach where Twig templates are served via a microservice or replaced incrementally. JS libraries (e.g., jQuery) may also need modernization for SPAs.
How do I test Sonata eCommerce in a Laravel project before full migration?
Containerize Sonata in a Laravel microservice using Docker to isolate dependencies. Use Laravel’s testing tools (Pest, Dusk) to validate critical flows like cart updates, checkout, and order processing. Mock external services (e.g., payment gateways) with Laravel’s HTTP testing or factories to avoid real API calls during tests.
What are the biggest security risks of using an abandoned package like Sonata eCommerce?
The primary risks include unpatched vulnerabilities in Symfony/Doctrine dependencies and outdated payment gateway integrations. Run `composer audit` to identify CVEs, and manually verify that payment flows (e.g., PCI compliance) meet modern standards. Consider replacing deprecated components with Laravel’s built-in security features (e.g., Sanctum for auth).
Should I fork Sonata eCommerce to maintain it, or build a custom solution?
Forking is viable if your team has Symfony/Laravel interop experience and the time to backport fixes for PHP 8.x/Symfony 6.x. However, building a custom solution using Spatie’s modular packages or a Laravel-first stack (e.g., Filament + Spatie) may be more sustainable long-term. Weigh the effort of maintenance against the risk of technical debt.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui