Skip to content

Commit bef2124

Browse files
committed
TASK: Upgrade psr/container dependency from 1.0 to 2.0
1 parent c4d1b64 commit bef2124

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Neos.Flow/Classes/ObjectManagement/ObjectManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function isRegistered($objectName): bool
164164
* @param string $objectName
165165
* @return bool
166166
*/
167-
public function has($objectName): bool
167+
public function has(string $objectName): bool
168168
{
169169
return $this->isRegistered($objectName);
170170
}
@@ -200,7 +200,7 @@ public function registerShutdownObject($object, $shutdownLifecycleMethodName): v
200200
* @throws InvalidConfigurationTypeException
201201
* @api
202202
*/
203-
public function get($objectName, ...$constructorArguments): object
203+
public function get(string $objectName, ...$constructorArguments): object
204204
{
205205
if (!empty($constructorArguments) && isset($this->objects[$objectName]) && $this->objects[$objectName][self::KEY_SCOPE] !== ObjectConfiguration::SCOPE_PROTOTYPE) {
206206
throw new \InvalidArgumentException('You cannot provide constructor arguments for singleton objects via get(). If you need to pass arguments to the constructor, define them in the Objects.yaml configuration.', 1298049934);

Neos.Flow/Classes/ObjectManagement/ObjectManagerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function getContext();
5050
* @return T The object instance
5151
* @api
5252
*/
53-
public function get($objectName, ...$constructorArguments);
53+
public function get(string $objectName, ...$constructorArguments);
5454

5555
/**
5656
* This is the PSR-11 ContainerInterface equivalent to `isRegistered`.
@@ -59,7 +59,7 @@ public function get($objectName, ...$constructorArguments);
5959
* @return bool
6060
* @see isRegistered
6161
*/
62-
public function has($objectName);
62+
public function has(string $objectName): bool;
6363

6464
/**
6565
* Returns true if an object with the given name has already

Neos.Flow/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
"psr/http-message": "^1.0",
3535
"psr/http-factory": "^1.0",
36-
"psr/container": "^1.0",
36+
"psr/container": "^1.0 || ^2.0",
3737
"psr/log": "^2.0 || ^3.0",
3838
"psr/http-server-middleware": "^1.0",
3939
"psr/http-server-handler": "^1.0",

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"neos/composer-plugin": "^2.0",
3131
"psr/http-message": "^1.0",
3232
"psr/http-factory": "^1.0",
33-
"psr/container": "^1.0",
33+
"psr/container": "^1.0 || ^2.0",
3434
"psr/http-server-middleware": "^1.0",
3535
"psr/http-server-handler": "^1.0",
3636
"psr/http-client": "^1.0",

0 commit comments

Comments
 (0)