Commit Graph

1202 Commits

Author SHA1 Message Date
Steve Boyd
00cade0d38 Merge branch '5.0' into 5 2023-08-22 15:32:50 +12:00
Steve Boyd
ee0468e5b7 Merge branch '4.13' into 5.0 2023-08-22 15:32:38 +12:00
Guy Sartorelli
c7cd26299a
Fix ArrayList canFilterBy to work with ArrayData (#10915) 2023-08-15 11:31:20 +12:00
Thomas Portelange
637859a1f4
Update tests/php/ORM/DBCompositeTest.php
Co-authored-by: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com>
2023-08-14 09:26:33 +02:00
Thomas Portelange
0d4231abb8
comment test for ss4 2023-08-11 13:24:01 +02:00
Thomas
d621d00eea
DBComposite::writeToManipulation() is never called 2023-08-11 09:56:37 +12:00
github-actions
613dc1620c Merge branch '5.0' into 5 2023-08-09 23:47:19 +00:00
Guy Sartorelli
15e4cbeb7a
Merge branch '4' into 5.0 2023-08-10 11:46:33 +12:00
Sabina Talipova
597d97bf0a
Merge pull request #10907 from creative-commoners/pulls/4.13/new-fields-validator
NEW Add FieldsValidator to ensure fields get validated
2023-08-10 10:50:57 +12:00
Loz Calver
8da4aa8637 FIX: Regression with include argument (fixes #10911) 2023-08-09 15:20:54 +01:00
Guy Sartorelli
fd2b76d38b
Merge pull request #10904 from creative-commoners/pulls/5/more-placeholders
ENH Do not use placeholders by default for foreignIDFilter()
2023-08-09 11:58:26 +12:00
Steve Boyd
358cbc9ee5 ENH Do not use placeholders by default for foreignIDFilter() 2023-08-09 10:46:08 +12:00
Guy Sartorelli
e29be44373
MNT Don't change auto-increment for non mysql database in test (#10906) 2023-08-08 14:43:25 +12:00
Sabina Talipova
037168a4fe FIX Multi HTML entities in shortcodes 2023-08-08 13:08:19 +12:00
Guy Sartorelli
5a52484d88
NEW Add FieldsValidator to ensure fields get validated 2023-08-08 13:02:27 +12:00
Guy Sartorelli
3628cec1f3
FIX Empty relations don't have extra DB calls with eager-loading (#10886) 2023-08-04 12:02:42 +12:00
Guy Sartorelli
ae49e134a9
NEW Use custom list for eagerloaded relations (#10869) 2023-08-03 15:33:13 +12:00
Guy Sartorelli
9e5411e905
Merge pull request #10885 from creative-commoners/pulls/4.13/search-in-non-existing-fields
FIX Image in summaryfields breaks search
2023-08-03 15:11:49 +12:00
Sabina Talipova
d24095aba8 FIX Image in summaryfields breaks search 2023-08-03 14:48:55 +12:00
Thomas Portelange
359cb1427a BUG include silverstripe core files into roots 2023-08-02 10:00:33 +12:00
Guy Sartorelli
158d51a0a5
Merge pull request #10861 from creative-commoners/pulls/5/no-placeholders
ENH Do not use placeholders for int ID filters
2023-07-25 14:54:07 +12:00
Steve Boyd
672396880d ENH Do not use placeholders for int ID filters 2023-07-25 14:31:39 +12:00
github-actions
4d8d5c04a5 Merge branch '5.0' into 5 2023-07-20 21:38:32 +00:00
github-actions
d8b69c36d9 Merge branch '4' into 5.0 2023-07-20 21:38:31 +00:00
Guy Sartorelli
642321db61
FIX Trigger eagerloading for first() and last() (#10875) 2023-07-20 16:37:03 +12:00
Steve Boyd
7daa3fdb08 FIX Short-array syntax for Enum 2023-07-20 16:06:01 +12:00
Guy Sartorelli
ed4c34b9d9
MNT Re-implement static test data for main eagerloading test 2023-07-17 12:03:11 +12:00
Guy Sartorelli
acad946b74
MNT Add missing tests for eagerloaded DataList interactions
Add tests for:
- filtered, limited, and sorted DataLists with eagerloaded relations
- iterating through the list multiple times
- eagerLoad method can be called anywhere in a query chain
- eager loaded relation lists can be correctly empty without throwing
  exceptions
- repeating relations to be eagerloaded in various permutations doesn't
  cause issues
- eagerloading doesn't negatively impact chunkedFetch functionality

squash
2023-07-17 12:03:11 +12:00
Guy Sartorelli
d0ca9cfdde
FIX many_many extraFields and join records weren't in eagerloading 2023-07-17 12:03:11 +12:00
Guy Sartorelli
9bed2a3d98
MNT Refactor eagerloading tests into their own class 2023-07-17 12:03:09 +12:00
Steve Boyd
771844335b Merge branch '5.0' into 5 2023-07-17 11:52:07 +12:00
Steve Boyd
3aa6d590a1 MNT Fix unit test 2023-07-11 10:25:16 +12:00
Guy Sartorelli
82e96068d2
Merge branch '5.0' into 5 2023-07-10 14:30:07 +12:00
Guy Sartorelli
5854ce6190
Merge branch '4.13' into 5.0 2023-07-10 14:29:03 +12:00
Dylan Wagstaff
8c3ba81052
FIX PHP 8.1 support in MySQLiConnector::query errors (#10570)
* FIX PHP 8.1 support in MySQLiConnector::query errors

The default error reporting mode in PHP 8.1 has changed from using
errors reported on the connection handle to throwing
mysqli_sql_exception. query() makes no allowance for this, and
functions up the call stack expect to catch
Silverstripe\ORM\Connect\DatabaseException instead - resulting in the
MySQLi exception going all the way up to halt the system.

We can use a try, catch, and finally to retain backwards compatibility,
no matter which setting (e.g. PHP version default) someone has enabled.

* Move MySQLConnector test skip call into setUp()

As review feedback; marking the test as skipped in a private function
obfuscated where the call was happening and made it harder to skimread
the tests. Moving this into a setUp function makes it obvious the check
is run before each test case, and skipped if necessary.
2023-07-07 15:56:31 +12:00
Guy Sartorelli
612f7e734f
FIX Allow repeated iterations of predicated query result (#10857) 2023-07-05 16:25:58 +12:00
Andrew Paxley
34019426dd NEW add OnlyTheseMembers Inherited Permission type 2023-07-05 16:22:17 +12:00
Maxime Rainville
110c9135e0
MNT Tweak the Eagerload test to not worry about sort order (#10848)
* MNT Tweak the Eagerload test to not worry about sort order
* MNT Use array keys for EagerLoad test DataProvider
2023-07-03 16:32:03 +12:00
Guy Sartorelli
0c40cc9b3d
Merge branch '5.0' into 5 2023-06-22 11:19:59 +12:00
Guy Sartorelli
fb7d2256f1
Merge branch '4.13' into 5.0 2023-06-22 11:18:46 +12:00
Sabina Talipova
ad9df97626 FIX LastPage method returns true if TotalPages equals 0 2023-06-22 10:50:41 +12:00
Guy Sartorelli
d27bf3d85c
Merge pull request #10798 from beerbohmdo/fix/empty-template-arguments
FIX Passing 0 as first method argument breaks template
2023-06-15 11:04:08 +12:00
Steve Boyd
dbefcef440 Merge branch '5.0' into 5 2023-06-14 11:10:44 +12:00
Steve Boyd
f4e0c768bd FIX Handle __TRAIT__ in i18nTextCollector 2023-06-13 10:11:12 +12:00
dominik
face94371e FIX Passing 0 as first argument breaks template
Replace !empty with explicit string test
Added test for falseish first parameter arguments
2023-06-09 08:55:20 +02:00
Guy Sartorelli
fd57f06755
Merge pull request #10804 from creative-commoners/pulls/5/unit-test-buildtask
MNT Add BuildTaskTest
2023-06-09 10:26:55 +12:00
Steve Boyd
ce01137e56 MNT Add BuildTaskTest 2023-06-08 12:32:47 +12:00
Steve Boyd
246735101a NEW ORM eager loading 2023-06-07 14:59:02 +12:00
Steve Boyd
f54bbc50f0 Merge branch '5.0' into 5 2023-05-22 12:46:02 +12:00
Steve Boyd
696fe79dd6 FIX Use OR conjuctive in filterAny aggregate queries 2023-05-17 11:55:56 +12:00