Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency laminas/laminas-coding-standard to v3 #57

Merged
merged 2 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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