diff --git a/src/Eccube/Kernel.php b/src/Eccube/Kernel.php index 81a3164ced3..01e68d935f0 100644 --- a/src/Eccube/Kernel.php +++ b/src/Eccube/Kernel.php @@ -80,6 +80,9 @@ public function registerBundles() */ public function boot() { + // Symfonyがsrc/Eccube/Entity以下を読み込む前にapp/proxy/entity以下をロードする + $this->loadEntityProxies(); + parent::boot(); // DateTime/DateTimeTzのタイムゾーンを設定. @@ -246,4 +249,11 @@ protected function addEntityExtensionPass(ContainerBuilder $container) } } } + + protected function loadEntityProxies() + { + foreach (glob(__DIR__.'/../../app/proxy/entity/*.php') as $file) { + require_once $file; + } + } }