Commit Graph

294 Commits

Author SHA1 Message Date
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
Ingo Schommer
20c6066391 Remove flakey swedish intl test
The intl extension relies on system ICU libraries.
Which seems to behave differently on CentOS 7.2 with PHP 5.6 (returns as '53.292:18 US$').
See http://stackoverflow.com/questions/3991814/php-pecl-extension-intl-giving-garbled-results-for-swedish-ordinal-numbers/8691743#8691743

It's a redundant test, let's just avoid this noise.
2017-05-08 21:31:14 +12:00
Damian Mooyman
136b67f597
API Major refactor of Hierarchy into MarkedSet 2017-04-13 16:27:13 +12:00
Damian Mooyman
9be22701fd API exists() no longer true for nullifyIfEmpty if empty string
Optimise DBString::exists() to skip shortcodes
2017-04-04 10:20:08 +12:00
Ingo Schommer
e3fbd1dcac Fixed coding conventions 2017-04-03 20:54:25 +12:00
Ingo Schommer
e9693467bf Fixed tests 2017-04-03 20:04:37 +12:00
Daniel Hensby
ac075eaf0b Remove TestListener and rely on PHPUnits APIs 2017-03-30 11:46:58 +13:00
Damian Mooyman
ac3a9c9e6e API Split out SilverStripe\ORM\Versioned into new module 2017-03-27 11:03:39 +13:00
Daniel Hensby
0410b4c35e
Respect PHPUnit method visibility 2017-03-24 16:23:03 +13:00
Daniel Hensby
6b4a72dee8
Fixing deprecated PHPUnit APIs 2017-03-24 16:23:01 +13:00
Damian Mooyman
1186f07830 API Use mysql-safe table namespace separator 2017-03-24 14:17:30 +13:00
Sam Minnée
d91c6659be Merge pull request #6723 from open-sausages/pulls/4.0/assets-module
API Split SilverStripe\Assets into separate module
2017-03-23 09:21:27 +13:00
Damian Mooyman
dae6d5902f API Split SilverStripe\Assets into separate module 2017-03-21 11:12:51 +13:00
Damian Mooyman
e4c68bc2bf
Fix and test pluralisation usages 2017-03-21 10:49:30 +13:00
Sam Minnee
5ea238c58b MINOR: Add a Versioned test for #6680
It turns out that cascaded query params as described in #6680 were
already implemented; this test confirms that.
2017-03-14 09:39:26 +13:00
Daniel Hensby
f225b83e2b
Merge branch '3' 2017-03-03 15:55:22 +00:00
Damian Mooyman
8444a21cbf API Upgrade tests to use new Config API 2017-02-27 16:54:01 +13:00
Ingo Schommer
d220ca3f67 API Use symfony/cache (fixes #6252) 2017-02-26 13:07:59 +13:00
Daniel Hensby
1c55948fc1
Ensure test objects implement TestOnly 2017-02-21 20:30:15 +00:00
Damian Mooyman
014f0d23ed
API Create SeparatedDateField
API Restrict allowed values parsed via DBDate::setValue
API Remove NumericField_Readonly
API Remove DBTime::Nice12 / Nice24
2017-02-15 11:07:58 +13:00
Damian Mooyman
029a8b9586
API Substitute Zend_Currency with NumberFormatter based solution
API Substitute Zend_Locale with Locale / NumberFormatter
API Substitute Zend_Date with IntlDateFormatter
API Added DBTIme::Nice12, FormatFromSettings
API Added Short() method to DBDate / DBTime / DBDatetime
API Add Date::getTimestamp()
API Added setSubmittedValue api for FormField
API Add second arg to base FormField::setValue()
API Major refactor of i18n into component data parts
API Implement Resettable interface to reset objects between tests
ENHANCEMENT Changed DBField::create_field return type to `static` to support better type hinting
ENHANCEMENT i18nTextCollector supports __CLASS__
2017-02-09 15:28:59 +13:00
Daniel Hensby
71383b827d
Merge branch '3' 2017-02-08 12:34:45 +00:00
Andrew Aitken-Fincham
b8a0944bda FIX/load fields if lazy ones exists 2017-02-08 08:52:48 +00:00
Aaron Carlino
0982f77ec7 Feature/aggregate data filters (#6553) 2017-02-03 09:03:19 +13:00
Daniel Hensby
873fd8c5bc
NEW replace _ss_environment.php with .env and environment vars 2017-01-31 20:40:17 +00:00
Daniel Hensby
664c0eafbe
Merge branch '3' 2016-12-28 14:30:54 +00:00
Damian Mooyman
9be5142fc1 API ChangeSet::publish() / canPublish() no longer treats hasChanges() = false as a permission error
BUG fix issues with doArchive() in live mode
2016-12-21 14:28:20 +13:00
Damian Mooyman
c2a1e86f5d Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
Damian Mooyman
6e589aac75
API Updates to Form, ValidationResponse, ValidationException
API Implement form schema "errors" handling
2016-12-09 14:24:11 +13:00
Sam Minnee
6650561dac Don't use session and FormSchema to manage server-side React validation responses 2016-12-09 10:27:23 +13:00
Daniel Hensby
1be2e70a2a
Merge branch '3' 2016-11-24 14:18:09 +00:00
Damian Mooyman
22cb3d0d74 Fix various ORM test issues 2016-11-23 19:25:12 +13:00
Damian Mooyman
6e8304ff2f API Namespace framework tests 2016-11-23 19:25:12 +13:00
Damian Mooyman
789cb5b465 Move files to psr-2 standard locations 2016-11-23 19:25:12 +13:00