1 | <?php |
||
20 | class DoctrineBundle extends Bundle |
||
21 | { |
||
22 | /** @var callable|null */ |
||
23 | private $autoloader; |
||
24 | |||
25 | /** |
||
26 | * {@inheritDoc} |
||
27 | */ |
||
28 | public function build(ContainerBuilder $container) |
||
29 | { |
||
30 | parent::build($container); |
||
31 | |||
32 | $container->addCompilerPass(new RegisterEventListenersAndSubscribersPass('doctrine.connections', 'doctrine.dbal.%s_connection.event_manager', 'doctrine'), PassConfig::TYPE_BEFORE_OPTIMIZATION); |
||
33 | |||
34 | if ($container->hasExtension('security')) { |
||
35 | $container->getExtension('security')->addUserProviderFactory(new EntityFactory('entity', 'doctrine.orm.security.user.provider')); |
||
|
|||
36 | } |
||
37 | |||
38 | $container->addCompilerPass(new DoctrineValidationPass('orm')); |
||
39 | $container->addCompilerPass(new EntityListenerPass()); |
||
40 | $container->addCompilerPass(new ServiceRepositoryCompilerPass()); |
||
41 | $container->addCompilerPass(new WellKnownSchemaFilterPass()); |
||
42 | $container->addCompilerPass(new DbalSchemaFilterPass()); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * {@inheritDoc} |
||
47 | */ |
||
48 | public function boot() |
||
95 | |||
96 | /** |
||
97 | * {@inheritDoc} |
||
98 | */ |
||
99 | public function shutdown() |
||
100 | { |
||
101 | if ($this->autoloader !== null) { |
||
102 | spl_autoload_unregister($this->autoloader); |
||
103 | $this->autoloader = null; |
||
104 | } |
||
105 | |||
106 | // Clear all entity managers to clear references to entities for GC |
||
107 | if ($this->container->hasParameter('doctrine.entity_managers')) { |
||
108 | foreach ($this->container->getParameter('doctrine.entity_managers') as $id) { |
||
109 | if (! $this->container->initialized($id)) { |
||
110 | continue; |
||
111 | } |
||
112 | |||
113 | $this->container->get($id)->clear(); |
||
114 | } |
||
115 | } |
||
116 | |||
117 | // Close all connections to avoid reaching too many connections in the process when booting again later (tests) |
||
118 | if (! $this->container->hasParameter('doctrine.connections')) { |
||
119 | return; |
||
120 | } |
||
121 | |||
122 | foreach ($this->container->getParameter('doctrine.connections') as $id) { |
||
123 | if (! $this->container->initialized($id)) { |
||
124 | continue; |
||
125 | } |
||
126 | |||
127 | $this->container->get($id)->close(); |
||
128 | } |
||
129 | } |
||
130 | |||
131 | /** |
||
132 | * {@inheritDoc} |
||
133 | */ |
||
134 | public function registerCommands(Application $application) |
||
137 | } |
||
138 |
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.