Workaround doctrine serialisation issue in integration tests

Doctrine uses a default ProxyClassNameResolver but it is implemented
as an anonymous class and can not be serialised. This commit adds a custom
ProxyClassNameResolver that copies the anonymous one so that we avoid using the
anonymous fallback.
[MAILPOET-3658]
This commit is contained in:
Rostislav Wolny
2021-06-17 12:53:22 +02:00
committed by Veljko V
parent e0e4c507dd
commit f77392ade4
2 changed files with 28 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ class TablePrefixMetadataFactory extends ClassMetadataFactory {
throw new \RuntimeException('DB table prefix not initialized');
}
$this->prefix = Env::$dbPrefix;
$this->setProxyClassNameResolver(new ProxyClassNameResolver());
}
public function getMetadataFor($className) {