Robbie Averill
47fbaebb92
Alter deprecation version numbers
...
Co-Authored-By: ScopeyNZ <guy@scopey.co.nz>
2018-11-06 00:07:24 +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 Minnée
536e2d6835
Merge pull request #8511 from jmfederico/patch-1
...
Update comment about locks in MySQL
2018-11-05 22:32:18 +13:00
Sam Minnee
76255c9fb5
FIX: CheckboxSetField can now save into DBMultiEnum
...
Fixes https://github.com/silverstripe/silverstripe-framework/issues/1489
2018-11-05 17:40:28 +13:00
Luke Edwards
97180c2612
Fix readonly grid state always being truthy ( #8562 )
2018-11-02 14:28:47 +13:00
Luke Edwards
8866e7674a
BUG: Fix duplicate plugins on HTML editor fields ( #8559 )
...
* BUG: Fix duplicate plugins on HTML editor fields
* Add new test
2018-11-02 12:26:53 +13:00
Guy Marriott
2ff7ee6752
NEW Deprecate RandomGenerator::generateEntropy in favour of using random_bytes directly
2018-11-01 19:51:15 +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
Luke Edwards
c7b8b80e8b
Persist GridField readonly state, add view button ( #8535 )
...
* Persist GridField readonly state, add view button
* Minor clarity fixes
2018-11-01 11:12:52 +13:00
Robbie Averill
98c038688d
Add missing deprecation notices to Convert json methods
2018-10-29 22:15:22 +00:00
Andre Kiste
511c368e8c
Merge pull request #8521 from open-sausages/pulls/4.3/searching-for-legacy
...
Add config to force legacy filter header globally
2018-10-29 14:57:21 +13:00
Robbie Averill
b02a6fa02d
FIX Replace usage of Convert JSON methods with json_encode
2018-10-28 21:15:29 +00:00
Robbie Averill
9724d1dd73
API Convert JSON methods are now deprecated, use json_encode or decode instead
2018-10-28 21:13:47 +00:00
Luke Edwards
3284bf48d6
Fix search filtering relations and clear filters ( #8477 )
2018-10-26 14:43:56 +13:00
Luke Edwards
d879148bff
Add config to force legacy filter header globally
2018-10-26 14:28:15 +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
Will Rossiter
66a404ad1a
FIX use Injector for FormField::castedCopy
...
Allows LookupField to be replaced with user specificed classes.
2018-10-24 12:13:14 +13:00
Federico Jaramillo Martínez
e9bffe4020
Update comment about locks in MySQL
...
MySQL 5.7.5 and newer allow for multiple lock form the same session. This information is now reflected in the comment.
2018-10-22 22:33:16 -05:00
Maxime Rainville
af46381dca
MINOR Correct implementation of single lookup field when valueToLabel returns null
2018-10-23 11:54:26 +13:00
Robbie Averill
bea4101e21
Add tests for DisabledTransformation, PrintableTransformation and PrintableTransformation_TabSet
2018-10-20 20:06:02 +02:00
Robbie Averill
449b2cf291
Add tests for DefaultFormFactory
2018-10-20 19:47:11 +02:00
Robbie Averill
9ceef59e1b
Merge branch '4.3' into 4
2018-10-20 18:31:04 +02:00
Robbie Averill
97209bc919
Add edge case unit tests for DateField
2018-10-20 18:15:42 +02:00
Daniel Hensby
88d78dfd95
Merge pull request #8505 from creative-commoners/pulls/4.3/defensive-extensions
...
FIX getExtensionInstance can return null, add a case to handle that
2018-10-20 16:58:55 +01:00
Robbie Averill
c06cf4820e
BUG Readonly and disabled CurrencyFields no longer always returns dollar currency sign, now respect config
2018-10-20 17:47:16 +02:00
Robbie Averill
d56bad7568
Add tests for edge cases in CurrencyField
2018-10-20 17:33:59 +02:00
Robbie Averill
8929b8204f
More validation tests for ConfirmedPasswordField
2018-10-20 17:21:25 +02:00
Robbie Averill
c418ee2915
NEW Add getters and setters for public properties in ConfirmPasswordField, add tests
...
Some of the validation parts of ConfirmPasswordField are previously untested, this adds tests
2018-10-20 16:43:49 +02:00
Robbie Averill
60b375d995
Add more tests for CheckboxField_Readonly and CompositeField, improve PHPDocs
2018-10-20 15:44:23 +02:00
Robbie Averill
3cdb73bd44
NEW Add getLogger() to MonologErrorHandler and add test for exception without one
2018-10-20 15:00:08 +02:00
Robbie Averill
9911c9c9ef
Use single quotes and getters over direct prop access in HTTPOutputHandler
2018-10-20 14:51:08 +02:00
Robbie Averill
73df3166b7
Switch to short array syntax in DetailedErrorFormatter, add spaces between array values
2018-10-20 14:30:15 +02:00
Robbie Averill
e211e27470
Add more unit tests for DebugViewFriendlyErrorFormatter, tidy up Director::is_ajax() return
2018-10-20 14:27:57 +02:00
Robbie Averill
7f6f5c9ec9
FIX Flush extra methods cache on DataObjects after each unit test class has finished
2018-10-20 13:59:03 +02:00
Robbie Averill
311fd62d95
FIX getExtensionInstance can return null, add a case to handle that
2018-10-19 18:12:13 +02:00
bergice
a28e2e183e
BUG: Fix enum filter in Search component from adding Any
as a filter
...
Fixes #702
2018-10-19 17:05:12 +13:00
Robbie Averill
f4085300ce
Merge pull request #8495 from micmania1/bugfix/828-grapql-asset-admin-memory
...
BUGFIX #828 optimised query in graphql asset admin
2018-10-18 11:36:51 +02:00
Sam Minnée
24b9dbc8ef
Merge pull request #8490 from creative-commoners/pulls/4.3/minor-db-tweaks
...
NEW Some minor refactoring of the PDO and MySQLi connectors
2018-10-18 22:11:29 +13:00
micmania1
1e83dff4ed
BUGFIX #828 optimised query in graphql asset admin
2018-10-18 18:34:03 +13:00
bergice
a6a1743997
BUG: Fix ENTER
not triggering form save button as GridField
s used submit
type buttons
2018-10-18 12:37:24 +13:00
Robbie Averill
437e53f2fe
NEW Some minor refactoring of the PDO and MySQLi connectors
...
Some small performance optimisations (not using callables in loops, switch strval for string
casting), Config call updates and replace call_user_func_array with direct variadic call.
Also removes some redundant else statements after returns.
2018-10-17 12:54:42 +02:00
Aaron Carlino
57756f38cb
Revert bd6c4fd
2018-10-17 14:54:03 +13:00
Robbie Averill
c18e9b1298
Merge pull request #8439 from sminnee/consistent-limit
...
FIX: Make ArrayList::limit() consistent with DataList::limit()
2018-10-16 12:05:11 +02:00
Aaron Carlino
7d201309ad
Merge branch '4.2' into 4
2018-10-15 13:42:55 +13:00
Robbie Averill
516267ed46
Merge pull request #8470 from kinglozzer/suf-fixing-the-suffix
...
FIX: Re-instate missing SS_DATABASE_SUFFIX functionality (fixes #7966 )
2018-10-12 23:11:54 +02:00
Robbie Averill
7215637673
Merge pull request #8460 from open-sausages/pulls/4/lazy-loadable-gidfield
...
API Add a new GridFieldLazyLoader component
2018-10-11 13:43:10 +02:00
Loz Calver
dca2d47127
Merge pull request #8357 from creative-commoners/pulls/4.3/fix-i18n
...
FIX Text collector translations now compile without errors
2018-10-11 13:16:23 +02:00
Loz Calver
26f2044533
Merge pull request #8437 from sminnee/faster-cleartable-ss4
...
FIX: Use DELETE FROM instead of TRUNCATE for clearTable
2018-10-11 12:32:31 +02:00
Loz Calver
ee21c42011
FIX: Re-instate missing SS_DATABASE_SUFFIX functionality ( fixes #7966 )
2018-10-11 10:50:56 +01: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
Maxime Rainville
250d925810
MINOR Update CompositeField::__construct to call setChildren #8460
2018-10-11 15:25:34 +13:00
Maxime Rainville
98afbfe9b4
Implement Peer review feedback #8460
2018-10-11 14:56:06 +13:00
Maxime Rainville
ef439f9306
MINOR Correct GridField_DataManipulator PHPDOC to not assume DataList
...
Tweak GridField_DataManipulator to not assume only DataList will be
provided. Use the SS_List Interface instead. (#8460 )
2018-10-11 12:06:21 +13:00
Maxime Rainville
2e2ca5a4a7
Make sure LazyLoader still woks after a readonly transofrmation ( #8460 )
2018-10-11 11:56:39 +13:00
Robbie Averill
eb0ef1c268
Merge pull request #8465 from creative-commoners/pulls/4.3/extensible-bug
...
NEW Add method to flush extra_methods static cache data and implement into test state
2018-10-11 00:02:27 +02:00
Robbie Averill
3642e7aeae
Remove extensionsToRemove and extensionsToReapply, now obsolete
2018-10-10 22:19:15 +02:00
Robbie Averill
bd6c4fdda0
Merge pull request #8440 from creative-commoners/pulls/4.3/its-indestruc-tab-le
...
NEW TabSet react component is no longer structural
2018-10-09 22:05:53 +02:00
Robbie Averill
56d5621934
FIX Flush extra_methods statics between test runs
2018-10-09 13:22:54 +02:00
Robbie Averill
d1281a571a
FIX Escape HTML in PHPDoc to fix API docs from rendering incorrectly
2018-10-09 10:46:45 +02:00
Maxime Rainville
fdb53311ba
Fix linting issue.
2018-10-09 17:32:42 +13:00
Maxime Rainville
bfb6518176
Tweak the logic to empty lazy list.
2018-10-09 17:32:42 +13:00
Maxime Rainville
d2a51471e9
Don't lazy load tab that are not in a TabSet.
2018-10-09 17:32:42 +13:00
Maxime Rainville
5276b6cbb1
API Add FieldList::getContainerField
2018-10-09 17:32:42 +13:00
Maxime Rainville
bdb53979aa
API Create a new GridFieldLazyLoader GridField component
2018-10-09 17:32:42 +13:00
Loz Calver
5426f34b4a
Merge pull request #8463 from creative-commoners/pulls/4.3/rm-cachedata
...
FIX Remove unused cacheData prop from #8451
2018-10-08 15:12:14 +02: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
Robbie Averill
c4788803ee
FIX Remove unused cacheData prop from #8451
2018-10-08 12:05:29 +02:00
Maxime Rainville
36b1066413
Merge pull request #8451 from creative-commoners/pulls/4.3/memory-cache-findtemplate
...
NEW Add memory cache to ThemeResourceLoader::findTemplate()
2018-10-08 10:38:07 +13:00
Sam Minnee
e5d3b28a4d
FIX: Don’t break validation on selects without a source.
...
Fixes cases where there are no valid values or an empty-string
value is manually added rather than using setEmptyString()
Fixes #4849
Fixes #7159
2018-10-06 11:53:17 +13:00
Sam Minnée
7915fe0c0f
Merge pull request #8303 from hchokshi/pulls/4.2/viewable-data-customised-isset
...
Implement __isset for ViewableData_Customised
2018-10-06 09:37:19 +13:00
Robbie Averill
98568262f2
Fixed phpcs violations
2018-10-05 16:07:33 +02:00
Robbie Averill
024762f03b
Move default themes lookup before cache check
2018-10-05 15:00:32 +02:00
Robbie Averill
da9301f241
Use SilverStripe cache API instead of memory cache, add tests and fix cache config indentation
2018-10-05 14:58:48 +02:00
Robbie Averill
172d8915b7
Clear cache between ThemeResourceLoader tests
2018-10-05 14:12:26 +02:00
Robbie Averill
9ea7b58a8f
NEW Add memory cache to ThemeResourceLoader::findTemplate()
...
For large sites, this reduces the number of file_exists, Path::join, getThemePaths etc
calls and can contribute to 26% reduction in TTFB load time
2018-10-05 14:12:26 +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
ee24413c30
Merge branch '4.2' into 4
2018-10-03 15:28:05 +02:00
Robbie Averill
b0871ebd75
Merge pull request #8417 from creative-commoners/pulls/4.3/many-many-through-sorting-tests
...
Add more list sorting tests and fix many many through sorting
2018-10-03 13:30:20 +02:00
Robbie Averill
d2b646cc13
Merge pull request #8286 from wilr/patches/mysql-create-table-issue
...
Check database has table before altering.
2018-10-03 13:24:59 +02:00
Robbie Averill
d74fed554a
Merge pull request #8427 from sminnee/fix-1397
...
FIX: Append any fields that don’t match name in insertBefore/insertAfter
2018-10-03 13:22:23 +02:00
Robbie Averill
6a5fb4999c
Merge pull request #8416 from lekoala/patch-14
...
raw2att accepts array, but sprintf doesn't
2018-10-03 13:21:43 +02:00
Robbie Averill
7f685b0bea
Merge pull request #8423 from creative-commoners/pulls/4.2/default-locale-for-members
...
FIX New members now receive the configured default locale, not the current locale
2018-10-03 13:18:05 +02:00
Robbie Averill
79f9d6b733
Merge pull request #8428 from sminnee/fix-2636
...
FIX: Don’t change state in ArrayList::getIterator()
2018-10-03 13:11:39 +02:00
Raissa North
90afb2037a
NEW TabSet react component is no longer structural
2018-10-03 16:36:17 +13:00
Robbie Averill
cb2b9498fb
API Deprecate updateSearchContextCallback and updateSearchFormCallback
2018-10-03 13:47:40 +13:00
Luke Edwards
bf60a699a5
Add extension points for ModelAdmin search API
2018-10-03 13:47:40 +13:00
Sam Minnee
0cc72c91ad
FIX: Use DELETE FROM instead of TRUNCATE for clearTable
...
clearTable is mainly used for clearing data between tests. In this case,
there are very few or zero records, and DELETE FROM is quicker than
TRUNCATE, which works by deleting and recreating the table.
This materially speeds up test execution, at least on MySQL.
Cherry-pick of SS3 ae9ab22a8f
2018-10-03 13:40:00 +13:00
Guy Marriott
5970fc2417
FIX Moving test to correct director
2018-10-03 10:47:17 +13:00
Robbie Averill
5a20bb5e20
Revert "FIX: Use DELETE FROM instead of TRUNCATE for clearTable"
...
This reverts commit 79c2b5ad42
.
2018-10-02 14:35:10 +02:00
Robbie Averill
c8e7672ede
Merge pull request #8414 from creative-commoners/pulls/4/searching-for-a-name-conflict
...
FIX Avoid having search fields with the same names as form elements
2018-10-02 13:43:59 +02:00
Robbie Averill
2ca089bcce
Merge pull request #8433 from sminnee/faster-cleartable
...
FIX: Use DELETE FROM instead of TRUNCATE for clearTable
2018-10-02 10:43:54 +02:00
Sam Minnee
79c2b5ad42
FIX: Use DELETE FROM instead of TRUNCATE for clearTable
...
clearTable is mainly used for clearing data between tests. In this case,
there are very few or zero records, and DELETE FROM is quicker than
TRUNCATE, which works by deleting and recreating the table.
This materially speeds up test execution, at least on MySQL.
Implemented in SS3 at 815da76b056a716c8831d22bbf93528912cbcb28
2018-10-02 18:00:38 +13:00
Sam Minnee
f2cbc1dfbb
FIX: Don’t use USE_FRM in MySQL repair. Fixes #6300 .
...
USE_FRM is a sufficiently dangerous option that it should require
manual DBA activity to carry out.
See http://dev.mysql.com/doc/refman/5.7/en/repair-table.html for more
info.
2018-10-02 10:48:47 +13:00
Sam Minnee
71dad5f685
FIX: Append any fields that don’t match name in insertBefore/insertAfter
...
Previous behaviour was to return false, which has been described as
a confusing bug on https://github.com/silverstripe/silverstripe-framework/issues/1397
where the issue was identified.
2018-10-02 10:39:48 +13:00
Sam Minnee
ad87890b2e
FIX: Don’t change state in ArrayList::getIterator()
...
This prevents the map-to-ArrayData conversion from changing object
state and making the result of toArray() non-deterministic.
Fixes #2636 . Other solutions were suggested on that ticket, but there is
no way of putting special code in for a SSViewer-specific iterator, and
having object state pre-emptively converted to ArrayData would
be an SS5-level change.
2018-10-02 09:56:09 +13:00
Maxime Rainville
755907d117
Merge pull request #8409 from open-sausages/pulls/4/treedropdown-caching
...
MINOR Add caching to the TreeDropdownField tree action
2018-10-01 13:56:21 +13:00
Guy Marriott
c503dbd634
Prefixing search filters for the React search form context
2018-10-01 13:38:32 +13:00