Commit Graph

23862 Commits

Author SHA1 Message Date
Guy Sartorelli
90a57c2aa4
Merge branch '5.1' into 5 2024-01-23 11:58:17 +13:00
github-actions
96241b2db8 Merge branch '4' into 5.1 2024-01-20 14:24:40 +00:00
github-actions
9fdda9eefd Merge branch '4.13' into 4 2024-01-20 14:24:38 +00:00
Guy Sartorelli
b979ce5896
MNT Fix test for required password fields in kitchen sink (#11111) 2024-01-19 13:27:32 +13:00
Guy Sartorelli
357ed7ad7e
ENH Add generic types (#11108)
There are also a few general corrections to PHPDocs that I noticed along
the way (e.g. adding `|null` when the method is returning a null value.

There are some cases where either the return type or the whole PHPDoc
was duplicated from the parent class - in those cases I've simply
removed the duplication.
2024-01-17 17:08:26 +13:00
Guy Sartorelli
583b762217
Merge pull request #11110 from creative-commoners/pulls/5/deprecate-unused-methods
API Deprecate some unused API
2024-01-17 14:13:25 +13:00
Guy Sartorelli
8b427f4e74
API Deprecate some unused API 2024-01-17 14:00:47 +13:00
Sabina Talipova
cc0edf242e
Merge pull request #11099 from creative-commoners/pulls/4.13/confirmedpasswordfield-required
FIX Correctly mark ConfirmedPasswordField children as required
2024-01-17 12:08:31 +13:00
github-actions
56086121a2 Merge branch '5.1' into 5 2024-01-13 14:24:50 +00:00
Sabina Talipova
ff3a6f72df
FIX HTMLEditorField::setRows minimal hieght (#10965) 2024-01-11 15:00:24 +13:00
Guy Sartorelli
524e27f7ac
Merge pull request #11107 from creative-commoners/pulls/5/related-data
FIX Handle polymorphic relationships that use Owner instead of Parent
2024-01-10 11:59:26 +13:00
Steve Boyd
9bfb731bc3 FIX Handle polymorphic relationships that use Owner instead of Parent 2024-01-10 11:43:26 +13:00
Guy Sartorelli
b1a1d4b951
Merge pull request #11100 from creative-commoners/pulls/5/split-summary-by-punctuation
ENH Split sentences by configurable punctuation for summary
2024-01-09 09:01:44 +13:00
Nick
e456de11b0
Fix clobbering of the upload size validation (#10059)
* Fix clobbering of the upload size validation

When the validation is set here like this, it overrides validation which has already been setup with a simple '*' rule for the size based on PHP.

If you've defined in the sites yml config something like

    SilverStripe\Assets\Upload_Validator:
      default_max_file_size:
        '[image]': '2m'
        '*' : '1m'

then it will not be respected.

If you review SilverStripe\Assets\Upload_Validator and check the getAllowedMaxFileSize method, you'll see the sizing will be populated (if it hasn't been done before).

You can see it fail by;
- Setup a new SilverStripe site.
- Set your PHP to allow max post / max upload size of 10mb.
- Add the above config to your sites yml file and flush.
- In the CMS you'll be able to upload a 5MB file, when you shouldn't.

* Test that FileField will use size validation if defined

Couple of tests which prove a fix so the FileField and others will use the default_max_file_size setting

* Fix variable name in last commit

This is what happens when you refactor in the github window.
Fix the variable names. This will get squashed once merged.

* Updates the pr - white space and non deprecated method for byte conversion

Remove extra white space to appease the CS. Use the non deprecated method for memstring2bytes

* White space fixes for the phpcs

White space fixes for the phpcs

* Ensure that "memstring2bytes" can handle if an empty or value with no number is passed in

* DEP Bump assets constraint to ensure that change is also pulled in

---------

Co-authored-by: Guy Sartorelli <guy.sartorelli@silverstripe.com>
2024-01-08 15:49:41 +13:00
Finlay Metcalfe
2487c4085d
ENH Create Requirements::customScriptWithAttributes (#11076)
* ENH Create Requirements::customScriptWithAttributes

* MNT PHP Lint failures corrected

* ENH Refactored attribute handling to avoid API changes, auto lowercase, strong typing

* FIX Updated default value handling for type in customScriptWithAttributes

* DOC Removed white space

* MNT PHP Lint Failures Corrected

* Update src/View/Requirements_Backend.php

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

* Update src/View/Requirements_Backend.php

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

* Update tests/php/View/RequirementsTest.php

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

* FIX Removed extra closing brace in customScriptWithAttributes

* Update src/View/Requirements_Backend.php

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

* Update src/View/Requirements.php

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

* MNT Fixed left over content definition and created tests for uniquenessIDs

* MNT Fixed PHP Lint Error

* MNT Fix PHP Lint Error

* FIX Remove attribute when calling customScript with the same uniquenessID

---------

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
Co-authored-by: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com>
2023-12-22 12:00:33 +13:00
Guy Sartorelli
c003dfd4b1
MNT Run module-standardiser (#11102) 2023-12-21 16:18:42 +13:00
Guy Sartorelli
bf629dfabd
ENH Split sentences by configurable punctuation for summary
Co-authored-by: Lukas Erni <le@kraftausdruck.ch>
2023-12-20 15:08:01 +13:00
Guy Sartorelli
7dc1a7a12b
FIX Correctly mark ConfirmedPasswordField children as required 2023-12-20 12:35:30 +13:00
Maxime Rainville
6c69d32367
Merge pull request #11049 from creative-commoners/pulls/5/gridfield-with-viewabledata
Make GridField components work with ViewableData where possible
2023-12-19 19:55:29 +13:00
Guy Sartorelli
e7775a6133
Merge pull request #11071 from creative-commoners/pulls/5/foreign-key-field-scaffold
ENH Use SearchableDropdownField for autoscaffolded has_one relationships
2023-12-19 10:42:12 +13:00
Steve Boyd
e66c1aec06 ENH Use SearchableDropdownField for autoscaffolded has_one relationships 2023-12-19 10:04:01 +13:00
Guy Sartorelli
c96f37ea93
Merge branch '5.1' into 5 2023-12-18 15:20:02 +13:00
Guy Sartorelli
7073246a37
MNT Add tests for using GridField with arbitrary data
Note that the main tests are added as behat tests in the admin module
2023-12-18 14:20:33 +13:00
Guy Sartorelli
2cafba2bd5
MNT Add new behat function to allow deleting gridfield rows 2023-12-18 12:41:45 +13:00
Guy Sartorelli
3d64eac129
NEW Make most GridField components work with arbitrary data 2023-12-18 12:41:42 +13:00
Guy Sartorelli
ad8cf9902c
Merge pull request #11093 from creative-commoners/pulls/5.1/docblock
MNT Update @methods on class docblocks
2023-12-15 12:38:38 +13:00
Guy Sartorelli
3acd6d3147
Merge pull request #11091 from edwilde/patch-16
Remove unused lines in `findTab()`
2023-12-15 10:36:45 +13:00
Steve Boyd
3311794bd3
Merge pull request #11094 from creative-commoners/pulls/5.1/fix-email-failure-bugs
Fix email failure bugs
2023-12-15 09:27:31 +13:00
Guy Sartorelli
c90320712a
Merge pull request #11057 from creative-commoners/pulls/5/selectorfield
NEW SearchableDropdownField
2023-12-15 09:09:42 +13:00
Guy Sartorelli
dd3a0dba24
FIX Don't break the page if password recover email fails to send 2023-12-15 09:05:18 +13:00
Steve Boyd
23eca53dfb NEW SearchableDropdownField 2023-12-14 15:28:19 +13:00
Guy Sartorelli
446810bc5e
FIX Allow new password to save even if there's an error sending email 2023-12-14 12:47:05 +13:00
Steve Boyd
db69a1f83c MNT Update @methods on class docblocks 2023-12-14 11:04:08 +13:00
Ed Wilde
b6c646ffbe
Also remove the unused $last_idx assignment 2023-12-13 10:42:06 +13:00
Ed Wilde
81541db892
Remove unused line in findTab()
This line doesn't appear to be of any use
2023-12-13 10:28:03 +13:00
Guy Sartorelli
ff38ff1d63
Merge pull request #11073 from creative-commoners/pulls/5/limit-int
API Use correct param types
2023-12-12 10:55:59 +13:00
Guy Sartorelli
c405ed6cf3
NEW Allow a single has_one to manage multiple reciprocal has_many (#11084) 2023-12-12 10:18:25 +13:00
Guy Sartorelli
5838772b19
ENH Explicitly require DataObject for some gridfield components
These components simply cannot work with non-DataObjects. They have
explicit DataObject queries, and allowing arbitrary callbacks for these
components would be a case of diminishing returns.
2023-12-11 12:34:00 +13:00
Guy Sartorelli
b1295af281
NEW Provide an easy way to filter arbitrary ViewableData in gridfields 2023-12-11 12:33:56 +13:00
github-actions
c890d79ea9 Merge branch '5.1' into 5 2023-12-09 14:24:25 +00:00
github-actions
bf45b0c44b Merge branch '4' into 5.1 2023-12-09 14:24:24 +00:00
github-actions
f9a6b7d480 Merge branch '4.13' into 4 2023-12-09 14:24:23 +00:00
Steve Boyd
3fe42b84af API Use correct param types 2023-12-08 16:50:34 +13:00
Guy Sartorelli
6698e5accd
Merge pull request #11085 from kinglozzer/11083-unsaved-relationlist-bug
FIX: UnsavedRelationList first/last to return null if list is empty (fixes #11083)
2023-12-05 09:05:16 +13:00
Loz Calver
40b888eaf3 FIX: UnsavedRelationList::last() sometimes returned an ID instead of an item 2023-12-04 11:44:34 +00:00
Loz Calver
e28af9a5a7 FIX: UnsavedRelationList first/last to return null if list is empty (fixes #11083) 2023-12-04 11:32:08 +00:00
github-actions
809f9e7ae0 Merge branch '5.1' into 5 2023-11-29 22:52:10 +00:00
Guy Sartorelli
eb245a1f83
Merge branch '4' into 5.1 2023-11-30 11:51:36 +13:00
github-actions
30293e67a1 Merge branch '4.13' into 4 2023-11-29 22:40:34 +00:00
Guy Sartorelli
6d903848ab
FIX Don't replace config manifest for nested kernels (#11082) 2023-11-30 11:39:14 +13:00