zendframework/zend-session
zendframework/zend-session provides robust session management for PHP applications, with configurable storage, session containers, validators, and save handlers. Integrates cleanly with Zend Framework components to secure and organize session data across requests.
hash_algos()
(usually md2 and md4) from being used in SessionConfig::setHashFunction.#120 fixes issue "Commands out of sync; you can't run this command now" with DbTableGateway save handler while using Mysqli adapter.
#106 fixes issue with Garbage collection of MongoDB save handler where maxlifetime is provided in seconds.
#114 fixes Validator\Id compatibility with PHP 7.1. INI setting session.sid_bits_per_character can be now used with PHP 7.1+ instead of session.hash_bits_per_character (used with PHP versions prior to 7.1).
In some very specific situations this can lead to an issue with previously generated sessions. See issue #121.
#118 avoid unnecessary phpinfo() call when register own save handler which is an object.
composer.json which prevented phpunit/phpunit 6.5 or newer from
being installed together with zendframework/zend-session.#107 fixes an error raised by ini_set() within SessionConfig::setStorageOption() that occurs for certain INI values that cannot be set if the session is active. When this situation occurs, the class performs a session_write_close(), sets the new INI value, and then restarts the session. As such, we recommend that you either set production INI values in your production php.ini, and/or always pass your fully configured session manager to container instances you create.
#105 fixes an edge case whereby if the special __ZF session value is a non-array value, initializing the session would result in errors.
#102 fixes an issue introduced with 2.8.0 with AbstractContainer::offsetGet. Starting in 2.8.0, if the provided $key did not exist, the method would raise an error regarding an invalid variable reference; this release provides a fix that resolves that issue.
#85 fixes an issue with how the expiration seconds are handled when a long-running request occurs. Previously, when called, it would use the value of $_SERVER['REQUEST_TIME'] to calculate the expiration time; this would cause failures if the expiration seconds had been reached by the time the value was set. It now correctly uses the current time().
#99 fixes how Zend\Session\Config\SessionConfig handles attaching save handlers to ensure it will honor any handlers registered with the PHP engine (e.g., redis, rediscluster, etc.).
session.sid_lengthsession.sid_bits_per_character#73 modifies the SessionManagerFactory to take into account the $requestedName; if the $requestedName is the name of a class that implements ManagerInterface, that class will be instantiated instead of SessionManager, but using the same arguments ($config, $storage, $savehandler, $validators, $options).
#78 updates the SessionConfig class to emit deprecation notices under PHP 7.1+ when a user attempts to set INI options no longer supported by PHP 7.1+, including:
session.entropy_filesession.entropy_lengthsession.hash_functionsession.hash_bits_per_characterCache save handler's destroy() method works, ensuring it does not attempt to remove an item by $id if it does not already exist in the cache.AbstractContainer::offsetGet() to match Zend\Stdlib\ArrayObject and return by reference, fixing an issue when running under PHP 7.1+.Cache and DbTaleGateway save handlers to ensure they work when used under PHP 7.session.gc_maxlifetime is cast to an integer before assigning it as the lifetime value in the MongoDB adapter, ensuring sessions may be deleted.Id validator to ensure that the session identifier is not malformed. This validator is now enabled by default; to disable it, pass ['attach_default_validators' => false] as the fifth argument to SessionManager, or pass an options array with that value under the session_manager configuration key.exporeAfterSeconds with the MongoDB save handler.Zend\Session\ConfigProvider, which maps the default services offered by the package, including the ContainerAbstractServiceFactory.Zend\Session\Module, which does the same, but for zend-mvc contexts.MongoDB save handler, allowing the component to be used with modern MongoDB installations.ValidatorChain to ensure it can be represented in auto-generated classmaps (e.g., via composer dump-autoload --optimize and/or composer dump-autoload --classmap-authoritative).Zend\Session\Validator\ValidatorChainTrait and pushes it into each of the ValidatorChainEM2 and ValidatorChainEM3 implementations, to prevent colliding constructor definitions due to inheritance + trait usage.Zend\Session\Validator\ValidatorChainEM2 and ValidatorChainEM3. Due to differences in the EventManagerInterface::attach() method between zend-eventmanager v2 and v3, and the fact that ValidatorChain overrides that method, we now need an implementation targeting each major version. To provide a consistent use case, we use a polyfill that aliases the appropriate version to the Zend\Session\ValidatorChain class.How can I help you explore Laravel packages today?