If you think you found a bug, please create a ticket in the bug tracker.
If you take code quality seriously, try out the new continuous inspection service.
By default, this bundle sets the type of database columns which store amounts to
decimal with the
precision set to
scale set to
5. This means that the greatest amount you are able to process is
In case you need to accept payments of greater value, it?s possible to override the entity mapping supplied by this bundle and use a custom one. Keep reading for instructions on how to do this.
Start by copying the mapping files from this bundle to your application:
cd my-app mkdir -p config/packages/JMSPaymentCoreBundle cp vendor/jms/payment-core-bundle/JMS/Payment/CoreBundle/Resources/config/doctrine/* config/packages/JMSPaymentCoreBundle/
You now have a copy of the following mapping files under
The next step is to tell Symfony to use your copy of the files instead of the ones supplied by this bundle:
# config/packages/doctrine.yml doctrine: orm: # ... mappings: JMSPaymentCoreBundle: type: xml dir: '%kernel.root_dir%/config/packages/JMSPaymentCoreBundle' prefix: JMS\Payment\CoreBundle\Entity alias: JMSPaymentCoreBundle
Symfony is now using your custom mapping. Taking
PaymentInstruction.orm.xml as an example, we can increase the maximum value of the
amount column as follows:
<!-- config/packages/JMSPaymentCoreBundle/PaymentInstruction.orm.xml --> <!-- Set maximum value to 9999999999.99999 --> <field name="amount" type="decimal" precision="15" scale="5" />
decimalcolumns in all the mapping files.
Now that you changed the mapping, you need to update your database schema.
If you?re not using database migrations:
Or, if you?re using migrations:
bin/console doctrine:migrations:diff bin/console doctrine:migrations:migrate