sylius/cart-bundle
Sylius CartBundle provides flexible shopping cart functionality for Symfony and Sylius applications, including cart and cart item models, add/update/remove operations, totals calculation, and integration with ecommerce workflows.
sylius/cart-bundle is a useful specification of what a cart bounded context owns: cart and cart-item persistence, add/remove/update line items, a recalculation pipeline for totals, a current-cart provider, extensible item resolvers, and the cart-to-order handoff. That decomposition is directly reusable as the acceptance-criteria skeleton for a Laravel-native build or a vendor evaluation rubric — regardless of whether you ever touch the code.Sylius/Sylius; the real question it raises is "do we adopt Sylius as a platform" versus "do we implement cart in Laravel." Treat the dependency as a pointer to that strategic conversation, not a candidate in the backlog.Consider it in exactly two narrow cases:
Look elsewhere — decisively — when:
To executives: This package is archived, marked deprecated, and its own maintainers point elsewhere. It is not a viable dependency: no security patches, no support path, and an upgrade liability that grows every PHP release. Recommendation: exclude it from build-or-buy evaluations and treat it strictly as a design reference. If it appears anywhere in our codebase or vendor tree, log it as a remediation item with a named owner and a scheduled exit date — prioritized by whether the affected service sits on an active upgrade path.
To engineering: Treat sylius/cart-bundle as documentation, not a dependency. Its value is as a reference model for the parts of cart we tend to under-specify: cart/order separation, cart-item resolution as a single normalization seam, a recalculation pipeline for totals, guest-cart merge on login, and the state transitions into order. Do not add it to a Laravel application — it is Symfony-native and would drag in DI, eventing, and Doctrine conventions for a component that is cheaper to own. Port the concepts: carts / cart_items schema with integer minor-unit prices, a scoped CartManager resolving cart from session or auth, an item resolver that converts user input into a validated line, and a pipeline for totals. Money in integers, never floats; cart storage in Redis or the database, never the session, if we expect to scale horizontally.
Bottom line: the only defensible decision this package supports is not to adopt it. Use it to sharpen the cart requirements and to confirm the cart is a separable bounded context — then build it natively in Laravel or buy something maintained and supported.
How can I help you explore Laravel packages today?