File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -312,17 +312,22 @@ your data structure. This could be necessary to update relations with some speci
312312logic or to create new entities.
313313
314314Therefore you can just implement the ContainerAwareInterface with its needed methods
315- to get full access to the container.
315+ to get full access to the container or ContainerAwareTrait if you use Symfony >= 2.4 .
316316
317317.. code-block :: php
318318
319319 // ...
320320 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
321321 use Symfony\Component\DependencyInjection\ContainerInterface;
322+ // Symfony >= 2.4
323+ use Symfony\Component\DependencyInjection\ContainerAwareTrait;
322324
323325 class Version20130326212938 extends AbstractMigration implements ContainerAwareInterface
324326 {
325-
327+ // Symfony >= 2.4
328+ use ContainerAwareTrait;
329+
330+ // Symfony 2.3
326331 private $container;
327332
328333 public function setContainer(ContainerInterface $container = null)
You can’t perform that action at this time.
0 commit comments