Commit Graph

4340 Commits

Author SHA1 Message Date
Steve Boyd
09fdfc4611 Merge branch '4.10' into 4 2022-03-08 12:21:52 +13:00
Steve Boyd
59800b5879 Merge branch '4.9' into 4.10 2022-03-08 12:21:03 +13:00
Steve Boyd
badc17891c ENH Create fallback email from address 2022-03-07 16:18:57 +13:00
Tyler Trout
6b1c5eb6d7
NEW Allow methods to be used for flexible searchable_fields (#10199)
* Allow methods to be used for flexible searchable_fields

* match_any key

* Documentation

* Update docs/en/02_Developer_Guides/00_Model/11_Scaffolding.md

Co-authored-by: GuySartorelli <36352093+GuySartorelli@users.noreply.github.com>

* Search fields test

* Newlines

* Update src/ORM/Search/SearchContext.php

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>

* Update docs/en/02_Developer_Guides/00_Model/11_Scaffolding.md

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>

* Removed comments and whitespace. Linting fixes

Co-authored-by: GuySartorelli <36352093+GuySartorelli@users.noreply.github.com>
Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
2022-02-10 09:40:16 +13:00
Mojmir Fendek
89c87ddbf8
NEW: Static validation for relationships. (#9874)
* NEW: Static validation for relationships.

* Unit tests added.

* PR fixes

* PR feedback: Execute validation on flush.

* PR fixes.

* PR fixes.
2022-02-04 14:41:09 +13:00
Steve Boyd
fc707cc10d
MNT Refactor out missing assertArraySubset (#10208) 2022-01-20 12:24:25 +13:00
Steve Boyd
511b8a4c71 Merge branch '4.10' into 4 2022-01-19 16:03:42 +13:00
Steve Boyd
94f976d985
Merge pull request #9894 from brettt89/fix/single-select-empty-default
Move hasEmptySchema and emptyString to DataSchema on SingleSelectField
2022-01-18 11:11:17 +13:00
Mojmir Fendek
3db1435df7
NEW: Allow DateTime to be immutable (#10125)
* BUG: Datetime modify() returns a new field instance.
* PR fixes.
* PR fixes.
2022-01-18 09:41:11 +13:00
Michal Kleiner
3963dd4ecc
Merge pull request #10183 from kinglozzer/readonly-extraclass
FIX Ensure extra classes are copied over to readonly/disabled fields
2022-01-15 10:27:39 +13:00
Steve Boyd
cbf2987a61
FIX Disallow negative values for FailedLoginCount (#10200) 2022-01-14 11:29:49 +13:00
Loz Calver
cb37e5fb87 FIX: Ensure extra classes are copied over to readonly/disabled fields 2021-12-17 09:16:43 +00:00
Steve Boyd
ed492da636 Merge branch '4.10' into 4 2021-12-16 17:45:33 +13:00
Steve Boyd
8b3bec9c68 Merge branch '4.9' into 4.10 2021-12-16 10:58:13 +13:00
Michal Kleiner
645e1f14bd
Merge pull request #10173 from GuySartorelli/patch-2
FIX Allow custom SELECT to be used for sorting in DataQuery::column()
2021-12-14 10:23:48 +13:00
GuySartorelli
0b0c13764b FIX allow custom SELECT to be used for sorting in DataQuery::column().
If a custom select clause (using special features such as `CASE`) is used, and it was added using `SQLSelect::selectField`, the custom select clause should be retained when calling DataQuery::column().
2021-12-14 08:01:02 +13:00
Lukas
552cf5944d
MNT Fix various typos with codespell (#10177) 2021-12-13 21:05:33 +13:00
Maxime Rainville
27d7c2fe85
Merge pull request #9749 from gurucomkz/patch-9453-mysql8-ints
FIX Don't use int width for mysql >= 8.0.17 #9453
2021-12-13 12:39:12 +13:00
Maxime Rainville
9ea608d0f2
Merge pull request #10021 from xini/fix-login-marker-cookie
remove login marker cookie on logout
2021-12-13 10:48:32 +13:00
Sergey Shevchenko
235ebe3c3c TEST: Simulated test for MySQLSchemaManager::shouldUseIntegerWidth() 2021-12-08 11:19:47 +13:00
Maxime Rainville
e0197191b8 Rename "Ignore CI Configs" to "Ignored CI Config" 2021-11-22 11:02:27 +13:00
Maxime Rainville
7c3fddfc8a Anwser Peer review feedback 2021-11-18 23:16:03 +13:00
Maxime Rainville
cbc4593ab4 ENH Don't index test from PHPUNit 5.7 module wdon using PHPUnit 9.5 2021-11-18 21:45:53 +13:00
Maxime Rainville
640a7e3eea ENH Improve ManifestFileFinder so it can ignore test based on the testing library 2021-11-18 21:45:53 +13:00
Maxime Rainville
2922370d81 API Add Module::getCILibrary function 2021-11-18 21:45:53 +13:00
Steve Boyd
081537d014 MNT Adjust a couple of unit tests to run from recipe-kitchen-sink 2021-11-16 12:55:00 +13:00
Maxime Rainville
33d310cc69
Merge pull request #10139 from creative-commoners/pulls/4/dms
MNT Remove polyfill
2021-11-09 11:01:28 +13:00
Loz Calver
20134e6a4f
NEW Add FirstPage() and LastPage() to PaginatedList (#10129) 2021-11-08 09:26:21 +13:00
Steve Boyd
e53c18528c MNT Remove polyfill 2021-11-05 12:06:55 +13:00
Kirk Mayo
b8d37f9ae4
NEW Validate the Title on Group is not empty (#10113) 2021-11-03 14:26:16 +13:00
GuySartorelli
fc349db511
API Add a way to check if a form or form field has an extra css class (#10112)
Required for silverstripe/silverstripe-admin#1252
2021-11-01 17:01:17 +13:00
Florian Thoma
31668e8acf fix: remove login marker cookie on logout
Apply suggestions from code review

Co-authored-by: Michal Kleiner <mk@011.nz>
2021-11-01 10:04:18 +11:00
Steve Boyd
cd076542f4
API Upgrade SapphireTest to work with phpunit 9 (#10028) 2021-10-27 15:39:47 +13:00
GuySartorelli
059d8aac0a
NEW Add afterUpdateCMSFields method to DataObject. (#9819) 2021-10-26 16:05:11 +13:00
GuySartorelli
49a7f08c07
ENH: Display validation messages for GridFields (#10015)
* FIX: Display validation messages for GridFields
* ENH: Add test for GridField validation messages.
2021-10-19 12:03:40 +13:00
Maxime Rainville
fd8b0cc253 MNT Fix broken test caused by missing table 2021-10-04 15:16:10 +13:00
Michal Kleiner
38fe326262 MNT Fix minor typos 2021-09-25 00:23:43 +12:00
Michal Kleiner
7226d7fab6 ENH Add tests for Hierarchy extension when applied to a subclass 2021-09-25 00:23:43 +12:00
Maxime Rainville
50acac04c5
Merge pull request #10073 from silverstripe/pulls/4/skip-login-hash-tests
MNT Skip tests when session-manager module is installed
2021-09-03 12:20:58 +12:00
Steve Boyd
1fcbcc8368 MNT Skip tests when session-manager module is installed 2021-09-03 11:09:59 +12:00
Steve Boyd
b5c3b60502
Merge pull request #10047 from madmatt/pulls/extend-hydrate
NEW Add extension point to DataObject->hydrate()
2021-08-27 10:41:06 +12:00
Matt Peel
f99ba5d716 NEW Add extension point to DataObject->hydrate() 2021-08-25 16:07:02 +12:00
Steve Boyd
805004fd31 MNT Update unit tests to use logInAs() 2021-08-23 09:04:31 +12:00
Steve Boyd
92f47da08b
API Update SwiftMailer from v5 to v6 (#10048)
* Update SwiftMailer from v5 to v6

- Fixes #9834
- Update default Swift_Transport to use Swift_SendmailTransport
- Update version restraint for Swiftmailer
- Address new parameter type for Swift_Message::setDate()
- Update class references in docblocks

Co-authored-by: Danaë Miller-Clendon <danae.millerclendon@silverstripe.com>
2021-08-18 12:16:45 +12:00
Steve Boyd
733282307e MNT Update tests to use logInAs() 2021-08-12 10:56:29 +12:00
Steve Boyd
a90d46dbc4 NEW Title tips for form fields 2021-07-31 14:45:24 +12:00
Andre Kiste
ae61be3a49
Merge pull request #10011 from creative-commoners/pulls/4/htmleditor-readonly-lazy-load
MNT Update unit test to expect loading attribute
2021-07-09 11:00:26 +12:00
Steve Boyd
f6e8d6e591 Merge branch '4.8' into 4 2021-07-07 14:03:02 +12:00
Steve Boyd
22f809840a MNT Update unit test to expect loading attribute 2021-07-06 17:27:54 +12:00
Steve Boyd
87d076faa6 FIX Cast DBInt value to int 2021-07-06 16:43:54 +12:00
Ingo Schommer
e8c14a9d5b
Merge pull request #10005 from creative-commoners/pulls/4.8/10k
FIX Parse Enums with dots in their values
2021-07-02 09:33:29 +12:00
Steve Boyd
8e803bbcfc FIX Parse Enums with dots in their values 2021-07-01 16:00:08 +12:00
Steve Boyd
0b979dc345 FIX Cache duplicate embeds separately 2021-06-29 12:17:07 +12:00
Steve Boyd
325021c2f8 Merge branch '4.8' into 4 2021-06-21 14:59:01 +12:00
Steve Boyd
7ed7ad0254 FIX Ensure changing a password to blank is validated 2021-06-17 12:05:20 +12:00
Steve Boyd
9463aaf571 Merge branch '4.8' into 4 2021-06-08 11:49:01 +12:00
Steve Boyd
fb0d769049
Merge pull request #9969 from creative-commoners/480-tag
Security fixes from 4.8.0
2021-06-08 11:47:35 +12:00
Michal Kleiner
0bd5b98d62 MNT Fix typos in test comments 2021-06-03 13:49:24 +12:00
Michal Kleiner
9dd69c40e3 NEW Add DBText->Summary tests 2021-06-03 13:49:24 +12:00
Steve Boyd
8024551376 [CVE-2020-26138] Validate custom multi-file uploads 2021-06-02 16:24:23 +12:00
Steve Boyd
7f97734a20 [CVE-2020-25817] Prevent loading of xml entities 2021-06-02 16:24:17 +12:00
Steve Boyd
a3df66860f Merge branch '4.8' into 4 2021-05-31 17:05:11 +12:00
Steve Boyd
9ccdb8efb2 Merge branch '4.7' into 4.8 2021-05-31 17:04:54 +12:00
Maxime Rainville
472fc4ebb4
BUG Update DataQuery::exists to return false when limit causes no result to be returned (#9946)
* BUG Update DataQuery::exists to return false when limit causes no result to be returned

* Update comment

* Fixing linting issue
2021-05-31 16:50:58 +12:00
Ingo Schommer
196752566f
Merge pull request #9655 from sminnee/pulls/9647-find-lost-records
NEW: Add GridFieldDetailForm::setRedirectMissingRecords()
2021-05-21 13:53:18 +12:00
Sam Minnee
8883413ba7 NEW: Add GridFieldDetailForm::setRedirectMissingRecords()
This new opt-in setting will let grid field detail forms redirect to the
“Correct” URL of a GridField if it’s not found in the current list.

This works by:
 * Looking for the item in the database
 * If it exists, check for a CMSEditLink() method that returns a value
 * If so, redirect to that

This is useful if you have a number of grid fields that each show a
partial list of records, and it’s possible for the user to make changes
such the item no longer appears in the list, but does appear in another
list.

It’s an opt-in feature as I think all changes like this should be
opt-in, based on previous experiences improving GridField and in turn
breaking SecurityAdmin and slowing versioned-data-browsing down. ;-)
2021-05-21 13:16:00 +12:00
Ingo Schommer
ad4e488dcf
Merge pull request #9192 from sminnee/fix-9163
NEW: Support dot syntax in form field names
2021-05-21 10:34:15 +12:00
Guy Marriott
766df06f23
Merge pull request #9631 from open-sausages/pulls/4/custom-sort-gridfield-autocompleter 2021-05-20 14:02:44 -07:00
Ingo Schommer
7a0d354529 Linter fixes 2021-05-21 08:30:43 +12:00
Ingo Schommer
8806b3befc Fixes required for dot notation support in fields
See #9163
2021-05-20 20:32:25 +12:00
Steve Boyd
a6ccc86f94 Merge branch '4.7' into 4.8 2021-05-03 14:21:37 +12:00
Steve Boyd
e6aeff6468 Merge branch '4.6' into 4.7 2021-05-03 14:21:20 +12:00
Garion Herman
debf1ae9fb
Merge pull request #9887 from lekoala/patch-18 2021-04-24 21:05:29 +12:00
Maxime Rainville
440c7cad35 MNT Add test to cover TreeDropdownField::TreeBaseId 2021-04-23 17:53:54 +12:00
Steve Boyd
bcccc63d33 API Methods to override logout_accross_devices 2021-04-19 13:13:35 +12:00
Maxime Rainville
6fc25e4e96
RFC Add chunk method to DataList to iterate over large dataset (#8940) 2021-04-14 07:49:44 +12:00
Maxime Rainville
66fa597b3b
FIX Better handling of remember me token when login across devices is disabled (#9895)
* BUG Make sure remember me tokens are not invalidated when logging out without the logout_across_devices flag

* Remove unneeded comment
2021-03-31 11:31:52 +13:00
Brett Tasker
600f8e5b86 Move hasEmptySchem and emptyString to DataSchema on SingleSelectField 2021-03-23 21:53:30 +13:00
Thomas Portelange
fc40e0b98a
Test that email is trimmed 2021-03-22 09:03:43 +01:00
Maxime Rainville
7a04090bdf Merge branch '4.7' into 4 2021-03-15 14:27:47 +13:00
Nik
d2fa64b489
BUG Allow Email to re-render when data changes (#9876)
* Fix: Allow Email to re-render when data changes

* Add invalidateBody function

* Make the linter happy
2021-03-04 11:18:46 +13:00
Maxime Rainville
2c54a3fd2f Merge branch '4.7' into 4 2021-03-01 20:37:04 +13:00
Maxime Rainville
028c4fdaa1 BUG Tweak shortcode parser so it properly parse empty attributes 2021-02-25 15:18:16 +13:00
Maxime Rainville
9ca33950a2
API Add a CREATE_MEMORY_HYDRATED option to DataObject constructor (#9767) 2021-01-21 14:07:06 +13:00
Maxime Rainville
0dd59a1e7b
BUG Reset GridFieldFilterHeader grid state when search is cleared (#9829) 2021-01-21 13:47:40 +13:00
Maxime Rainville
54bdabd203 Merge branch '4.7' into 4 2021-01-20 12:57:01 +13:00
Maxime Rainville
d13d3a1134
Merge pull request #9818 from creative-commoners/pulls/4.7/check-object-for-key
FIX Type checking in objectForKey() to fix postgres bug
2021-01-20 12:41:49 +13:00
Maxime Rainville
17c6f98ba2 BUG Fix PostgreSQL issue in TreeMultiselectField where field would try to filter list by a blank ID 2021-01-20 12:23:09 +13:00
Maxime Rainville
0da15f0f27 Merge branch '4.7' into 4 2021-01-19 15:33:56 +13:00
Maxime Rainville
92af6b3dd5 FIX Update behat toast logic so it works with quotes 2021-01-19 15:16:26 +13:00
Steve Boyd
76ae5bc38a FIX Type checking in objectForKey() to fix postgres bug 2021-01-08 15:25:38 +13:00
William Desportes
c932d7e7fb
Fix the phpdoc blocks 2020-12-21 22:23:23 +01:00
Sam Minnée
a8d121d23f
Merge pull request #9800 from creative-commoners/pulls/4.7/arraylist-value-set
FIX Bug when specifying 0 in ArrayList::offsetSet
2020-12-16 15:40:20 +13:00
Steve Boyd
5be045f9a2 FIX Bug when specifying 0 in ArrayList::offsetSet 2020-12-15 14:50:10 +13:00
Andre Kiste
460715197d
Merge pull request #9190 from open-sausages/pulls/4/test-state
Don't include default value in url grid state
2020-11-18 12:31:50 +13:00
Steve Boyd
6e77d5eada NEW DataObject related objects service 2020-10-29 09:29:26 +13:00
Garion Herman
e89ae93ac9 FIX Harden hasMethod() against invalid values
This method should typehint the incoming value once union types are
available, but for now this ensures that method_exists() is not called
on scalar values, which is unsupported in PHP 8.
2020-10-28 09:34:33 +13:00
wernerkrauss
941df19e88
ENH Improve YamlReader exception message (#9731)
Fixes #9690
2020-10-12 22:38:13 +13:00
Sam Minnée
c5d676fa4e
FIX Avoid test failure on use of narrow-NBSP (#9725)
For whatever reason (different locale version) my local dev env uses
narrow-NBSPs (Unicode 8239) rather than regular NBSP in its localised
strings. This patch makes the tests robust against this difference.

Note that this occurred running the tests in Lando.

Co-authored-by: Robbie Averill <robbie@averill.co.nz>
2020-10-09 10:33:51 +13:00
Garion Herman
198b25c900 FIX Hardcode PasswordValidator config in VersionedMemberAuthenticatorTest 2020-10-06 16:07:24 +13:00