Closed
Description
Hello I am trying to get GitlabPHP running in my slim project.
The docs at https://docs.php-http.org/en/latest/httplug/users.html said it should work with slim too.
$ composer require php-http/message slim/slim
Part of my composer.json:
"slim/slim": "^4.5",
"slim/http": "^1.0",
"slim/psr7": "^1.2",
"php-di/php-di": "^6.2",
"m4tthumphrey/php-gitlab-api": "^10.0",
"guzzlehttp/guzzle": "^7.0.1",
"php-http/message": "^1.9"
Error Message:
{
"message": "Slim Application Error",
"exception": [
{
"type": "Http\\Discovery\\Exception\\NotFoundException",
"code": 0,
"message": "No PSR-17 request factory found. Install a package from this list: https://packagist.org/providers/psr/http-factory-implementation",
"file": "/srv/www/clients/client1/web52/web/vendor/php-http/discovery/src/Psr17FactoryDiscovery.php",
"line": 22
},
{
"type": "Http\\Discovery\\Exception\\DiscoveryFailedException",
"code": 0,
"message": "Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors\n - Puli Factory is not available\n - No valid candidate found using strategy \"Http\\Discovery\\Strategy\\CommonClassesStrategy\". We tested the following candidates: .\n - No valid candidate found using strategy \"Http\\Discovery\\Strategy\\CommonPsr17ClassesStrategy\". We tested the following candidates: Phalcon\\Http\\Message\\RequestFactory, Nyholm\\Psr7\\Factory\\Psr17Factory, Zend\\Diactoros\\RequestFactory, GuzzleHttp\\Psr7\\HttpFactory, Http\\Factory\\Diactoros\\RequestFactory, Http\\Factory\\Guzzle\\RequestFactory, Http\\Factory\\Slim\\RequestFactory, Laminas\\Diactoros\\RequestFactory.\n\n",
"file": "/srv/www/clients/client1/web52/web/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php",
"line": 41
}
]
}
It tests for Http\Factory\Slim\RequestFactory
.
I have checked my vendor dir. I only have Slim\Psr7\Factory\RequestFactory
Am I doing something wrong?
Metadata
Metadata
Assignees
Labels
No labels