fix backwards compatibility breaks

This commit is contained in:
Christian Flothmann 2019-04-07 22:01:56 +02:00
parent 2efd7b2149
commit 44eb7a0485
2 changed files with 6 additions and 2 deletions

View File

@ -47,7 +47,7 @@ class HttpFoundationExtension extends AbstractExtension
$requestContext = null;
if (2 === \func_num_args()) {
$requestContext = \func_get_arg(1);
if (!$requestContext instanceof RequestContext) {
if (null !== $requestContext && !$requestContext instanceof RequestContext) {
throw new \TypeError(sprintf('The second argument must be an instance of "%s".', RequestContext::class));
}
}

View File

@ -53,6 +53,10 @@ final class BoundArgument implements ArgumentInterface
*/
public function setValues(array $values)
{
list($this->value, $this->identifier, $this->used, $this->type, $this->file) = $values;
if (5 === count($values)) {
list($this->value, $this->identifier, $this->used, $this->type, $this->file) = $values;
} else {
list($this->value, $this->identifier, $this->used) = $values;
}
}
}