minor #33161 [FrameworkBundle] Add parameter types from DependencyInjection (derrabus)

This PR was merged into the 5.0-dev branch.

Discussion
----------

[FrameworkBundle] Add parameter types from DependencyInjection

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32179
| License       | MIT
| Doc PR        | N/A

This PR makes FrameworkBundle incompatible with DependencyInjection 4.4. Let's merge whenever we feel ready to do the bump.

Commits
-------

b2a3aa64bf [FrameworkBundle] Add parameter types from DependencyInjection.
This commit is contained in:
Nicolas Grekas 2019-08-16 08:27:42 +02:00
commit 23334dfa42
2 changed files with 7 additions and 7 deletions

View File

@ -57,7 +57,7 @@ class TestContainer extends Container
/**
* {@inheritdoc}
*/
public function getParameter($name)
public function getParameter(string $name)
{
return $this->getPublicContainer()->getParameter($name);
}
@ -65,7 +65,7 @@ class TestContainer extends Container
/**
* {@inheritdoc}
*/
public function hasParameter($name)
public function hasParameter(string $name)
{
return $this->getPublicContainer()->hasParameter($name);
}
@ -73,7 +73,7 @@ class TestContainer extends Container
/**
* {@inheritdoc}
*/
public function setParameter($name, $value)
public function setParameter(string $name, $value)
{
$this->getPublicContainer()->setParameter($name, $value);
}
@ -81,7 +81,7 @@ class TestContainer extends Container
/**
* {@inheritdoc}
*/
public function set($id, $service)
public function set(string $id, $service)
{
$this->getPublicContainer()->set($id, $service);
}
@ -97,7 +97,7 @@ class TestContainer extends Container
/**
* {@inheritdoc}
*/
public function get($id, $invalidBehavior = /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1)
public function get($id, int $invalidBehavior = /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1)
{
return $this->getPrivateContainer()->has($id) ? $this->getPrivateContainer()->get($id) : $this->getPublicContainer()->get($id, $invalidBehavior);
}
@ -105,7 +105,7 @@ class TestContainer extends Container
/**
* {@inheritdoc}
*/
public function initialized($id)
public function initialized(string $id)
{
return $this->getPublicContainer()->initialized($id);
}

View File

@ -20,7 +20,7 @@
"ext-xml": "*",
"symfony/cache": "^4.4|^5.0",
"symfony/config": "^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/dependency-injection": "^5.0",
"symfony/error-renderer": "^4.4|^5.0",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/http-kernel": "^4.4|^5.0",