minor #37692 KernelBrowser::getContainer cannot return null anymore (VincentLanglet)
This PR was merged into the 5.1 branch.
Discussion
----------
KernelBrowser::getContainer cannot return null anymore
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| License | MIT
This is a pedantic change.
In symfony 4.4, getContainer could return null.
Since symfony 5.0, this is the implementation:
```
public function getContainer()
{
if (!$this->container) {
throw new \LogicException('Cannot retrieve the container from a non-booted kernel.');
}
return $this->container;
}
```
So I updated the phpdoc.
Commits
-------
257549e9c8
getContainer cannot return null anymore
This commit is contained in:
commit
c931d073a4
@ -45,7 +45,7 @@ class KernelBrowser extends HttpKernelBrowser
|
||||
/**
|
||||
* Returns the container.
|
||||
*
|
||||
* @return ContainerInterface|null Returns null when the Kernel has been shutdown or not started yet
|
||||
* @return ContainerInterface
|
||||
*/
|
||||
public function getContainer()
|
||||
{
|
||||
|
Reference in New Issue
Block a user