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

Taxation Bundle Laravel Package

vespolina/taxation-bundle

Vespolina TaxationBundle is a Symfony bundle for e-commerce tax handling, offering tax rules, rates, and calculation services that integrate with Vespolina components to resolve taxes and taxable prices in PHP applications.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Reality check first: vespolina/taxation-bundle is a Symfony2 bundle for the Vespolina ecommerce framework, not a Laravel package. There is no service provider, no Laravel auto-discovery, and its Composer constraints target PHP 5.x / Symfony 2.x / Doctrine 2.x. In a modern Laravel app you will not install it as a dependency.
  • Where to look first: read Model/ (the tax domain: tax zones, tax categories, tax rates, computed taxes) and Resources/config/ (service definitions). That is where the actual calculation logic and seams live.
  • First use case for a Laravel developer: mine the domain model, don't install the code. The reusable idea is a three-way resolution: product → tax category, address → tax zone, (zone, category) → tax rate, applied at cart/order calculation time.
  • If you genuinely need to run it: stand up a legacy Symfony 2 VM. Do not attempt to pull it into a current Laravel project.

Implementation Patterns

  • Domain concepts worth porting:
    • TaxZone — geographic grouping (country/region/state).
    • TaxCategory — product classification (standard, reduced, zero-rated). - TaxRate — percentage keyed by zone + category (with effective dates in real implementations).
    • Tax — the computed line attached to a cart/order item.
  • Typical calculation flow: for each cart line → resolve the product's tax category → resolve the customer/shipping address's tax zone → look up the matching rate → compute and attach the tax to the line.
  • Laravel integration tips if you're re-implementing:
    • Mirror the entities as Eloquent models: tax_zones, tax_categories, tax_rates, taxes.
    • Put resolution behind a single bound service (e.g. TaxCalculator) so the pricing pipeline can call one method: calculate(LineItem $item, Address $address): Money.
    • Keep the resolver pluggable — US nexus rules and EU VAT rules will not share one rate table.
  • If bridging at all: wrap the legacy service behind a queue job or an HTTP boundary. Do not expect to call bundle services directly from a Laravel container.

Gotchas and Tips

  • Health signal: 9 stars, 0 dependents, Symfony2-era code. Treat this as reference architecture, not a dependency. Expect abandonment.
  • Framework mismatch: no Laravel service provider, no modern autoload guarantee; patching PHP 5-era code to run on PHP 8 is likely more work than rewriting the ~few hundred lines of tax logic.
  • Config quirks: the real options live in DependencyInjection/Configuration.php and the bundle extension alias. Doctrine mapping overrides are also in Resources/config/doctrine/.
  • Debugging: the calculation is service-driven — trace the tax resolver/calculator service, not model methods. Model classes are largely data holders.
  • Extension points: the tax resolver/calculator interface is the seam. If you port the design, keep the same shape (resolve taxes for a line given a context object) so jurisdictional rules can be swapped without touching checkout code.
  • Biggest pitfall: assuming inclusive vs. exclusive pricing and rounding are handled for you. Verify explicitly whether tax is applied per-line or per-order, and how rounding is done at the totals stage — this is where most tax implementations quietly diverge from what finance expects.
  • Verdict for day-to-day use: not usable as a Laravel dependency. Use it as a small, readable reference for modeling tax zones/categories/rates, then implement the calculator natively.
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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings