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:
Fabien Potencier 2020-07-29 07:54:25 +02:00
commit c931d073a4

View File

@ -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()
{