Skip to content

Commit

Permalink
Merge pull request #113 from psr7-sessions/fix/#104-switch-to-laminas
Browse files Browse the repository at this point in the history
Fix #104: upgraded from `zendframework/*` to `mezzio/*` and `laminas/*` components
  • Loading branch information
Ocramius authored Mar 2, 2020
2 parents 5e7c1f9 + c676d2a commit f90fe6a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ You can use the `PSR7Sessions\Storageless\Http\SessionMiddleware` in any
[PSR-15](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-15-request-handlers.md)
compatible middleware.

In a [`zendframework/zend-expressive`](https://github.com/zendframework/zend-expressive)
In a [`mezzio/mezzio`](https://github.com/mezzio/mezzio)
application, this would look like following:

```php
$app = \Zend\Expressive\AppFactory::create();
$app = new \Mezzio\Application(/* ... */);

$app->pipe(\PSR7Sessions\Storageless\Http\SessionMiddleware::fromSymmetricKeyDefaults(
'mBC5v1sOKVvbdEitdSBenu59nfNfhwkedkJVNabosTw=', // replace this with a key of your own (see docs below)
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
},
"require-dev": {
"phpunit/phpunit": "^8.5.2",
"zendframework/zend-diactoros": "^2.2.1",
"zendframework/zend-httphandlerrunner": "^1.1.0",
"laminas/laminas-diactoros": "^2.2.2",
"laminas/laminas-httphandlerrunner": "^1.1.0",
"infection/infection": "^0.15.3",
"phpstan/phpstan": "^0.11.19",
"phpstan/phpstan-phpunit": "^0.11.2",
Expand Down
6 changes: 3 additions & 3 deletions examples/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
declare(strict_types=1);

use Dflydev\FigCookies\SetCookie;
use Laminas\Diactoros\Response;
use Laminas\Diactoros\ServerRequestFactory;
use Laminas\HttpHandlerRunner\Emitter\SapiEmitter;
use Lcobucci\Clock\SystemClock;
use Lcobucci\JWT\Parser;
use Lcobucci\JWT\Signer\Hmac\Sha256;
Expand All @@ -27,9 +30,6 @@
use Psr\Http\Server\RequestHandlerInterface;
use PSR7Sessions\Storageless\Http\SessionMiddleware;
use PSR7Sessions\Storageless\Session\SessionInterface;
use Zend\Diactoros\Response;
use Zend\Diactoros\ServerRequestFactory;
use Zend\HttpHandlerRunner\Emitter\SapiEmitter;

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

Expand Down
4 changes: 2 additions & 2 deletions test/StoragelessTest/Http/SessionMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
use Dflydev\FigCookies\Modifier\SameSite;
use Dflydev\FigCookies\SetCookie;
use InvalidArgumentException;
use Laminas\Diactoros\Response;
use Laminas\Diactoros\ServerRequest;
use Lcobucci\Clock\FrozenClock;
use Lcobucci\Clock\SystemClock;
use Lcobucci\JWT\Builder;
Expand All @@ -43,8 +45,6 @@
use PSR7Sessions\Storageless\Session\SessionInterface;
use PSR7SessionsTest\Storageless\Asset\MutableBadCookie;
use ReflectionProperty;
use Zend\Diactoros\Response;
use Zend\Diactoros\ServerRequest;
use function assert;
use function file_get_contents;
use function random_int;
Expand Down

0 comments on commit f90fe6a

Please sign in to comment.