Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3321782

Browse files
Merge branch '5.0'
* 5.0: [Routing] fix tests [DI] minor cleanup [Form] group constraints when calling the validator Remove wrong @group legacy annotations [DependencyInjection] Fix dumping multiple deprecated aliases allow button names to start with uppercase letter Allow PHP ^7.2.5 States that the HttpClient provides a Http Async implementation [Routing] Fix ContainerLoader and ObjectLoaderTest [HttpKernel] Make ErrorListener::onKernelException()'s dispatcher argument explicit [HttpKernel] Drop deprecated ExceptionListener Removed extra whitespace [Security] Fix best encoder not wired using migrate_from
2 parents d8d88e6 + 5d67bc1 commit 3321782

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

Loader/ContainerLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(ContainerInterface $container)
3030
/**
3131
* {@inheritdoc}
3232
*/
33-
public function supports($resource, $type = null)
33+
public function supports($resource, string $type = null)
3434
{
3535
return 'service' === $type;
3636
}

Loader/ObjectLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function load($resource, string $type = null)
5252
$loaderObject = $this->getObject($parts[0]);
5353

5454
if (!\is_object($loaderObject)) {
55-
throw new \LogicException(sprintf('%s:getObject() must return an object: %s returned', \get_class($this), \gettype($loaderObject)));
55+
throw new \TypeError(sprintf('%s:getObject() must return an object: %s returned', \get_class($this), \gettype($loaderObject)));
5656
}
5757

5858
if (!\is_callable([$loaderObject, $method])) {

Tests/Loader/ObjectLoaderTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,9 @@ public function getBadResourceStrings()
6262
];
6363
}
6464

65-
/**
66-
* @group legacy
67-
*/
6865
public function testExceptionOnNoObjectReturned()
6966
{
70-
$this->expectException('LogicException');
67+
$this->expectException(\TypeError::class);
7168
$loader = new TestObjectLoader();
7269
$loader->loaderMap = ['my_service' => 'NOT_AN_OBJECT'];
7370
$loader->load('my_service::method');

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.2.9"
19+
"php": "^7.2.5"
2020
},
2121
"require-dev": {
2222
"symfony/config": "^5.0",

0 commit comments

Comments
 (0)