382 Commits

Author SHA1 Message Date
Guy Sartorelli
e46135be0a
NEW Refactor CLI interaction with Silverstripe app (#11353)
- Turn sake into a symfony/console app
- Avoid using HTTPRequest for CLI interaction
- Implement abstract hybrid execution path
2024-09-26 17:16:47 +12:00
Guy Sartorelli
e2e32317d6
API Move various classes to more appropriate namespaces (#11370)
Also rename ViewableData to ModelData ahead of the template layer
lift-and-shift
2024-09-23 14:31:50 +12:00
Steve Boyd
9a92488ad7 DEP Use PHPUnit 11 2024-09-18 13:53:44 +12:00
Guy Sartorelli
68fb4b0cf6
Merge branch '5' into 6
# Conflicts:
#	src/Core/CoreKernel.php
#	src/ORM/FieldType/DBDatetime.php
2024-09-17 18:13:59 +12:00
Guy Sartorelli
6a3659d69d
Various deprecations and a few features (#11365)
* API Deprecate DatabaselessKernel

* ENH Add functionality to ArrayLib

* ENH Add functionality to DBDateTime

* API Deprecate various APIs
2024-09-13 17:18:15 +12:00
Steve Boyd
8ffda9edc0 API Replace Extension subclasses 2024-08-28 17:00:39 +12:00
github-actions
a7a431d366 Merge branch '5' into 6 2024-07-31 00:59:59 +00:00
Guy Sartorelli
9091ecfd3a
ENH Don't use the keyword "self" (#11315) 2024-07-31 12:55:22 +12:00
github-actions
f6af6300b0 Merge branch '5' into 6 2024-07-29 21:19:22 +00:00
github-actions
1c77aa92d0 Merge branch '5.2' into 5 2024-07-29 21:19:20 +00:00
Guy Sartorelli
d9bccaff3d
ENH Don't use keywords self (#11313) 2024-07-29 16:53:22 +12:00
Guy Sartorelli
d540877eed
FIX Use valid values for APCu version (#11304) 2024-07-15 09:26:50 +12:00
Guy Sartorelli
ed321f8ce7
MNT Test with all cache factories in CI 2024-07-12 09:29:47 +12:00
Guy Sartorelli
232173753a
FIX Ensure cache is shared between CLI and webserver 2024-07-09 12:58:13 +12:00
Steve Boyd
98dc238d2a ENH Do not require _config dir or _config.php for modules 2024-07-01 16:32:54 +12:00
github-actions
cbc984eaf7 Merge branch '5' into 6 2024-06-20 03:09:22 +00:00
Guy Sartorelli
dcace43183
Merge branch '5.2' into 5
# Conflicts:
#	src/Core/ClassInfo.php
#	src/ORM/FieldType/DBForeignKey.php
2024-06-20 14:51:48 +12:00
Steve Boyd
620c1b0469 ENH Use class name instead of self 2024-06-18 09:37:39 +12:00
Guy Sartorelli
be6ca2a91d
API Remove references to non-existent installation tool (#11274) 2024-06-13 14:45:58 +12:00
Guy Sartorelli
049e546247
API Deprecate references to installation tool (#11275) 2024-06-12 15:47:12 +12:00
github-actions
4429a4999d Merge branch '5.2' into 5 2024-05-11 14:24:47 +00:00
Guy Sartorelli
a92baeaf6f
FIX Allow double dots in path when not attempting directory traversal (#11219) 2024-05-06 13:15:26 +12:00
github-actions
19ea32ebfa Merge branch '5.2' into 5 2024-04-20 14:23:53 +00:00
Loz Calver
a53301f673 FIX: OutOfBoundsException when recipe-core isn't installed (fixes #11197) 2024-04-15 16:59:59 +01:00
github-actions
39c9e0d31c Merge branch '5.2' into 5 2024-04-03 05:54:37 +00:00
github-actions
97a8da8c7d Merge branch '5.1' into 5.2 2024-04-03 05:54:35 +00:00
Thomas Portelange
cca2f7059b
ENH Update PHPDocs for methods with missing nullable return types (#11187) 2024-04-02 13:33:09 +13:00
Thomas Portelange
492cb800fa
ENH store tableList in cache (#11183) 2024-03-26 12:03:46 +13:00
Guy Sartorelli
25f61141cb
Enhancements required for linkfield migration (#11171)
* ENH Add lightweight test override for Environment::isCli()

* NEW Allow JOIN with SQL UPDATE.
2024-03-20 11:49:57 +13:00
Guy Sartorelli
4f3282bf2a
Merge pull request #11157 from lekoala/patch-46
FIX use composer runtime api
2024-02-28 09:16:25 +13:00
Thomas Portelange
68b79e11ee
missing import 2024-02-26 09:54:18 +01:00
Thomas Portelange
2696922023
update return type 2024-02-26 09:52:48 +01:00
Thomas Portelange
1cf3dde9f1
Update src/Core/Manifest/VersionProvider.php
Co-authored-by: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com>
2024-02-26 09:48:35 +01:00
Thomas Portelange
b53148c034
add deprecation, remove class_exists 2024-02-26 09:23:35 +01:00
Thomas Portelange
e649310f7b
Update src/Core/Manifest/VersionProvider.php
Co-authored-by: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com>
2024-02-26 09:09:45 +01:00
Thomas Portelange
a2486c0859
Update src/Core/Manifest/VersionProvider.php
Co-authored-by: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com>
2024-02-26 09:09:38 +01:00
Thomas Portelange
a196719502
Update src/Core/Manifest/VersionProvider.php
Co-authored-by: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com>
2024-02-26 09:09:31 +01:00
Thomas Portelange
bc09127182
use composer runtime api 2024-02-23 17:06:27 +01:00
Guy Sartorelli
8664d2c4e9
ENH Allow all valid true-like ini values 2024-02-16 13:29:52 +13:00
Guy Sartorelli
7f71695335
NEW Wire up symfony/validator (#11123) 2024-02-02 13:15: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
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
Guy Sartorelli
eb245a1f83
Merge branch '4' into 5.1 2023-11-30 11:51:36 +13:00
Guy Sartorelli
6d903848ab
FIX Don't replace config manifest for nested kernels (#11082) 2023-11-30 11:39:14 +13:00
Sabina Talipova
56511c8618 MNT Remove TODO comments 2023-10-30 13:21:09 +13:00
Guy Sartorelli
0e74e355eb
Merge pull request #10894 from lekoala/patch-43
Ensure cache key only contains valid characters
2023-08-03 19:15:38 +12:00
Thomas Portelange
0e839e12cc
Update src/Core/Manifest/VersionProvider.php
Co-authored-by: Michal Kleiner <mk@011.nz>
2023-08-02 06:55:32 +02:00
Thomas Portelange
b9f63001c5
Update src/Core/Manifest/VersionProvider.php
Co-authored-by: Michal Kleiner <mk@011.nz>
2023-08-02 06:55:16 +02:00
Thomas Portelange
359cb1427a BUG include silverstripe core files into roots 2023-08-02 10:00:33 +12:00
Thomas Portelange
c0cc129f12
remove sprintf 2023-08-01 19:40:34 +02:00