Skip to content

Commit

Permalink
Merge pull request #57 from mezzio/renovate/major-laminas
Browse files Browse the repository at this point in the history
Update dependency laminas/laminas-coding-standard to v3
  • Loading branch information
gsteel authored Nov 3, 2024
2 parents e1f830c + fc224fd commit d1f3a8a
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 61 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"require-dev": {
"dflydev/fig-cookies": "^3.1",
"laminas/laminas-coding-standard": "~2.5.0",
"laminas/laminas-coding-standard": "~3.0.0",
"laminas/laminas-diactoros": "^3.4",
"phpunit/phpunit": "^10.5.36",
"psalm/plugin-phpunit": "^0.19.0",
Expand Down
103 changes: 55 additions & 48 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions src/PhpSessionPersistence.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@
use const PHP_SESSION_ACTIVE;

/**
* Session persistence using ext-session.
*
* Adapts ext-session to work with PSR-7 by disabling its auto-cookie creation
* (`use_cookies => false`), while simultaneously requiring cookies for session
* handling (`use_only_cookies => true`). The implementation pulls cookies
* manually from the request, and injects a `Set-Cookie` header into the
* response.
*
* Session identifiers are generated using random_bytes (and casting to hex).
* During persistence, if the session regeneration flag is true, a new session
* identifier is created, and the session re-started.
*
* @psalm-type SessionConfig = array{
* persistence?: array{
* ext?: array{
Expand All @@ -45,18 +57,6 @@
* cookie_httponly?: bool,
* cookie_samesite?: string,
* }
*
* Session persistence using ext-session.
*
* Adapts ext-session to work with PSR-7 by disabling its auto-cookie creation
* (`use_cookies => false`), while simultaneously requiring cookies for session
* handling (`use_only_cookies => true`). The implementation pulls cookies
* manually from the request, and injects a `Set-Cookie` header into the
* response.
*
* Session identifiers are generated using random_bytes (and casting to hex).
* During persistence, if the session regeneration flag is true, a new session
* identifier is created, and the session re-started.
*/
class PhpSessionPersistence implements InitializePersistenceIdInterface, SessionPersistenceInterface
{
Expand Down

0 comments on commit d1f3a8a

Please sign in to comment.