Skip to content

Commit

Permalink
grabServiceFromContainer: Returned service is not always object (#23)
Browse files Browse the repository at this point in the history
for example `$I->grabServiceFromContainer('Config')` will return array and without fix this would cause
```
[TypeError] Codeception\Lib\Connector\Laminas::grabServiceFromContainer(): Return value must be of type object, array returned
```
  • Loading branch information
svycka authored Nov 20, 2022
1 parent 40e7e3e commit ad1fa0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Codeception/Lib/Connector/Laminas.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function getLaminasRequest(): LaminasRequest
return $this->laminasRequest;
}

public function grabServiceFromContainer(string $service): object
public function grabServiceFromContainer(string $service): mixed
{
$serviceManager = $this->application->getServiceManager();

Expand Down

0 comments on commit ad1fa0e

Please sign in to comment.