Skip to content

Commit e233a3b

Browse files
authored
Merge pull request #59 from moufmouf/laminas_migration
Migration to Laminas and PSR-HTTP bridge 2
2 parents 16f1bf3 + 4a2b92e commit e233a3b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Controller/GraphqliteController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
namespace TheCodingMachine\Graphqlite\Bundle\Controller;
55

66

7+
use Laminas\Diactoros\ResponseFactory;
8+
use Laminas\Diactoros\ServerRequestFactory;
9+
use Laminas\Diactoros\StreamFactory;
10+
use Laminas\Diactoros\UploadedFileFactory;
11+
use Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory;
712
use TheCodingMachine\GraphQLite\Http\HttpCodeDecider;
813
use function array_map;
914
use GraphQL\Error\ClientAware;
@@ -50,7 +55,7 @@ class GraphqliteController
5055
public function __construct(ServerConfig $serverConfig, HttpMessageFactoryInterface $httpMessageFactory = null, ?int $debug = Debug::RETHROW_UNSAFE_EXCEPTIONS)
5156
{
5257
$this->serverConfig = $serverConfig;
53-
$this->httpMessageFactory = $httpMessageFactory ?: new DiactorosFactory();
58+
$this->httpMessageFactory = $httpMessageFactory ?: new PsrHttpFactory(new ServerRequestFactory(), new StreamFactory(), new UploadedFileFactory(), new ResponseFactory());
5459
$this->debug = $debug ?? false;
5560
}
5661

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"symfony/translation": "^4.1.9 | ^5",
2525
"doctrine/annotations": "^1.6",
2626
"doctrine/cache": "^1.8",
27-
"symfony/psr-http-message-bridge": "^1",
27+
"symfony/psr-http-message-bridge": "^1.3",
2828
"nyholm/psr7": "^1.1",
29-
"zendframework/zend-diactoros": "^1.8.6",
29+
"laminas/laminas-diactoros": "^2.2.2",
3030
"overblog/graphiql-bundle": "^0.1.2 | ^0.2",
3131
"thecodingmachine/cache-utils": "^1"
3232
},

0 commit comments

Comments
 (0)