Skip to content

out of memory exception while creating container #25821

Closed
@SimonHeimberg

Description

@SimonHeimberg
Q A
Bug report? yes
Feature request? no
BC Break report? yes? (seems to work with 3.3.14)
RFC? no
Symfony version 3.4.3
php version 7.0.19-1

how to reproduce:

composer.phar create-project symfony/skeleton tryFailure 3.4.5
cd tryFailure
composer.phar require orm-pack symfony/validator symfony/form
composer.phar require cubetools/cube-custom-field-bundle:dev-withNewerSymfony_WIP 
# command reports an error
bin/console cache:clear --no-warmup
bin/console cache:warmup
# reports memory overflow

after doing following changes, the containter is created in short time:

--- a/vendor/cubetools/cube-custom-field-bundle/src/Utils/CustomFieldRepoService.php
+++ b/vendor/cubetools/cube-custom-field-bundle/src/Utils/CustomFieldRepoService.php
@@ -14,10 +16,10 @@ class CustomFieldRepoService
     private $configReader;
     private $em;
 
-    public function __construct(ConfigReader $configReader, EntityManagerInterface $em)
+    public function __construct(ConfigReader $configReader)//, EntityManagerInterface $em)
     {
         $this->configReader = $configReader;
-        $this->em = $em;
+        //$this->em = $em;
     }
 
     /**

But EntityManagerInterface is used in several places... Why does this one block?

It looks like building the container gets into a long (endless?) loop, always allocating more memory.

Is there a workaround?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions