Skip to content

Commit c6f8e08

Browse files
authored
Use Laminas as example server (#661)
(The Zend libraries were deprecated in 2019, and appear to be php7-only, which itself was killed in 2022)
1 parent 256da31 commit c6f8e08

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

website/docs/other-frameworks.mdx

+10-10
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ $builder->useAutomaticPersistedQueries($cache, new DateInterval('PT1H'));
174174

175175
In this example, we will focus on getting a working version of GraphQLite using:
176176

177-
- [Zend Stratigility](https://docs.zendframework.com/zend-stratigility/) as a PSR-15 server
177+
- [Laminas Stratigility](https://docs.laminas.dev/laminas-stratigility/) as a PSR-15 server
178178
- `mouf/picotainer` (a micro-container) for the PSR-11 container
179179
- `symfony/cache ` for the PSR-16 cache
180180

@@ -189,9 +189,9 @@ The choice of the libraries is really up to you. You can adapt it based on your
189189
},
190190
"require": {
191191
"thecodingmachine/graphqlite": "^4",
192-
"zendframework/zend-diactoros": "^2",
193-
"zendframework/zend-stratigility": "^3",
194-
"zendframework/zend-httphandlerrunner": "^1.0",
192+
"laminas/laminas-diactoros": "^2",
193+
"laminas/laminas-stratigility": "^3",
194+
"laminas/laminas-httphandlerrunner": "^2",
195195
"mouf/picotainer": "^1.1",
196196
"symfony/cache": "^4.2"
197197
},
@@ -206,11 +206,11 @@ The choice of the libraries is really up to you. You can adapt it based on your
206206
use Laminas\Diactoros\Response;
207207
use Laminas\Diactoros\ServerRequest;
208208
use Laminas\Diactoros\ServerRequestFactory;
209-
use Zend\HttpHandlerRunner\Emitter\SapiStreamEmitter;
210-
use Zend\Stratigility\Middleware\ErrorResponseGenerator;
211-
use Zend\Stratigility\MiddlewarePipe;
209+
use Laminas\HttpHandlerRunner\Emitter\SapiStreamEmitter;
210+
use Laminas\Stratigility\Middleware\ErrorResponseGenerator;
211+
use Laminas\Stratigility\MiddlewarePipe;
212212
use Laminas\Diactoros\Server;
213-
use Zend\HttpHandlerRunner\RequestHandlerRunner;
213+
use Laminas\HttpHandlerRunner\RequestHandlerRunner;
214214

215215
require_once __DIR__ . '/vendor/autoload.php';
216216

@@ -232,7 +232,7 @@ $runner = new RequestHandlerRunner(
232232
$runner->run();
233233
```
234234

235-
Here we are initializing a Zend `RequestHandler` (it receives requests) and we pass it to a Zend Stratigility `MiddlewarePipe`.
235+
Here we are initializing a Laminas `RequestHandler` (it receives requests) and we pass it to a Laminas Stratigility `MiddlewarePipe`.
236236
This `MiddlewarePipe` comes from the container declared in the `config/container.php` file:
237237

238238
```php title="config/container.php"
@@ -245,7 +245,7 @@ use Psr\SimpleCache\CacheInterface;
245245
use Symfony\Component\Cache\Simple\ApcuCache;
246246
use TheCodingMachine\GraphQLite\Http\Psr15GraphQLMiddlewareBuilder;
247247
use TheCodingMachine\GraphQLite\SchemaFactory;
248-
use Zend\Stratigility\MiddlewarePipe;
248+
use Laminas\Stratigility\MiddlewarePipe;
249249

250250
// Picotainer is a minimalist PSR-11 container.
251251
return new Picotainer([

0 commit comments

Comments
 (0)