Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
37 | protected function getContainer() |
||
38 | { |
||
39 | if (null !== static::$kernel) { |
||
40 | static::$kernel->shutdown(); |
||
41 | } |
||
42 | // run in our own test environment. Sf by default uses the 'test' one. We let phpunit.xml set it... |
||
43 | $options = array( |
||
44 | 'environment' => $_SERVER['SYMFONY_ENV'] |
||
45 | ); |
||
46 | static::$kernel = static::createKernel($options); |
||
47 | static::$kernel->boot(); |
||
48 | return static::$kernel->getContainer(); |
||
49 | } |
||
50 | } |
||
51 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.