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
Monnaie Bundle

Monnaie Bundle Laravel Package

lyssal/monnaie-bundle

Symfony bundle for currency and money management. Provides entities and services to define currencies, store monetary amounts, perform conversions, and format prices consistently across your application, with integration for Doctrine and Twig.

View on GitHub
Deep Wiki
Context7

Bundle permettant de gérer des monnaies.

Frequently asked questions about Monnaie Bundle
Can I use lyssal/monnaie-bundle in a Laravel application?
No, not directly. lyssal/monnaie-bundle is a Symfony bundle, so it ships a bundle class and Symfony service definitions rather than a Laravel service provider, facade, or config file. You could technically pull in individual classes through Composer, but you would have to wire the services, Doctrine mappings, and Twig extension yourself. For a Laravel project, a framework-agnostic money library wrapped in a custom cast or service is almost always the cleaner choice.
How do I install lyssal/monnaie-bundle with Composer?
Install it with composer require lyssal/monnaie-bundle, then register the bundle in config/bundles.php if you are not using Symfony Flex. After that, make sure the bundle's Doctrine entity mappings are picked up by your ORM configuration and run a schema migration. Always check the version constraint on Packagist first, since older Lyssal bundles may not target your current Symfony release.
Does lyssal/monnaie-bundle work with Doctrine ORM?
Yes. The bundle provides currency and monetary amount entities that are designed to be persisted through Doctrine, which is the main reason to use it over a plain value-object library. You will need to register the mappings and generate migrations so the corresponding tables exist in your database. Verify the generated column types for amounts before going to production, because numeric precision matters more than the default mapping might suggest.
How do I format a price with Twig using this bundle?
The bundle integrates with Twig so that monetary amounts can be rendered consistently in templates instead of being formatted ad hoc in controllers. The exact filter or function name depends on the Twig extension shipped in the version you install, so check the bundle's Resources or Extension directory after installation. Centralising formatting in Twig is useful because locale, currency symbol, and decimal separators stay consistent across every view.
Which Symfony and PHP versions does lyssal/monnaie-bundle support?
Support depends entirely on the tagged release you install, since Lyssal bundles have been published over a long period and older tags target much older Symfony versions. Read the require block in the package's composer.json on Packagist before adding it to a modern Symfony 6 or 7 application. If the constraint does not match, Composer will refuse the install or resolve an outdated tag that lacks the features you expect.
How should I store monetary amounts to avoid rounding errors?
Never store money in a float column. Use a DECIMAL column with explicit precision and scale, or store integer minor units, and let the bundle's amount object handle the value in PHP. When converting between currencies or applying percentages, round only at the final step and use a documented rounding mode. If the bundle's default mapping does not match your precision requirements, override it rather than relying on database defaults.
How does currency conversion work in lyssal/monnaie-bundle?
The bundle exposes services for converting amounts between the currencies you have defined, but it is not a live exchange-rate provider. You are responsible for supplying and refreshing the rates, typically by importing them from an external API or storing them in your own table on a schedule. Cache converted values if you display them frequently, and always record which rate was used so historic orders remain reproducible.
How do I test money handling in a Symfony or Laravel application?
Test the business rules, not the bundle internals. Assert that amounts round correctly at boundaries, that conversions use the expected rate, and that formatted output matches the locale you configured. If you are using the bundle's Doctrine entities, use a test database with the real schema so column precision problems surface in CI rather than in production.
Is lyssal/monnaie-bundle still actively maintained?
Maintenance is the main risk with this package, so check the repository's commit history and latest release date before committing to it. Lyssal bundles are single-maintainer projects and some have gone a long time without updates, which matters for newer Symfony and PHP versions. If the last release predates your framework version, plan a migration path instead of patching the bundle yourself.
What are the best alternatives to lyssal/monnaie-bundle?
For Symfony, moneyphp/money or brick/money paired with a small Doctrine type and a Twig extension covers the same ground with active maintenance and far better test coverage. In Laravel, moneyphp/money wrapped in a custom cast, or a dedicated Laravel money package, integrates more naturally than a Symfony bundle. Choose based on whether you actually need the bundle's ready-made currency entities or just reliable arithmetic and formatting.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect