Commit Graph

73 Commits

Author SHA1 Message Date
Guy Sartorelli dcc6863401
NEW Allow skipping validation on write (#11202) 2024-04-19 10:35:36 +12:00
Sabina Talipova 56511c8618 MNT Remove TODO comments 2023-10-30 13:21:09 +13: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
Guy Sartorelli ae49e134a9
NEW Use custom list for eagerloaded relations (#10869) 2023-08-03 15:33:13 +12:00
Sabina Talipova d24095aba8 FIX Image in summaryfields breaks search 2023-08-03 14:48:55 +12:00
Guy Sartorelli e3a94b9d10
FIX Ensure getters and setters are respected (#10708) 2023-03-01 15:19:07 +13:00
Steve Boyd 77301408d8 MNT Remove legacy upgrader config 2023-01-20 17:05:41 +13:00
Steve Boyd c1a773310d ENH PHP 8.2 support 2022-12-21 14:44:47 +13:00
Steve Boyd ae4d7fa090 API Create orderBy() method to handle raw SQL 2022-12-07 12:25:58 +13:00
Andrew Aitken-Fincham f2de39162d
API Allow dataobject get_one without passing a class
add class validation early in get_one()
2022-08-23 16:25:23 +12:00
Guy Sartorelli 0482444342 MNT Add tests for overriding DataObject via injection 2022-07-07 09:49:25 +12:00
Steve Boyd 511b3bb060 ENH PHP 8.1 compatibility 2022-04-14 13:12:59 +12:00
Lukas 552cf5944d
MNT Fix various typos with codespell (#10177) 2021-12-13 21:05:33 +13:00
Steve Boyd cd076542f4
API Upgrade SapphireTest to work with phpunit 9 (#10028) 2021-10-27 15:39:47 +13:00
Matt Peel f99ba5d716 NEW Add extension point to DataObject->hydrate() 2021-08-25 16:07:02 +12:00
Steve Boyd 8e803bbcfc FIX Parse Enums with dots in their values 2021-07-01 16:00:08 +12:00
Maxime Rainville 9ca33950a2
API Add a CREATE_MEMORY_HYDRATED option to DataObject constructor (#9767) 2021-01-21 14:07:06 +13:00
Sam Minnée b810b7d5c9
API: Allow for user-created objects to have values passed in the constructor (#8591) 2020-08-20 12:28:31 +12:00
Daniel Hensby 080ce157ce
Fix various typos in comments 2020-05-16 10:34:53 +01:00
Michal Kleiner 21129b1624
Use short array syntax across the framework's codebase 2020-05-16 10:34:45 +01:00
Daniel Hensby 237b2d5f74
Convert array delcarations to short array syntax 2020-04-20 18:58:09 +01:00
Andre Kiste 6650d81324 BUG Fix extra blank Group being created when creating a new Group (#9325)
* Fix extra blank Group being created when creating a new Group

* Update tests to reflect expected behavior

* Improved tests
2019-11-27 09:32:33 +13:00
Robbie Averill 592ab6abc1 Merge branch '4.3' into 4.4 2019-09-13 18:11:34 -07:00
Maxime Rainville 591b88a9bc BUG Allow infinite loop when calling DataObject::writeComponent() recursively 2019-09-10 14:15:28 +12:00
Robbie Averill f354e2018d FIX Set minimum test scores and password length for Members while running fixtured DataObject tests 2019-08-15 15:23:11 +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
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
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
Johannes Hammersen e1190e33d2 Fix PDOConnector GeneratedID return type 2019-03-21 09:26:14 +01:00
Maxime Rainville 11b9429c34 Merge branch '4.3' into 4 2019-02-27 12:14:51 +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 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
Robbie Averill 64c2938c96 Merge branch '4.3' into 4 2018-11-06 11:05:22 +01: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
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
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
Daniel Hensby 9006daf20b
Cleaning up PR and adding tests 2018-02-28 13:31:56 +00:00