1 | <?php |
||
19 | class DoctrineBundle extends Bundle |
||
20 | { |
||
21 | /** @var callable|null */ |
||
22 | private $autoloader; |
||
23 | |||
24 | /** |
||
25 | * {@inheritDoc} |
||
26 | */ |
||
27 | public function build(ContainerBuilder $container) |
||
28 | { |
||
29 | parent::build($container); |
||
30 | |||
31 | $container->addCompilerPass(new RegisterEventListenersAndSubscribersPass('doctrine.connections', 'doctrine.dbal.%s_connection.event_manager', 'doctrine'), PassConfig::TYPE_BEFORE_OPTIMIZATION); |
||
32 | |||
33 | if ($container->hasExtension('security')) { |
||
34 | $container->getExtension('security')->addUserProviderFactory(new EntityFactory('entity', 'doctrine.orm.security.user.provider')); |
||
|
|||
35 | } |
||
36 | |||
37 | $container->addCompilerPass(new DoctrineValidationPass('orm')); |
||
38 | $container->addCompilerPass(new EntityListenerPass()); |
||
39 | $container->addCompilerPass(new ServiceRepositoryCompilerPass()); |
||
40 | $container->addCompilerPass(new DbalSchemaFilterPass()); |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * {@inheritDoc} |
||
45 | */ |
||
46 | public function boot() |
||
93 | |||
94 | /** |
||
95 | * {@inheritDoc} |
||
96 | */ |
||
97 | public function shutdown() |
||
98 | { |
||
99 | if ($this->autoloader !== null) { |
||
100 | spl_autoload_unregister($this->autoloader); |
||
101 | $this->autoloader = null; |
||
102 | } |
||
103 | |||
104 | // Clear all entity managers to clear references to entities for GC |
||
105 | if ($this->container->hasParameter('doctrine.entity_managers')) { |
||
106 | foreach ($this->container->getParameter('doctrine.entity_managers') as $id) { |
||
107 | if (! $this->container->initialized($id)) { |
||
108 | continue; |
||
109 | } |
||
110 | |||
111 | $this->container->get($id)->clear(); |
||
112 | } |
||
113 | } |
||
114 | |||
115 | // Close all connections to avoid reaching too many connections in the process when booting again later (tests) |
||
116 | if (! $this->container->hasParameter('doctrine.connections')) { |
||
117 | return; |
||
118 | } |
||
119 | |||
120 | foreach ($this->container->getParameter('doctrine.connections') as $id) { |
||
121 | if (! $this->container->initialized($id)) { |
||
122 | continue; |
||
123 | } |
||
124 | |||
125 | $this->container->get($id)->close(); |
||
126 | } |
||
127 | } |
||
128 | |||
129 | /** |
||
130 | * {@inheritDoc} |
||
131 | */ |
||
132 | public function registerCommands(Application $application) |
||
135 | } |
||
136 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.