com php-src: Update UPGRADING and UPGRADING.INTERNALS: UPGRADING UPGRADING.INTERNALS ext/session/session.c

From: Date: Sun, 25 Jan 2015 21:14:40 +0000
Subject: com php-src: Update UPGRADING and UPGRADING.INTERNALS: UPGRADING UPGRADING.INTERNALS ext/session/session.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84426@lists.php.net to get a copy of this message
Commit: 7b179808758264cdde9aee2aa526d870e53ed75b Author: Yasuo Ohgaki <yohgaki@php.net> Mon, 26 Jan 2015 06:14:40 +0900 Parents: 4ba97bb2eae6d7526a5f5fc0a2f3958f926d2582 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7b179808758264cdde9aee2aa526d870e53ed75b Log: Update UPGRADING and UPGRADING.INTERNALS Changed paths: M UPGRADING M UPGRADING.INTERNALS M ext/session/session.c Diff: diff --git a/UPGRADING b/UPGRADING index 5343b44..668ff87 100644 --- a/UPGRADING +++ b/UPGRADING @@ -78,6 +78,18 @@ PHP X.Y UPGRADE NOTES . gmp_setbit() and gmp_clrbit() now return FALSE for negative indices, making them consistent with other GMP functions. +- Session + . session_start() accepts all INI settings as array. e.g. ['cache_limiter'=>'private'] + sets session.cache_limiter=private. It also supports 'read_and_close' which closes + session data immediately after read data. + . Save handlers accpets validate_sid(), update_timestamp() which validates session + ID existence, updates timestamp of session data. Compatibility of old user defined + save handler is retained. + . SessionUpdateTimestampHandlerInterface is added. validateSid(), updateTimestamp() + is defined in the interface. + . session.lazy_write(default=On) INI setting enables only write session data when + session data is updated. + - Standard: . Removed string category support in setlocale(). Use the LC_* constants instead. diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 426288d..b1d3f4b 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -200,3 +200,22 @@ PHP 7.0 INTERNALS UPGRADE NOTES - configure.js now produces response files which are passed to the linker and library manager. This solves the issues with the long command lines which can exceed the OS limit. + + +======================== +3. Module changes +======================== + + Session: + + - PS_MOD_UPDATE_TIMESTAMP() session save handler definition is added. New + save handler should use PS_MOD_UPDATE_TIMESTAMP() definition. Save handler + must not refer/change PS() variables directly from save handler. + - PS_MOD_UPDATE_TIMESTAMP() defines validate_sid() handler. This handler + must validate if requested session ID is in session data storage or not. + Internal save handler needed to asscess PS(id) directly to validate it. + Do not access PS(id), but use this handler. + - PS_MOD_UPDATE_TIMESTAMP() defines update_timestamp() handlers. This handler + must update session data timestamp for GC if it is needed. e.g. Memcache + updates timestap on read, so it does not need to update timestamp. Return + SUCCESS simply for this case. diff --git a/ext/session/session.c b/ext/session/session.c index afc9c70..c2ec373 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -511,7 +511,7 @@ static void php_session_initialize(void) /* {{{ */ PS(send_cookie) = 1; } } - + /* Set session ID for compatibility for older/3rd party save handlers */ if (!PS(use_strict_mode)) { php_session_reset_id(); @@ -558,7 +558,7 @@ static void php_session_save_current_state(void) /* {{{ */ int ret = FAILURE; IF_SESSION_VARS() { - if (PS(mod_data) || PS(mod_user_implemented)) { + if (PS(mod_data) || PS(mod_user_implemented)) { zend_string *val; val = php_session_encode();

« previous php.cvs (#84426) next »