Commit Graph

283 Commits

Author SHA1 Message Date
Robbie Averill
844d2ef134 NEW DBDate and DBDatetime now support modify() with a strtotime() style adjustment string (#9105) 2019-07-05 15:57:23 +12:00
Sam Minnee
96e7914f23 FIX: Fix MySQLQuery::seek() and Query::rewind() to fix repeated iteration
API: Query::seek() and Query::rewind() no longer return a value.

Although breaking an API inside a patch release may seem odd, this in
fact is correcting a long-standing bug in our implementation of 
Iterator::rewind(), so I think it’s appropriate.

https://github.com/silverstripe/silverstripe-framework/issues/9097
2019-07-03 09:20:05 +12:00
Jarkko Linnanvirta
9184056b5e URLSegmentFilter: Remove : characters from url segments when multibyte characters are allowed. 2019-06-02 11:43:51 +03:00
Robbie Averill
00fd74a0a1 Merge branch '4.4' into 4
# Conflicts:
 #	src/Dev/Tasks/MigrateFileTask.php
2019-05-30 09:36:42 +12:00
Robbie Averill
14673ffd0a Merge branch '4.3' into 4.4 2019-05-30 09:35:26 +12:00
Robbie Averill
188698dcee Merge branch '4.2' into 4.3 2019-05-30 09:35:17 +12:00
Robbie Averill
3e2fc6aa0b Automated phpcbf linting 2019-05-30 09:34:34 +12:00
Guy Marriott
350888bf50 NEW Adding a shuffle method to ArrayList (#8984)
* NEW Adding a shuffle method to ArrayList

* API Add shuffle to DataList for ArrayList parity
2019-05-16 09:26:11 +12:00
Aaron Carlino
3f1479edbb
BUGFIX: DataQuery overwriting _SortColumn selects (#8974)
* BUGFIX: DataQuery overwriting _SortColumn selects

* FIX DataQuery _SortColumn handling
2019-05-15 11:42:10 +12:00
Maxime Rainville
8ee50d2ba7 API Remove DataObjectSchema::getFieldMap() (#8960)
Introduced as a less public API in https://github.com/silverstripe/silverstripe-assets/pull/227
2019-05-06 12:33:23 +12:00
Guy Marriott
82c8225502
Merge branch '4.3' into 4.4 2019-05-03 09:45:25 +12:00
Serge Latyntcev
3d777cfb8a Backward compatible behaviour for SQLConditionalExpression::getJoins 2019-05-02 15:39:36 +12:00
Andre Kiste
0c6c57f1ef Add getFieldMap method to retrieve a list of all fields for any giv… (#8892)
* Add `getFieldMap` method to retrieve a list of all fields for any given class

* Add `TagsToShortcodeTask` to upgrading guide

Adding after the file migration part as this is where it makes the most sense to run it.

* `getFieldMap` accepts an array

* Move to `DataObjectSchema`

* Add `HTMLVarchar` to documentation
Minor refactoring

* Add test for checking that `subclassesfor` works without the base class
Add test `DataObjectSchema::getFieldMap` returns the correct array

* Remove cms dependency
2019-04-30 10:43:14 +12:00
Aaron Carlino
c63eecc3e1 Merge branch '4.3' into 4 2019-04-18 11:57:36 +12:00
Guy Marriott
da1af3d8b0
FIX Postgres booleans should return as int for consistency 2019-04-17 15:15:17 +12:00
Guy Marriott
9d6b5048a6 FIX Table aliases are retained on base tables in queries built using SQLConditionalExpression (#8918)
* Adding failing test for base table aliases using SQLSelect

* FIX Retain table aliases applied to the base table on queries

* FIX Move the trimmed alias outside of the condition so we can use it within the condition
2019-04-16 15:40:09 +12:00
Sam Minnee
d295888838 MINOR: Improve type testing 2019-04-05 15:11:21 +13:00
Sam Minnee
2625cea5e3 MINOR: Add a test that 0 is falser on int, decimal, currency
Validates that https://github.com/silverstripe/silverstripe-framework/issues/3473 has been fixed

The bug was fixed in #8448
2019-04-05 15:11:21 +13:00
Sam Minnee
4f4153c834 MINOR: Test test to validate that multiple GreaterThan filters in a filterAny work.
Confirms https://github.com/silverstripe/silverstripe-framework/issues/3995 isn’t a bug.
2019-04-05 15:05:42 +13:00
Johannes Hammersen
e1190e33d2 Fix PDOConnector GeneratedID return type 2019-03-21 09:26:14 +01:00
Damian Mooyman
6b450395ce API Allow empty arraylists to be typed (#8866)
* API Allow empty arraylists to be typed

* PHPCBF fixes
2019-03-20 11:46:35 +13:00
Dan Hensby
765d1568ab
Merge branch '4.3' into 4 2019-03-06 11:04:50 +00:00
Dan Hensby
a8605b04e0
Merge branch '4.2' into 4.3 2019-03-06 11:04:14 +00:00
Damian Mooyman
d1396b7dfe
BUG Fix writeBaseRecord with unique indexes
Fixes #6819
2019-02-27 16:40:12 +13:00
Maxime Rainville
11b9429c34 Merge branch '4.3' into 4 2019-02-27 12:14:51 +13:00
Maxime Rainville
651d537196 Merge branch '4.2' into 4.3 2019-02-27 12:13:24 +13:00
Maxime Rainville
ed013fcfbb Merge branch '4.1' into 4.2 2019-02-27 12:12:39 +13:00
Maxime Rainville
ac53f77115 Merge branch '4.0' into 4.1 2019-02-27 12:11:47 +13:00
Maxime Rainville
6ff319a0e1 BUG Implement peer review feedback, 2019-02-27 11:14:47 +13:00
Maxime Rainville
9a59f2f57d BUG Renable the ability to do dynamic assignment with DBField 2019-02-22 11:08:43 +13:00
Robbie Averill
79e44b42fa Merge branch '4.1' into 4.2 2019-02-19 08:37:07 +07:00
Aaron Carlino
09c539e1c3 Merge branch '4.3' into 4 2019-02-19 12:21:24 +13:00
Maxime Rainville
25bba49923 [SS-2018-021] Fix potential SQL vulnerability in non-scalar value hyrdation 2019-02-19 12:20:24 +13:00
Maxime Rainville
95505db7d6 [SS-2018-021] Fix potential SQL vulnerability in non-scalar value hyrdation 2019-02-12 21:08:09 +13:00
Maxime Rainville
fd90cf6ceb [SS-2018-021] Fix potential SQL vulnerability in non-scalar value hyrdation 2019-02-12 20:44:17 +13:00
Loz Calver
7c5b73881b FIX: Prevent null->null being flagged as a value change (fixes #8774) 2019-02-06 13:24:18 +13:00
Loz Calver
3f8551df41
Merge pull request #8462 from sminnee/nondestructive-enum
FIX: Make all enums non-destructive, not just ClassName
2018-11-28 16:42:12 +01:00
Guy Marriott
b2dd22fb50
Merge pull request #8506 from creative-commoners/pulls/4.3/all-the-unit-tests
NEW Adding a stack more unit tests for logging and some form fields
2018-11-11 10:31:24 +13:00
Sam Minnee
a8d3b95175 FIX: Make test work with utf8mb4 2018-11-10 12:10:25 +13:00
Sam Minnee
bd5a815909 FIX: Make all enums non-destructive, not just ClassName
This change also renders a portion of DBSchemaManager irrelevant, that
destructively “fixes” old values. This is in keeping with the
non-destructive principle of dev/build, and some suggestions to move
away from enum fields altogether.

Fixes https://github.com/silverstripe/silverstripe-framework/issues/1387
2018-11-10 12:10:25 +13:00
Robbie Averill
0f2eebe5d4 NEW Change to variadic calls in ListDecorator and add unit tests 2018-11-09 13:59:14 +02:00
Sam Minnee
5531baa87f FIX: Introduce readonly transaction test to all database.
This should work on MySQL and PDO; let’s test this.
2018-11-09 10:57:26 +13:00
Sam Minnee
2615399535 FIX: Use PDO’s built-in transaction support in MySQLDatabase. 2018-11-09 10:31:19 +13:00
Sam Minnee
0111b98b18 FIX: Ensure that types are preserved fetching from database
This ensures that numeric fields appear in PHP as int/float values
rather than strings, which allows the development of more type-safe PHP
code.

This doesn’t work on the legacy mysql driver and this will now throw
a notice-level error. It requires mysqlnd.
2018-11-09 10:31:19 +13:00
Robbie Averill
64c2938c96 Merge branch '4.3' into 4 2018-11-06 11:05:22 +01:00
Aaron Carlino
0ba275cb40 Merge branch '4.2' into 4.3 2018-11-06 15:09:01 +13:00
Aaron Carlino
e60cea8561 Merge branch '4.1' into 4.2 2018-11-06 15:08:42 +13:00
Sam Minnee
67fe41d00b FIX: Ensure that repeated setting/unsetting doesn’t corrode forceChange() 2018-11-05 23:09:24 +13:00
Sam Minnee
5bb2d9484a FIX: Update “original” DataObject data to be the content of the last write
FIX: Compare to original when determining fields changes

This fixes a number of edge-case issues relating to change detection.

Fixes #8443
Fixes #3821
Fixes #4561
2018-11-05 23:09:24 +13:00
Sam Minnee
78ceca6934 MINOR: Add test for defaults on subclasses
This was raised in https://github.com/silverstripe/silverstripe-framework/issues/8567
and wasn’t covered by a test.
2018-11-05 16:09:49 +13:00
Michael Strong
55f95b7bc8 BUGFIX many many through not sorting by join table (#8534)
* BUGFIX many many through not sorting by join table

* #8534 added docs to support many many sorting fix

* #8534 added test cases for many_many default sorting
2018-11-01 14:17:15 +13:00
Michael Strong
7086f2ea3a BUGFIX many many through not sorting by join table (#8534)
* BUGFIX many many through not sorting by join table

* #8534 added docs to support many many sorting fix

* #8534 added test cases for many_many default sorting
2018-11-01 13:42:27 +13:00
Sam Minnée
e72fc9e3d0 FIX DataObject singleton creation (#8516)
Ensure DataObject instances are aware they are singletons so functions like populateDefaults() can be skipped. (fixes #4878)

Correctly applies https://github.com/silverstripe/silverstripe-framework/pull/7850 to the 4.x line
This has already been fixed in 3.x
2018-10-25 11:42:45 +13:00
Sam Minnee
4740346ed8 FIX: Make ArrayList::limit() consistent with DataList::limit()
This makes it easier to swap one fo the other without code breaking.
Since it’s strictly a removed API, I’ve opted to throw a deprecation
note in SS4 rather than throwing an InvalidArgumentException.

Fixes #2949
2018-10-11 21:05:20 +13:00
Loz Calver
e829ad78b1
Merge pull request #8429 from sminnee/fix-2950
FIX: Throw deprecation on limit=0
2018-10-08 15:11:52 +02:00
Sam Minnee
0fc06e51e5 FIX: Drop seconds from DBDatetime::Nice() to restore SS3 behaviour.
Note that the medium date format depends on locale, with en_NZ being
resolutely numeric. I’ve updated the test to verify a couple of locales
to make this more obvious.

Fixes #8121
2018-10-04 14:51:24 +13:00
Sam Minnee
638e6ec281 FIX: Throw deprecation notice on limit=0
The SS4 behaviour of limit=0 is unlikely to be the SS5 behaviour.
To clear the limit limit=null is recommended.

In addition, there’s a bit tighter type maintenance in the internal
limit data (ensure things are int).

Fixes #2950.
2018-10-04 10:38:15 +13:00
Robbie Averill
d18b8eb9fb Add more tests for descending sort orders 2018-09-28 15:42:45 +02:00
Robbie Averill
4aa7fb70ee Add tests that show that joinClass default_sort is not used and order is honoured 2018-09-28 15:38:37 +02:00
Robbie Averill
0c7ced1513 Refactor sorting tests to use a dataprovider 2018-09-27 17:18:19 +02:00
Robbie Averill
c7d522ff6d Add tests for sorting HasManyList 2018-09-27 17:09:24 +02:00
Robbie Averill
3321c6b39d Add tests for sorting many many through list without a table alias 2018-09-27 14:34:37 +02:00
Sam Minnée
5b7a84141b NEW: Add Hierarchy::prepopulate_numchildren_cache() (#8380)
* NEW: Add Hierarchy::prepopulate_numchildren_cache()
API: Hierarchy::stageChildren() customisations must be applied to the base class and not include record-specific behaviour.

Adds the ability to prepopulate the cache for Hierarchy::numChildren()
in a batch.

Note that this optimisation means that stageChildren() is not called on
each record in order to calculate numChildren(). This means that the
structure of the stageChildren() query must be the same for all records
and the behaviour cannot be customised only for a subclass of the base
data class. For example, apply your customisations to SiteTree and not
a subclass.

This is an useful part of optimising the query count on tree generation.
See https://github.com/silverstripe/silverstripe-framework/issues/8379

* NEW: Add Hierarchy::prepopulateTreeDataCache()

This provides a more extensible way of preopulating caches for optimised
tree generation.

Fixes https://github.com/silverstripe/silverstripe-framework/issues/8391
2018-09-25 12:25:23 +12:00
Daniel Hensby
1a634f5ba6
Merge pull request #8244 from altwohill/column-not-distinct
Make column query not distinct
2018-07-16 13:01:32 +01:00
Al Twohill
3292a8b773
NEW Add columnUnique API SS_List classes. 2018-07-16 12:16:17 +01:00
Al Twohill
91068c23b5
FIX Make column query not distinct
When selecting a column, it doesn't  make sense to have it distinct.

As an alternative, the API could be changed to give the end user the option
(eg `->column($field, $distinct = false)`)
However if we did that, we would need to make sure we do something
similar with `SilverStripe\ORM\UnsavedRelationList` to ensure consistency.
2018-07-16 11:38:41 +01:00
Daniel Hensby
ac5c3416a4
Merge branch '4.2' into 4 2018-07-13 17:06:51 +01:00
Daniel Hensby
bd2abc7a12
Merge branch '4.1' into 4.2 2018-07-13 16:44:23 +01:00
Daniel Hensby
ec9281ee02
Merge branch '4.0' into 4.1 2018-07-13 16:42:00 +01:00
Daniel Hensby
4acec33562
FIX Fixed bug in config merging priorities so that config values set by extensions are now least important instead of most important 2018-07-12 00:55:39 +01:00
Harsh Chokshi
6af736a9e1 Change DBCurrency scaffolded form field to CurrencyField (fixes #8246)
Add test ensuring DBCurrency scaffolds CurrencyField
2018-07-09 10:57:01 +12:00
Robbie Averill
5fa5abf295 Merge branch '4.1' into 4
# Conflicts:
  #	src/Forms/DateField.php
2018-06-15 11:52:07 +12:00
Damian Mooyman
b636587945
Respect semver and add tests 2018-06-15 11:04:12 +12:00
Damian Mooyman
77a45c0dbc
Merge remote-tracking branch 'origin/4.1' into 4
# Conflicts:
#	src/Forms/HTMLEditor/HTMLEditorSanitiser.php
#	src/ORM/DataObjectSchema.php
#	src/ORM/Queries/SQLSelect.php
#	src/View/Parsers/ShortcodeParser.php
2018-06-11 10:19:04 +12:00
Daniel Hensby
e260319823
Merge branch '4.0' into 4.1 2018-06-08 23:05:24 +01:00
Daniel Hensby
cfe93b7f23
Merge branch '3.6' into 4.0 2018-06-08 14:41:04 +01:00
Damian Mooyman
e37e3e1746
BUG Fix test that relies on implicit ID order breaking postgres 2018-06-08 11:23:24 +12:00
Damian Mooyman
0aa13da0d9
BUG Backport bugfix for belongs_many_many with many_many through.
Partial backport of #7928
Fixes #8131
2018-06-06 09:43:04 +12:00
Damian Mooyman
2510935b53
Merge pull request #8065 from dhensby/pulls/4/mmtl-jointable
NEW Add getJoinTable to MMTL
2018-06-01 10:33:46 +12:00
Robbie Averill
e0993043f8 Merge branch '4.1' into 4 2018-05-30 15:08:39 +12:00
Robbie Averill
c8b0bc0ad7 Merge branch '4.0' into 4.1
# Conflicts:
  #	src/ORM/DataObject.php
  #	tests/php/ORM/DataObjectDuplicationTest.php
  #	tests/php/ORM/DataObjectDuplicationTest/Class1.php
2018-05-30 14:52:07 +12:00
Daniel Hensby
1a57c7c1d0
NEW Add getJoinTable to MMTL 2018-05-14 11:19:24 +01:00
UndefinedOffset
fe4b90edc0 FIX: Duplicating many_many relationships looses the extra fields in 4.0 2018-04-18 11:49:20 -03:00
Damian Mooyman
257ff69e32 API Implement many_many through polymorphic (from only) (#7928)
* API Support many_many through polymorphic relations (from side only)
Fixes #7911
Fixes #3136

* Add extra docs and allow optional arguments

* ENHANCEMENT Enable quiet to be turned off

* BUG Fix issue with manymanythroughlist duplication
2018-03-22 10:26:25 +13:00
Damian Mooyman
8b9c292509
Merge remote-tracking branch 'origin/4.1' into 4 2018-03-13 14:26:39 +13:00
Damian Mooyman
625f7b4eee
Merge remote-tracking branch 'origin/4.0' into 4.1 2018-03-13 14:26:18 +13:00
Roman Schmid
40c2e299a0 Fix "mb_stripos(): Empty delimiter" warning when no search-keywords are given for DBText::ContextSummary.
Add unit-test to cover that case.
2018-03-01 11:39:30 +01:00
Daniel Hensby
9006daf20b
Cleaning up PR and adding tests 2018-02-28 13:31:56 +00:00
Daniel Hensby
16d3498a56
Merge branch '4.1' into 4 2018-02-12 10:26:07 +00:00
Daniel Hensby
7ec5fa2c8d
Merge branch '4.0' into 4.1 2018-02-09 15:19:15 +00:00
Daniel Hensby
d3278d5470 FIX Add Nested DB transaction support (#7848)
* TEST Prove nested transactions break

* Add nested transaction support
2018-02-09 10:28:32 +13:00
Andrew Aitken-Fincham
860fa2a05a API Add excludeAny() and tests for complicated excludes/filters (#7838) 2018-02-08 09:20:17 +13:00
Damian Mooyman
db9aa2c5c7
BUG Fix regression in has_one getters breaking DataDifferencer 2018-02-05 16:16:07 +13:00
Damian Mooyman
aa2c71424d
API Implement cascade_duplications
API Add DataObject::setComponent()
API Support unary components as getter and setter fields
API ManyManyList::add() now supports unsaved records
ENHANCEMENT Animal farm
2018-02-05 12:04:57 +13:00
Damian Mooyman
76d2db12b0
Merge pull request #7794 from kinglozzer/id-like-to-place-an-ordinal
NEW: Add support for ordinals in DBDate::Format()
2018-01-26 09:27:46 +13:00
Loz Calver
fcf5022550 NEW: Add support for ordinals in DBDate::Format() 2018-01-25 09:41:06 +00:00
Damian Mooyman
bca47029c4
Merge remote-tracking branch 'origin/4.0' into 4
# Conflicts:
#	src/Control/SimpleResourceURLGenerator.php
#	tests/php/Control/SimpleResourceURLGeneratorTest.php
2018-01-25 12:53:15 +13:00
Roman Schmid
6fafce766e Fixed Rfc3339 implementation of Date and Datetime 2018-01-24 16:58:12 +01:00
Damian Mooyman
a3c52f901a
Merge remote-tracking branch 'origin/4.0' into 4
# Conflicts:
#	src/Core/TempFolder.php
#	src/ORM/DataObject.php
#	src/View/ThemeResourceLoader.php
#	src/includes/constants.php
#	tests/php/Control/SimpleResourceURLGeneratorTest.php
#	tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php
#	tests/php/View/RequirementsTest.php
2018-01-22 14:57:05 +13:00
Daniel Hensby
db610aaf3b
Fixing string concat CS issues 2018-01-16 18:39:30 +00:00
Daniel Hensby
ebeaf3e40d
Merge branch '3' into 4 2018-01-16 11:47:39 +00:00
Daniel Hensby
e4bf9a31ed
Merge branch '4.0' into 4 2017-12-14 21:20:11 +00:00
Damian Mooyman
ed6561d9f5
BUG Fix incorrect merge of associative / non-associative summary fields
Fixes #7696
2017-12-14 14:17:19 +13:00
Damian Mooyman
6b384f4b35
Merge branch '4.0' into 4 2017-12-07 13:52:00 +13:00
Loz Calver
91bd92df31 FIX: Remove some unnecessary ClassInfo calls in DataObjectSchema 2017-12-05 12:23:10 +00:00
Daniel Hensby
6d5cbe0a0e
Merge branch '4.0' into 4 2017-11-25 17:19:31 +00:00
Daniel Hensby
07a0f75426
Merge branch '3.6' into 4.0 2017-11-25 16:56:50 +00:00
Daniel Hensby
333ecc201c
Merge pull request #7583 from open-sausages/pulls/4/relation-object-navigation
BUG Ensure relObject() safely bails on empty objects
2017-11-23 12:48:57 +00:00
Christopher Joe
2b6b877327 Merge branch '4.0' of https://github.com/silverstripe/silverstripe-framework into 4 2017-11-21 15:08:30 +13:00
Chris Joe
d8ca223e15
Merge pull request #7605 from open-sausages/pulls/4.0/fix-enum-defaults
BUG Fix DBEnum ignoring empty defaults
2017-11-20 11:32:45 +13:00
Damian Mooyman
cbf9e40115
BUG Fix postgres / PDO support 2017-11-17 12:35:55 +13:00
Damian Mooyman
ef58799103
BUG Fix DBEnum ignoring empty defaults
FIxes #7582
2017-11-17 12:35:39 +13:00
Christopher Joe
2bc7edbf47 BUG Fix don't treat zero-date as invalid 2017-11-16 13:30:15 +13:00
Damian Mooyman
eae3d0cfaa
Merge remote-tracking branch 'origin/4.0' into 4 2017-11-16 10:16:44 +13:00
Chris Joe
bee3c404fa
Merge pull request #7545 from open-sausages/pulls/4.0/deprecated-each
BUG Remove usage of deprecated each() and use a helper method instead
2017-11-15 16:30:20 +13:00
Damian Mooyman
f863573d1c
API Add getShortName to DBClassName
Fixes #7586
2017-11-15 11:27:58 +13:00
Damian Mooyman
ba2c5b48f7
BUG Ensure relObject() safely bails on empty objects
BUG Remove assignment of IDs to singletons
API relation methods can take an optional $id parameter to get relations from specific parents
API Added UnsavedRelationList::relation() method
2017-11-10 15:27:02 +13:00
Sam Minnee
d8b4ca91d9 FIX: Fix ContextSummary behaviour with UTF8 chars
Fixes https://github.com/silverstripe/silverstripe-framework/issues/1396

Ensure that DBTextTest has UTF8 test cases
2017-11-06 12:09:08 +13:00
Damian Mooyman
5bc4f3d1fc
BUG Remove usage of deprecated each() and use a helper method instead 2017-11-01 16:04:35 +13:00
Damian Mooyman
324bdad48c
ENHANCEMENT Ensure DBVarchar scaffolds text field with TextField with appropriate max length
Fixes #1413
2017-10-26 16:21:51 +13:00
Damian Mooyman
b9cb1e69e6 BUG Replace phpdotenv with thread-safe replacement 2017-10-20 18:43:11 +13:00
Damian Mooyman
fd630a99b0
BUG Fix decimal scaffolding
Fixes #7454
2017-10-10 10:13:26 +13:00
Werner M. Krauß
f686b50824 API Rename assert dos to assert list 2017-10-09 11:53:11 +13:00
Damian Mooyman
b996e2c22c
API Extensions are now stateless
ENHANCEMENT Injector now lazy-loads services more intelligently
2017-10-06 14:53:44 +13:00
Daniel Hensby
060c2d62d3
Merge pull request #7408 from ajoneil/fix-paginated-list-get-vars
Prior to this change, if there were already GET vars on a page
with a PaginatedList, the links would include a mix of '&' and '&'.
2017-09-27 09:41:32 +01:00
Andrew O'Neil
c7cbbb29f4 Fix links on paginated lists when there are GET vars
Prior to this change, if there were already GET vars on a page
with a PaginatedList, the links would include a mix of '&' and '&'.
2017-09-27 15:41:08 +10:00
Damian Mooyman
261302a121
ENHANCEMENT Don't force all class names to lowercase
Speeds up autoloading because composer psr-4 works properly now
2017-09-20 15:14:55 +12:00
Florian Thoma
d1f7e6959f update tests and doc 2017-09-05 09:42:08 +10:00
Damian Mooyman
9b4d689bb2 Lazy-load custom methods and extensions on CustomMethods and Extensible traits
No longer need constructExtensions()
2017-08-22 15:47:24 +12:00
Daniel Hensby
33c2c7bfe7
Merge branch '3' into 4 2017-08-17 15:06:00 +01:00
Damian Mooyman
323644c7bb
API Implement cascade_deletes 2017-08-09 15:14:00 +12:00
Damian Mooyman
47f24ce05b
Fixup test linting 2017-07-27 12:05:27 +12:00
Aaron Carlino
74873096bd New getSummary() API for SearchContext 2017-07-27 11:56:37 +12:00
Daniel Hensby
d7095c2213
Merge branch '3' into 4 2017-07-18 14:19:16 +01:00
Damian Mooyman
ed0ed89865 Merge pull request #7055 from robbieaverill/pulls/4.0/polymorphic-has-one-indexes
NEW Ensure polymorphic has_one fields are indexed
2017-07-18 16:39:45 +12:00
Robbie Averill
da4e46e4de FIX Use merge and set instead of update for config calls 2017-07-17 17:59:40 +12:00
Robbie Averill
bd5782adca NEW Allow index type to be configured per DBField instance 2017-07-17 14:36:47 +12:00
Robbie Averill
c9c4390619 NEW Ensure polymorphic has_one fields are indexed
* Add tests for config based indexing on composite DBFields
* Allow fields to have "indexed" option passed via field spec
2017-07-17 14:36:29 +12:00
Damian Mooyman
f65e3627dc
BUG Implement or exclude all pending upgrader deltas 2017-07-03 12:21:47 +12:00
Sam Minnee
2c8790ca7d FIX: DataObject::get_one() misses return null, not false
Fixes https://github.com/silverstripe/silverstripe-framework/issues/5441
2017-06-29 13:51:52 +12:00
Daniel Hensby
e7df10dc52
Merge branch '3' 2017-06-28 18:59:08 +01:00
Damian Mooyman
3873e4ba00 API Refactor bootstrap, request handling
See https://github.com/silverstripe/silverstripe-framework/pull/7037
and https://github.com/silverstripe/silverstripe-framework/issues/6681

Squashed commit of the following:

commit 8f65e56532
Author: Ingo Schommer <me@chillu.com>
Date:   Thu Jun 22 22:25:50 2017 +1200

    Fixed upgrade guide spelling

commit 76f95944fa
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 16:38:34 2017 +1200

    BUG Fix non-test class manifest including sapphiretest / functionaltest

commit 9379834cb4
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 15:50:47 2017 +1200

    BUG Fix nesting bug in Kernel

commit 188ce35d82
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 15:14:51 2017 +1200

    BUG fix db bootstrapping issues

commit 7ed4660e7a
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 14:49:07 2017 +1200

    BUG Fix issue in DetailedErrorFormatter

commit 738f50c497
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 11:49:19 2017 +1200

    Upgrading notes on mysite/_config.php

commit 6279d28e5e
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 11:43:28 2017 +1200

    Update developer documentation

commit 5c90d53a84
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 10:48:44 2017 +1200

    Update installer to not use global databaseConfig

commit f9b2ba4755
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 21:04:39 2017 +1200

    Fix behat issues

commit 5b59a912b6
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 17:07:11 2017 +1200

    Move HTTPApplication to SilverStripe\Control namespace

commit e2c4a18f63
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 16:29:03 2017 +1200

    More documentation
    Fix up remaining tests
    Refactor temp DB into TempDatabase class so it’s available outside of unit tests.

commit 5d235e64f3
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 12:13:15 2017 +1200

    API HTTPRequestBuilder::createFromEnvironment() now cleans up live globals
    BUG Fix issue with SSViewer
    Fix Security / View tests

commit d88d4ed4e4
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 20 16:39:43 2017 +1200

    API Refactor AppKernel into CoreKernel

commit f7946aec33
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 20 16:00:40 2017 +1200

    Docs and minor cleanup

commit 12bd31f936
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 20 15:34:34 2017 +1200

    API Remove OutputMiddleware
    API Move environment / global / ini management into Environment class
    API Move getTempFolder into TempFolder class
    API Implement HTTPRequestBuilder / CLIRequestBuilder
    BUG Restore SS_ALLOWED_HOSTS check in original location
    API CoreKernel now requires $basePath to be passed in
    API Refactor installer.php to use application to bootstrap
    API move memstring conversion globals to Convert
    BUG Fix error in CoreKernel nesting not un-nesting itself properly.

commit bba9791146
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 18:07:53 2017 +1200

    API Create HTTPMiddleware and standardise middleware for request handling

commit 2a10c2397b
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 17:42:42 2017 +1200

    Fixed ORM tests

commit d75a8d1d93
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 17:15:07 2017 +1200

    FIx i18n tests

commit 06364af3c3
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 16:59:34 2017 +1200

    Fix controller namespace
    Move states to sub namespace

commit 2a278e2953
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 12:49:45 2017 +1200

    Fix forms namespace

commit b65c21241b
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 15 18:56:48 2017 +1200

    Update API usages

commit d1d4375c95
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 15 18:41:44 2017 +1200

    API Refactor $flush into HTPPApplication
    API Enforce health check in Controller::pushCurrent()
    API Better global backup / restore
    Updated Director::test() to use new API

commit b220534f06
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 22:05:57 2017 +1200

    Move app nesting to a test state helper

commit 603704165c
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 21:46:04 2017 +1200

    Restore kernel stack to fix multi-level nesting

commit 2f6336a15b
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 17:23:21 2017 +1200

    API Implement kernel nesting

commit fc7188da7d
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 15:43:13 2017 +1200

    Fix core tests

commit a0ae723514
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 15:23:52 2017 +1200

    Fix manifest tests

commit ca03395251
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 15:00:00 2017 +1200

    API Move extension management into test state

commit c66d433977
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 14:10:59 2017 +1200

    API Refactor SapphireTest state management into SapphireTestState
    API Remove Injector::unregisterAllObjects()
    API Remove FakeController

commit f26ae75c6e
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 12 18:04:34 2017 +1200

    Implement basic CLI application object

commit 001d559662
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 12 17:39:38 2017 +1200

    Remove references to SapphireTest::is_running_test()
    Upgrade various code

commit de079c041d
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 7 18:07:33 2017 +1200

    API Implement APP object
    API Refactor of Session
2017-06-22 22:50:45 +12:00
Daniel Hensby
13ee3148d9
FIX Bracket should implement TestOnly 2017-05-30 22:44:24 +01:00
Damian Mooyman
963d9197d3
API Ensure that all DataQuery joins are aliased based on relationship name 2017-05-26 13:38:58 +12:00
Daniel Hensby
3e556b5966
NEW Move index generation to DataObjectSchema and solidify index spec 2017-05-25 23:29:12 +01:00
Damian Mooyman
fba8e2c245 API Remove Object class
API DataObjectSchema::manyManyComponent() return array is now associative array
2017-05-23 13:50:35 +12:00
Ingo Schommer
100048da33 API PSR-11 compliance (fixes #6594) (#6931)
Note that our usage of `$asSingleton` in `get()` is fine. Quote from the PSR:

> Two successive calls to get with the same identifier SHOULD return the same value. However, depending on the implementor design and/or user configuration, different values might be returned, so user SHOULD NOT rely on getting the same value on 2 successive calls.
2017-05-19 13:45:07 +12:00
Daniel Hensby
3495c0826e Cleanup SapphireTest and time related tests (#6898)
* Test databases now include timestamp for easier debugging

* Use classname::class instead of string literal classnames

* Remove DataObject::get_one() from SapphireTest

* More fixes to ICU DB inconsitency for time formatting

* Correctly restore PHPUnits error handler
2017-05-18 22:01:55 +12:00
Damian Mooyman
f5f6fdce12
API Duplication of many_many relationships now defaults to many_many only
Fixes https://github.com/silverstripe/silverstripe-cms/issues/1453
2017-05-16 23:26:39 +12:00
Ingo Schommer
493556e497 More robust datetime ICU tests
Some ICU versions (e.g. on CentOS 7.2 with PHP 5.6)
use lowercase rather than uppercase AM/PM indicators
2017-05-08 21:34:56 +12:00