Commit Graph

20294 Commits

Author SHA1 Message Date
Maxime Rainville
c77042aa8b
Fix linting. 2018-07-23 14:12:44 +01:00
Maxime Rainville
7fda52b2cd
Add a MERGE_AS_SUBMITTED_VALUE flag for Form::loadDataFrom 2018-07-23 14:12:43 +01:00
Maxime Rainville
3fa2c056d7
FIX Don't reload form session data using FormField::setSubmittedValue (#8056) 2018-07-23 14:12:43 +01:00
Daniel Hensby
5f6eec6403
Merge pull request #8269 from open-sausages/pulls/4/session-lazy
This is a cherry-picked PR from 4.2 -> 4.2.0
2018-07-23 14:10:16 +01:00
Ingo Schommer
73026292bf
Test coverage for session data change 2018-07-23 14:09:43 +01:00
Ingo Schommer
74b655d3fc
Fix tests on unset session data
Thanks Robbie!
2018-07-23 14:09:42 +01:00
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
Daniel Hensby
ad850a187d
Merge pull request #8263 from dhensby/4.1/mask-backtrace
This is a cherry-picked PR from 4.2 -> 4.2.0
2018-07-23 14:08:44 +01:00
Daniel Hensby
e37b3b95f4
FIX updateValidatePassword calls need to be masked from backtraces 2018-07-23 14:08:26 +01:00
Daniel Hensby
ab942c9290
Merge pull request #8245 from dhensby/pulls/4.2/http-cache-fixes
This is a cherry-picked PR from 4.2 -> 4.2.0
2018-07-23 14:07:25 +01:00
Daniel Hensby
540c9aba69
TEST Add tests for (im)mutablity of states 2018-07-23 14:07:11 +01:00
Daniel Hensby
a3687147fe
State default should be state enabled (no-cache is an enabled state) 2018-07-23 14:07:10 +01:00
Daniel Hensby
9f1471332d
Make augmentState method more efficient 2018-07-23 14:07:10 +01:00
Daniel Hensby
cebed776ab
FIX If theres a max-age set remove no-cache and no-store 2018-07-23 14:07:09 +01:00
Daniel Hensby
2b1c55bc4e
FIX Allow setNoCache(false) to remove no-cache directive 2018-07-23 14:07:09 +01:00
Daniel Hensby
842b39e988
FIX Add must-revalidate to default state so its common on all our core states 2018-07-23 14:07:09 +01:00
Daniel Hensby
997730aa7f
FIX Allow cache control changes to affect default state 2018-07-23 14:07:08 +01:00
Daniel Hensby
d46410c49b
Merge pull request #8233 from dhensby/pulls/4.2/caching-fixes
This is a cherry-picked PR from 4.2 -> 4.2.0
2018-07-23 14:05:41 +01:00
Daniel Hensby
c52be7fe09
Consolidate disabling cache logic 2018-07-23 14:05:12 +01:00
Daniel Hensby
f7f567a12e
Make config private (notation isnt working) 2018-07-23 14:05:12 +01:00
Daniel Hensby
b78a89a76c
FIX Default cache state should be no-cache 2018-07-23 14:05:12 +01:00
Daniel Hensby
5ec0fafe43
Merge pull request #8193 from open-sausages/pulls/4.2/reset-on-ddl
This is a cherry-picked PR from 4.2 -> 4.2.0
2018-07-23 14:04:15 +01:00
Daniel Hensby
793aafae91
FIX Transaction depth should error if not implemented by child classes 2018-07-23 14:03:20 +01:00
Robbie Averill
1048520fbe
Restore check for zero or negative transaction nesting 2018-07-23 14:01:22 +01:00
Daniel Hensby
cbdf547c1b
Address feedback 2018-07-23 14:01:22 +01:00
Damian Mooyman
1d06dcdd28
Use 2.1 of postgres 2018-07-23 14:01:22 +01:00
Damian Mooyman
8ea3bb36a0
Maybe fix it? 2018-07-23 14:01:21 +01:00
Damian Mooyman
225e61dc67
BUG FIx manual resetDBSchema() calls breaking the database 2018-07-23 14:01:21 +01:00
Damian Mooyman
11e0a3de43
BUG Ensure that build includes extra classes 2018-07-23 14:01:21 +01:00
Damian Mooyman
95bcac796a
ENHANCEMENT Ensure test DB is flushed on either DDL or transaction-disabled tests
Fixes #8182
2018-07-23 14:01:20 +01:00
Damian Mooyman
f03d5e8d19 Added 4.2.0-beta1 changelog 2018-06-15 15:47:03 +12:00
Damian Mooyman
3bad65a726 Update translations 2018-06-15 15:39:15 +12:00
Damian Mooyman
a5ec4e4464 Remove obsolete branch-alias 2018-06-15 15:29:51 +12:00
Robbie Averill
7cd8b3d163
Merge pull request #8181 from open-sausages/pulls/4/remove-internals
API Remove @internal from new 4.2 methods
2018-06-15 13:50:43 +12:00
Damian Mooyman
53dded8cff
API Remove @internal from new 4.2 methods 2018-06-15 13:14:42 +12:00
Damian Mooyman
6c14cc86f0
Restore _manifest_exclude to tests/behat 2018-06-15 12:20:17 +12:00
Robbie Averill
5fa5abf295 Merge branch '4.1' into 4
# Conflicts:
  #	src/Forms/DateField.php
2018-06-15 11:52:07 +12:00
Robbie Averill
e48ad4c9e2
Merge pull request #8170 from open-sausages/pulls/4.1/fix-arabic-date-handling
BUG Fix internal date formatting inheriting default locale
2018-06-15 11:47:53 +12:00
Aaron Carlino
7eeb91880a Shift behat test from framework to admin (#8172) 2018-06-15 11:28:40 +12:00
Damian Mooyman
b636587945
Respect semver and add tests 2018-06-15 11:04:12 +12:00
Damian Mooyman
c414388220
FIX DatetimeFieldTest 2018-06-14 18:14:12 +12:00
Damian Mooyman
310a259c5f
Add locale to Format
Fix up some regressions
2018-06-14 17:28:16 +12:00
Ingo Schommer
1c5876acf0
Merge pull request #8179 from open-sausages/pulls/4/safer-test-clear
BUG Make regression in #7839 safer
2018-06-14 17:28:13 +12:00
Ingo Schommer
bd84944c0d
Merge pull request #8166 from open-sausages/pulls/4/http-cache-middleware
NEW Add better HTTP cache-control manipulation (4.x branch)
2018-06-14 17:19:54 +12:00
Damian Mooyman
d52c4dd602
BUG Make regression in #7839 safer 2018-06-14 16:45:09 +12:00
Ingo Schommer
5fbfd8ff7f
Merge pull request #8176 from open-sausages/pulls/4/update-recipe-branch
Update recipe branching
2018-06-14 16:44:29 +12:00
Damian Mooyman
9139db2a9d
Merge pull request #8177 from creative-commoners/pulls/4.2/relative-fixture-fix
FIX SapphireTest can load relative fixtures in subfolders, switch "needs db" priority check order
2018-06-14 16:34:40 +12:00
Damian Mooyman
b686b86c34 Session now prevents cache headers being sent unintentionally 2018-06-14 15:59:51 +12:00
Ingo Schommer
779865e29f merge changelog 2018-06-14 14:15:55 +12:00
Ingo Schommer
24e9253b87 Mention Last-Modified change 2018-06-14 14:13:44 +12:00