- Can I use sylius/pricing-bundle in a Laravel application?
- No. sylius/pricing-bundle is a Symfony bundle that depends on Symfony DI compiler passes, bundle registration, Doctrine ORM entity mapping, and the sylius/resource-bundle lineage. Laravel has no bundle concept, a different container lifecycle, and uses Eloquent rather than Doctrine. The only portable asset is the resolver-chain design idea, which is roughly 200 to 300 lines to reimplement natively in Laravel.
- Is sylius/pricing-bundle still maintained?
- No, it is archived with no maintainer, no releases, and no security response process. It has around 10 stars and 0 dependents, so there is no living user base to inherit fixes from. Adopting an archived package in a revenue-sensitive path is a high and asymmetric risk.
- What does sylius/pricing-bundle actually do?
- It provides the pricing engine for Sylius e-commerce applications by resolving and calculating product variant prices. It uses configurable price providers, calculators, and context, with support for channel-specific pricing and custom pricing logic. Architecturally, it is an ordered resolver chain that dispatches a request to resolve the price of a subject to type-specific resolvers with a registry, priority ordering, and fallbacks.
- How do I install sylius/pricing-bundle with Composer on PHP 8.2?
- Composer will likely refuse to resolve because the archived bundle pins PHP 5.x and 7.0-era constraints and old Symfony and Doctrine majors. Forcing it with --ignore-platform-reqs is not a production posture. Either outcome is a red flag for procurement.
- Does sylius/pricing-bundle work with Laravel 10, 11, or 12?
- No. The package is a Symfony bundle with Symfony and Doctrine coupling, so it does not integrate with Laravel 10, 11, or 12. Composer constraints will conflict with modern PHP and framework versions. There is no configuration where this is the lowest-friction answer for a Laravel application.
- What is a good Laravel alternative to Sylius PricingBundle for multi-currency pricing?
- There is no drop-in Laravel alternative in this package. The practical path is to define a PriceResolver contract and implement a native resolver chain, with resolvers for currency, channel, quantity, customer group, and date-based rules. Document the input-to-resolver-to-output decision table first, then implement it as first-party Laravel code your team owns.
- How do I implement channel-specific pricing in Laravel without Sylius?
- Start by defining a context object that carries subject, currency, channel, quantity, customer group, and date. Then build an ordered resolver chain with a registry, priority ordering, and fallback semantics so each resolver handles one pricing concern. This mirrors the Sylius pattern without inheriting the Symfony and Doctrine coupling.
- What are the risks of using an archived Composer package like sylius/pricing-bundle?
- The downside is unbounded: unpatched transitive dependencies, no security response, and silent pricing errors in the most revenue-sensitive path in the product. Pricing bugs are usually discovered by customers and finance rather than by tests, so the reputational cost of a wrong price in production dwarfs any development savings. The upside is only a few hundred lines of resolver logic that a competent engineer can rebuild in one to two weeks.
- Is the resolver chain pattern from Sylius PricingBundle worth copying?
- Yes, the pattern is the genuinely portable asset. It is an ordered resolver chain that dispatches a resolve-the-price request to type-specific resolvers with a registry, priority ordering, and fallbacks. Read the source once, produce a one-page decision table mapping inputs to resolvers to output prices, then build a Laravel-native version owned by your team.
- How do I test a custom Laravel pricing resolver implementation?
- Unit test each resolver against the decision table inputs: subject, currency, channel, quantity, customer group, and date. Add integration tests for precedence and fallback ordering, including channel overrides and original versus discount versus custom price types. Because pricing bugs are found by finance and customers, include boundary and regression tests for every price rule you ship.