Go to file
Ingo Schommer 76ac8465de
BUG Lazy session state (fixes #8267)
Fixes regression from 3.x, where sessions where lazy started as required:
Either because an existing session identifier was sent through with the request,
or because new session data needed to be persisted as part of the request execution.

Without this lazy starting, *every* request will get a session,
which makes all those responses uncacheable by HTTP layers.

Note that 4.x also changed the $data vs. $changedData payloads:
In 3.x, they both contained key/value pairs.
In 4.x, $data contains key/value, while $changedData contains key/boolean to declare isChanged.
While this reduces duplication in the class, it also surfaced a bug which was latent in 3.x:
When an existing session is lazily resumed via start(), $data is set back to an empty array.
In 3.x, any changed data before this point was *also* retained in $changedData,
ensuring it gets merged into existing $_SESSION data.
In 4.x, this clears out data - hence the need for a more complex merge logic.

Since isset($this->data) is no longer an accurate indicator of a started session,
we introduce a separate $this->started flag.

Note that I've chosen not to make lazy an opt-in (e.g. via start($request, $lazy=false)).
We already have a distinction between lazy starting via init(), and force starting via start().
2018-07-23 14:09:42 +01:00
_config Rename ETagMiddleware to ChangeDetectionMiddleware 2018-06-14 11:16:52 +12:00
.github Add PR template 2017-12-11 14:08:41 +13:00
.tx remove js transifex 2017-04-28 14:59:42 +12:00
client NEW add web accessible colours to web view dev/build 2017-07-18 22:00:35 +12:00
docs Added 4.2.0-beta1 changelog 2018-06-15 15:47:03 +12:00
lang Update translations 2018-06-15 15:39:15 +12:00
src BUG Lazy session state (fixes #8267) 2018-07-23 14:09:42 +01:00
templates Create GridField Actions Menu component (#8083) 2018-05-29 16:10:52 +12:00
tests FIX updateValidatePassword calls need to be masked from backtraces 2018-07-23 14:08:26 +01:00
thirdparty Fix missing braces 2018-06-01 10:14:42 +12:00
_config.php Bump deprecation to 4.0 in preparation for rc and stable tags 2017-08-29 15:02:36 +12:00
_register_database.php Setting default db adapter in installation as PDO MySQL with MySQLi as fail safe. 2016-11-02 19:51:13 +13:00
.codecov.yml Turn off codecov commenting on PRs 2016-10-12 16:31:22 +01:00
.editorconfig Update composer.json 2017-10-12 11:53:12 +13:00
.gitattributes FIX Amend rules to ignore test files only 2017-12-20 11:13:07 +13:00
.gitignore ENHANCEMENT Allow vendor modules with url rewriting 2017-09-29 10:28:38 +13:00
.scrutinizer.yml Merge branch '4.0' into 4 2017-12-05 12:14:22 +00:00
.travis.yml Use 2.1 of postgres 2018-07-23 14:01:22 +01:00
.upgrade.yml Add upgrade rule for HTTPCacheControl 2018-06-14 11:55:05 +12:00
cli-script.php API Refactor bootstrap, request handling 2017-06-22 22:50:45 +12:00
composer.json Remove obsolete branch-alias 2018-06-15 15:29:51 +12:00
CONTRIBUTING.md Add copyright note to contributing.md 2016-05-30 14:32:19 +12:00
LICENSE Create licence file so that GitHub (and humans) can more easily find it 2018-02-12 11:21:03 +00:00
phpcs.xml.dist CS Force spaces around string concat operators 2018-01-16 18:39:24 +00:00
phpunit.xml.dist Actually run CMS tests 2018-02-08 10:32:56 +00:00
README.md Merge branch '4' into pulls/4/remove-broken-badges 2018-06-06 09:27:07 +12:00
sake BUG Ensure sake works when called from any directory 2017-10-17 13:52:39 +13:00
silverstripe_version API CHANGE silverstripe_version file now contains the plain version number, rather than an SVN path 2012-02-01 18:42:21 +01:00
SUPPORT.md Support file grammer improvements 2018-03-27 11:49:04 +01:00

SilverStripe Framework

Build Status Latest Stable Version Latest Unstable Version codecov Total Downloads License

PHP framework forming the base for the SilverStripe CMS (https://silverstripe.org). Requires a silverstripe-installer base project. Typically used alongside the cms module.

Installation

See installation on different platforms, and installation from source.

Bugtracker

Bugs are tracked on github.com. Please read our issue reporting guidelines.

Development and Contribution

If you would like to make changes to the SilverStripe core codebase, we have an extensive guide to contributing code.

Attribution