Inject a custom Controller in Sonata

I had this problem, I needed to inject a Storage to my controller so I can create a custom action and connect to my db using a storage service. All I needed was configure the services as following: [cc_yaml] services: app.admin.document: class: AppBundle\Admin\DocumentAdmin arguments: [~, AppBundle\Entity\Document, ‘app.controller.document’] tags: – { name: sonata.admin, manager_type: orm, group:

Composer update creates a lack of memory

While using Symfony 2 it’s common that you have to run the command composer update. Sometimes we’re graced with the error: The following exception is caused by a lack of memory and not having swap configured PHP Fatal error: Uncaught exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:954 Stack trace: