Weave 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

Pricing Bundle Laravel Package

sylius/pricing-bundle

Sylius PricingBundle provides the pricing engine for Sylius e-commerce applications. It resolves and calculates product variant prices using configurable price providers, calculators, and context, with support for channel-specific pricing and custom pricing logic.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Poor to none from a Laravel perspective. sylius/pricing-bundle is a Symfony bundle from the Sylius e-commerce stack, not a framework-agnostic PHP library. Its wiring depends on Symfony's DI compiler passes, bundle registration, Doctrine ORM entity mapping, and the sylius/resource-bundle / sylius/registry lineage. Laravel has no bundle concept, a different container lifecycle (service providers vs. compile-time passes), and Eloquent rather than Doctrine. The only genuinely portable asset is the design idea: an ordered resolver chain that dispatches "resolve the price of this subject" to type-specific resolvers with a registry, priority ordering, and fallbacks. That pattern is roughly 200–300 lines to reimplement natively.

Integration feasibility. Low, and the blockers are independent, not cumulative mitigations:

  1. Framework coupling. Even inside the Sylius ecosystem this bundle is superseded by pricing living in sylius/sylius core; installing the standalone archived bundle means fighting duplicate/competing service definitions.
  2. Dependency graph. An archived bundle pins PHP 5.x/7.0-era constraints and old Symfony/Doctrine majors. Composer will either refuse to resolve against PHP 8.2+/Laravel 10–12 or force you to --ignore-platform-reqs, which is not a production posture. Either outcome is a red flag for procurement.
  3. Abandonment. No maintainer, no releases, no security response. 10 stars and 0 dependents mean there is no living user base to inherit fixes from.

Technical risk. High and asymmetric. Downside is unbounded: unpatched transitive dependencies and silent pricing errors in the most revenue-sensitive path in the product. Upside is a few hundred lines of resolver logic a competent engineer can rebuild in 1–2 weeks. Pricing bugs are also the class of bug discovered by customers and finance, not by tests — the reputational cost of a wrong price in production dwarfs the development savings.

Key questions for the requesting team.

  • What is the actual problem: multi-currency resolution, tiered/volume pricing, price-type precedence (original vs. discount vs. custom), or per-channel overrides? The answer determines whether the resolver-chain model is even the right abstraction.
  • Are we Laravel, Symfony/Sylius, or mixed? If mixed, the correct move for the Symfony side is sylius/sylius core pricing — not this bundle — and the correct move for the Laravel side is a native reimplementation.
  • What PHP/Laravel versions must we support, and is there an existing pricing abstraction we would be replacing or wrapping?
  • Is there a committed owner and ongoing test budget to own a fork permanently, or is this a one-time extraction? If the former isn't true, the only viable path is pattern-copy.
  • Governance note: the 8.29 "opportunity" score alongside 10 stars, 0 dependents, and archived: yes is a supply-side signal — few alternatives, low competition — not evidence of fitness. It should not be used to justify adoption in any review.

Verdict. Do not adopt as a dependency. Treat it as a reference implementation: read once, produce a decision table, then build a Laravel-native resolver chain owned by us.

Integration Approach

Stack fit. Zero for Laravel, weak even for modern Symfony. There is no configuration in which this is the lowest-friction answer; the lowest-friction answer is always "use the vendor's current core module or write ~300 lines of first-party code."

Migration path. Treat this as pattern extraction, not a package install:

  1. Read and document. Vendor the source into a read-only reference repo. Enumerate every shipped resolver, its ordering, and its fallback semantics. Produce a one-page decision table mapping input (subject, currency, channel, quantity, customer group, date) → resolver → output price. This table is the artifact the TPM manages; it becomes the contract engineering implements against.
  2. Reimplement natively in Laravel. Define PriceResolver as a contract; implement concrete resolvers (base price, channel override, customer-group tier, promotion, round) as small injectable classes. Register via container tags and execute through Illuminate\Pipeline\Pipeline so ordering and short-circuiting are explicit, configurable, and testable.
  3. Model pricing data in Eloquent, not Doctrine. Money as integer minor units; explicit currency_code; a prices table keyed by (priceable_type, priceable_id, currency_code, channel_id, price_type, min_quantity).
  4. Cut over behind a feature flag with shadow-mode comparison against the existing pricing path for a defined reconciliation window.

Compatibility. Assume nothing works out of the box: PHP 8.2/8.3, Laravel 10–12, Symfony 6/7, and Doctrine 3 are all effectively out of scope. Any attempt to composer require this is a fork-and-rewrite project wearing a dependency-management costume; budget accordingly.

Sequencing. (1) Domain discovery and resolver decision table; (2) confirm the data model and rounding/currency policy with finance (this is a sign-off gate, not a technical detail); (3) build the internal pricing package with unit tests per resolver plus a property-based test for ordering and precedence; (4) integrate behind the flag in shadow mode; (5) reconcile discrepancies against the legacy path; (6) remove the flag and delete the reference fork from the dependency graph. Roughly 1–2 engineer-weeks for a competent PHP developer; the reading phase is hours, not days, because the bundle is small.

Operational Impact

Maintenance. Adoption converts a third-party dependency into a first-party liability on day one — there is no upstream to patch, so every PHP/Laravel upgrade becomes a manual re-validation of vendored Symfony/Doctrine code. Reimplementation, by contrast, has a normal maintenance profile: our code, our tests, our upgrade cadence, our choice of idioms.

Support. None. No maintainer, no issue triage, no CVE channel. For code directly on the price path this is the dominant concern: a security advisory in a transitive Symfony/Doctrine component leaves us with no supported fix path and no vendor to call. This will trigger legal/procurement pushback on any formal review and should be pre-empted in the proposal.

Scaling. Resolution itself is cheap and cacheable; the architectural risk is N+1. A per-object resolver chain invites one lookup per product/variant when rendering catalog or cart pages. Mitigations the team must design in from the start: eager-load price sets, a resolver-result cache keyed by (subject, currency, channel, quantity, price-version), and an explicit invalidation hook on price mutation. A naive resolver chain that iterates all providers per quote will not survive catalog-scale volume.

Failure modes to instrument explicitly.

  • No resolver matched → returns null/0 and a $0.00 line item renders. Fail loudly in non-production, log-and-alert in production; never silently default to zero.
  • Currency or channel mismatch → wrong price shown, or fallback to base price when a channel override exists. Assert currency equality at the resolver boundary.
  • Rounding drift across composition (discount before vs. after currency conversion). Fix the order in the contract and test it.
  • Stale cached prices after admin edits — tie cache keys to a price-version counter.
  • Resolver ordering regressions when a new resolver is added — ordering must be configuration, not discovery order.

Ramp-up. The bundle is small enough that a mid-level PHP engineer can read it in an afternoon, but interpreting why it is structured that way requires Sylius/Symfony e-commerce context a Laravel team likely lacks. Plan a half-day knowledge transfer from whoever surfaced the package, paired with the written decision table so the knowledge does not live in one head. Net ramp-up for the reimplementation is low; the real risk is that the team copies the Doctrine/Symfony shape into Laravel by inertia rather than translating it into Eloquent and pipeline idioms. The TPM's job is to gate the decision table and the finance sign-off, then hold the team to "our idioms, not theirs."

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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource