tobias / zend-expressive-session-zf1
ext-session persistence adapter for zend-expressive-session and compatible to ZF1
Requires
- php: ^7.1
- ext-session: *
- dflydev/fig-cookies: ^1.0 || ^2.0
- zendframework/zend-expressive-session: ^1.1
Requires (Dev)
- phpunit/phpunit: ^7.0.2
- roave/security-advisories: dev-master
- zendframework/zend-coding-standard: ~1.0.0
- zendframework/zend-diactoros: ^2.0
- zendframework/zendframework1: 1.*
This package is auto-updated.
Last update: 2024-10-22 21:00:00 UTC
README
Zend Expressive ZF1 Compatible Session
Provides an ZF1 compatible ext-session persistence adapter for use with zend-expressive-session.
Inspired and based on zend-expressive-session-ext.
Installation
Run the following to install this library::
$ composer require tobias/zend-expressive-session-zf1
Configuration
If your application uses the zend-component-installer
Composer plugin, your configuration is complete; the shipped
Tobias\Zend\Expressive\Zf1Session\ConfigProvider
registers the
Tobias\Zend\Expressive\Zf1Session\Persistence\SessionPersistence
service, as well as an alias
to SessionPersistence
it under the name Zend\Expressive\Session\SessionPersistenceInterface
.
You can add the Tobias\Zend\Expressive\Zf1Session\ConfigProvider
manually to your config/config.php
e.g.:
$aggregator = new ConfigAggregator( [ // ... \Zend\Expressive\Session\ConfigProvider::class, \Tobias\Zend\Expressive\Zf1Session\ConfigProvider::class, // ... ]);
Otherwise, you will need to map Zend\Expressive\Session\SessionPersistenceInterface
to Tobias\Zend\Expressive\Zf1Session\Persistence\SessionPersistence
in your dependency
injection container.
In addition to this you can configure all parameters
passed to the session via configuration, e.g. config/autoload/session-params.global.php
<?php return [ 'session' => [ 'use_cookies' => false, 'use_only_cookies' => true, ] ];