Open kije opened 5 years ago
Had the same issue, but found that the culprit, at least im my case, was the doctrine orm
auto_generate_proxy_classes: false
setting in production mode.
Fixed it for now by setting auto_generate_proxy_classes: 2
see: AbstractProxyFactory.php
When using PayumBundle in Symfony 4 (flex), the Doctrine ORM mapping information for the PaymentToken Entity are not loaded when
APP_ENV=prod
.This leads to an exception when trying to override the definition of the
hash
-Column (via@attributeOverride
) to make it comaptible withutf8mb4_unicode_ci
encoding (see Issue #319 ). More information below.The cause of this problem seems to be if there is a additional
config/packages/prod/doctrine.yaml
(as created by the default Symfony 4 setup) file with some additional configuration for Doctrine in the Production-Environment. The issue seems to be in theprepend()
-Method of thePayum\Bundle\PayumBundle\DependencyInjection\PayumExtension
class (see https://github.com/Payum/PayumBundle/blob/master/DependencyInjection/PayumExtension.php#L81 )If I delete the file
config/packages/prod/doctrine.yaml
or whenAPP_ENV=dev
, everything works fine.Further information
Error when running
composer install
The Command
composer install --no-dev
outputs the following:.env
PaymentToken.php
config/packages/prod/doctrine.yaml