Download the PHP package ellipse/session-start without Composer
On this page you can find all versions of the php package ellipse/session-start. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ellipse/session-start
More information about ellipse/session-start
Files in ellipse/session-start
Package session-start
Short Description Psr-15 middleware allowing to use session with Psr-7 request and response
License MIT
Homepage https://github.com/ellipsephp/session-start
Informations about the package session-start
Session start
This package provides a Psr-15 middleware allowing to use session with Psr-7 request and response.
Require php >= 7.0
Installation composer require ellipse/session-start
Run tests ./vendor/bin/kahlan
- Using the start session middleware
Using the start session middleware
This middleware use the default php session mechanism adapted to Psr-7 request and response flow. The default php session cookie is disabled and the session id is manually stored in a cookie readed from the Psr-7 request and attached to the Psr-7 response.
By default values returned by session_name()
and session_get_cookie_params
are used to build the session cookie. An optional array of options can be given to the middleware in order to overwrite those default values:
- (string) name: the session cookie name
- (string) path: the session cookie path
- (string) domain: the session cookie domain
- (int) lifetime: the session cookie lifetime in second
- (bool) secure: whether the session cookie should only be sent over secure connections
- (bool) httponly: whether the session cookie can only be accessed through the HTTP protocol
The middleware can of course be used after the SessionHandlerMiddleware
from ellipse/session-handler in order to use a custom session handler.
All versions of session-start with dependencies
psr/http-message Version ^1.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
dflydev/fig-cookies Version ^1.0