Commit Graph

2638 Commits

Author SHA1 Message Date
Steve Boyd
b4f330d734 API Remove configurability of attributes 2023-03-21 16:38:05 +13:00
zemiacsik
d60af9d16e
FIX property_exists() parameters mixup
ensure that property parameter is a string
2023-03-14 08:42:22 +01:00
zemiacsik
5b8d61b55b
FIX property_exists() parameters mixup
property_exists() has first parameter "object_or_class" and second is a property to check
2023-03-13 13:51:48 +01:00
Guy Sartorelli
a4929a171e
Merge pull request #10697 from creative-commoners/pulls/4/nicer-deprecations
ENH Improve deprecation logging
2023-03-09 14:39:51 +13:00
Steve Boyd
6d239d0b88 API Remove deprecated code 2023-03-06 14:06:02 +13:00
Guy Sartorelli
046befc4ba
ENH Improve deprecation logging 2023-03-06 13:25:44 +13:00
Guy Sartorelli
128b327c6d
API Add method to check if env var is set 2023-03-06 11:49:22 +13:00
Steve Boyd
5dd6e3f8f1 MNT Remove old deprecation warnings 2023-03-03 10:34:10 +13:00
Steve Boyd
f6d8d27c89 Merge branch '4' into 5.0 2023-03-02 16:02:34 +13:00
Steve Boyd
8b148bf293 Merge branch '4.12' into 4 2023-03-02 15:37:03 +13:00
Guy Sartorelli
66561ccb49
FIX Correctly deprecation Sources.module_priority (#10711)
This config was deprecated back in #7154 and hasn't been used since
2023-03-02 11:05:35 +13:00
Maxime Rainville
403f924d22
BUG Update RelatedDataService to properly escape ClassName in Polymorphic relations (#10713) 2023-03-02 09:56:40 +13:00
Florian Thoma
6585d499f5 FIX Convert slashes in paths when getting list of classes for file/folder
This is to support the mechanism working on all operating systems where Windows may produce a mix of forward and backward slashes in some paths.
For working with the files it may not be a problem, but for exact string comparison the path delimiters need to be unified.
2023-03-01 20:32:19 +13:00
Guy Sartorelli
e3a94b9d10
FIX Ensure getters and setters are respected (#10708) 2023-03-01 15:19:07 +13:00
Guy Sartorelli
277e97a84f
Merge pull request #10709 from creative-commoners/pulls/4/deprecated-args
ENH Updated deprecation warning message
2023-03-01 14:19:18 +13:00
Guy Sartorelli
58ca426f11
Merge branch '4.12' into 4 2023-03-01 12:54:30 +13:00
Sabina Talipova
05674adf51 ENH Updated deprecation warning message 2023-03-01 12:39:42 +13:00
Guy Sartorelli
5295ba6c16
API Throw deprecation warnings for bad configuration (#10702) 2023-03-01 11:36:08 +13:00
Guy Sartorelli
6669d54f59
FIX Wrap deprecated config with no replacement (#10704) 2023-02-27 18:13:31 +13:00
Guy Sartorelli
652281507f
FIX Correctly identify deprecated API in withNoReplacement (#10706) 2023-02-27 15:25:27 +13:00
Chris Penny
c82d11ef70
Add isFlushed() to Kernel interface
Also add explicit return type
2023-02-23 11:14:57 +13:00
Guy Sartorelli
e962608918
Merge pull request #10569 from kinglozzer/formfield-validation-extensions
NEW: Add extension hook for field-specific validation
2023-02-23 09:47:40 +13:00
Steve Boyd
0075bf6e49 NEW Access dynamic data inside ViewableData 2023-02-22 09:40:27 +13:00
Loz Calver
97f7be502f NEW: Add extension hook for field-specific validation 2023-02-20 10:24:41 +00:00
Michal Kleiner
725497a485 MNT Use null safe operator and default to 1 page 2023-02-20 22:40:16 +13:00
Steve Boyd
e455aa5c5e FIX Handle null returns in GridFieldDetailForm_ItemRequest::getNumPages() 2023-02-20 14:37:48 +13:00
Guy Sartorelli
ab566b0a15
API Add new deprecation notices. (#10691)
These are removed in CMS 5.
2023-02-15 13:26:36 +13:00
Florian Thoma
54fc4ee9d2
fix directory separator in i18nTextCollector on Windows (#10681)
* fix directory separator in i18nTextCollector for Windows

* fix typo
2023-02-09 19:09:48 +13:00
Sabina Talipova
1f7adab62e
Merge pull request #10677 from creative-commoners/pulls/4/deprecate-diff
API Deprecate Diff in favour of CMS5's HtmlDiff
2023-02-08 16:36:58 +13:00
Guy Sartorelli
9a5ccdba51
ENH Protect against possible unexpected values 2023-02-08 16:18:13 +13:00
Guy Sartorelli
557421a245
MNT Fix linting issue 2023-02-08 16:18:00 +13:00
Guy Sartorelli
603723e8f3
API Rename Diff to HtmlDiff
This class doesn't diff anything other than HTML, really. For anything
else, SebastianBergmann\Diff\Differ should be used directly.
2023-02-08 14:59:34 +13:00
Guy Sartorelli
99dc6df38a
API Replace thirdparty difflib with maintained lib 2023-02-08 14:59:33 +13:00
Guy Sartorelli
0ff7623230
Merge pull request #10643 from creative-commoners/pulls/5/replace-simpletest
DEP Replace thirdparty simpletest with symfony domcrawler
2023-02-08 12:15:57 +13:00
Guy Sartorelli
3a14aafc7f
API Deprecate Diff in favour of CMS5's HtmlDiff 2023-02-08 11:15:28 +13:00
Sabina Talipova
9d13f35040 MNT Update strong typization, tests cases
Co-authored-by: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com>
2023-02-08 10:59:27 +13:00
Sabina Talipova
5236b0a9df
Merge pull request #10666 from creative-commoners/pulls/5/security-extensions
NEW migrate functionality from security-extensions module
2023-02-07 13:50:56 +13:00
Guy Sartorelli
fecb7ba4d8
NEW Add sudo mode service 2023-02-07 13:36:42 +13:00
Guy Sartorelli
8ddedb038e
NEW Allow admins to require password reset for members
This came from silverstripe/silverstripe-security-extensions
2023-02-07 13:36:21 +13:00
Steve Boyd
4e9c74243d API Deprecate code 2023-02-07 11:56:04 +13:00
Steve Boyd
a74e9d3ecd Merge branch '4' into 5 2023-02-03 10:14:36 +13:00
Steve Boyd
23efed1802 Merge branch '4.12' into 4 2023-02-02 16:20:00 +13:00
Guy Sartorelli
7c20ade548 DEP Replace thirdparty simpletest with symfony domcrawler 2023-02-02 13:31:45 +13:00
Guy Sartorelli
738ca487ac
FIX Allow public extension getter methods to work (#10676)
Accidentally broke this in #10670
2023-02-01 16:05:54 +13:00
Guy Sartorelli
826028082b
FIX Sort without specifying a table name (#10675)
Using a table name in sort() is not allowed in CMS 5. We could use
orderBy() here but member is the table it will sort on by default anyway
so there's no need.

Also added unit tests, which should have caught this ages ago.
2023-02-01 13:52:13 +13:00
Guy Sartorelli
2274b3e765
Merge pull request #10670 from creative-commoners/pulls/5/no-private-viewabledata
FIX Don't try to access private properties/methods
2023-01-31 15:50:35 +13:00
Guy Sartorelli
14a449feaa
FIX Don't try to access private properties/methods 2023-01-31 14:59:17 +13:00
Guy Sartorelli
dca4e0bcb8
FIX Remove unused action from allowed_actions (#10672)
This action was used in CMS 3, but has since been replaced with
/Security/lostpassword/passwordsent which is a separate set of actions.
2023-01-31 13:59:12 +13:00
Thomas Portelange
3e5d99dedc
Prevent backslash in class name
since the default code is using get_called_class, you can end up with \ in the class name which is an escape character for css selectors
this update convert for example

even valCMS_ACCESS_SilverStripe\VersionedAdmin\ArchiveAdmin
to
even valCMS_ACCESS_SilverStripe-VersionedAdmin-ArchiveAdmin

ArchiveAdmin class should probably implement     private static $required_permission_codes = 'CMS_ACCESS_ArchiveAdmin '; also
2023-01-30 10:26:22 +01:00
Maxime Rainville
d1e0e1e305 ENH Make limit method return no results when zero is provided 2023-01-27 10:00:41 +13:00
Maxime Rainville
944722f34f API Removed #[\ReturnTypeWillChange] annotations 2023-01-26 18:10:05 +13:00
Steve Boyd
ec4a8b88e5 API Allow array style email addresses 2023-01-26 14:40:13 +13:00
Steve Boyd
77301408d8 MNT Remove legacy upgrader config 2023-01-20 17:05:41 +13:00
Guy Sartorelli
b784e243de
Merge pull request #10538 from xini/feature-5-trailing-slash-config-and-redirect
SS5: add trailing slash config and redirect
2023-01-20 15:24:45 +13:00
Florian Thoma
fbcf7dc3e7
API Normalise trailing slashes for all paths
NOTE: There will be additional related PRs required for at least
silverstripe/cms and silverstripe/admin.

Co-authored-by: Guy Sartorelli <guy.sartorelli@silverstripe.com>
2023-01-20 10:31:14 +13:00
Maxime Rainville
b6b0bcea9f Merge branch '4' into 5 2023-01-18 22:16:45 +13:00
Maxime Rainville
a65d470e93
Merge pull request #10647 from creative-commoners/pulls/5/dom-crawler
ENH Use masterminds/html5 for HTMLValue
2023-01-18 11:38:07 +13:00
Steve Boyd
d7ddb00254 ENH Use masterminds/html5 for HTMLValue 2023-01-18 10:58:53 +13:00
Steve Boyd
1a59bf50d1 ENH Remove unused Translatable code 2023-01-17 14:42:40 +13:00
Steve Boyd
b973c88648 API Deprecate HTML4Value 2023-01-16 15:28:23 +13:00
Mojmir Fendek
2c105cffc9
ENH: saveInto() new extension points. (#10636)
* ENH: saveInto() new extension points.
2023-01-13 09:43:22 +13:00
Sabina Talipova
6d4542561b
BUG Check is_callable parent methods before invoke (#10637) 2023-01-12 09:37:48 +13:00
Florian Thoma
bb8e3b8386
fix: optional return value for paginator state
`$state->getData()->getData('GridFieldPaginator')' (line 598) returns null by default.
2023-01-02 15:32:16 +11:00
Guy Sartorelli
5bf6835b3e
Merge pull request #10614 from creative-commoners/pulls/5/php82
ENH PHP 8.2 support
2022-12-21 15:39:32 +13:00
Steve Boyd
c1a773310d ENH PHP 8.2 support 2022-12-21 14:44:47 +13:00
Shiva Kerdel
4a1eb0c158
ISSUE-10615: Respect SS_BASE_URL scheme in CLI environment.
Additionally set _SERVER variables for HTTPS and SSL to respect SS_BASE_URL scheme when executing builds and tasks through CLI.
This should solve base tags not being provided with the correct HTTP scheme. This is important to resolve mixed content issues and insecure requests.
2022-12-20 11:13:02 +13:00
Guy Sartorelli
0d662ba95f
Merge branch '4.12' into 4 2022-12-19 01:38:09 +00:00
Guy Sartorelli
b14de847a5
API Make the public directory mandatory (#10617) 2022-12-14 16:08:47 +13:00
Guy Sartorelli
fa75a36267
Merge branch '4' into 5 2022-12-14 15:34:44 +13:00
Steve Boyd
700288d5ca FIX Cast absoluteUrl() argument to string 2022-12-14 11:24:42 +13:00
Steve Boyd
55f8fce12b MNT Linting 2022-12-08 17:12:32 +13:00
Sabina Talipova
53c0147f11
API Remove deprecated code (#10594) 2022-12-08 10:44:47 +13:00
Steve Boyd
ae4d7fa090 API Create orderBy() method to handle raw SQL 2022-12-07 12:25:58 +13:00
Sabina Talipova
4e1b99b8c7
Merge pull request #10588 from creative-commoners/pulls/4/stop-using-depr
API Stop using deprecated API
2022-12-05 16:35:09 +13:00
Steve Boyd
7860e461ed API Remove deprecated CIConfig functionality 2022-11-30 18:09:06 +13:00
Guy Sartorelli
8bb712a461
Merge branch '4.11' into 4.12-release 2022-11-30 10:54:02 +13:00
Michal Kleiner
b107622400
FIX Improve rounding logic for storing of long decimal numbers (#10593)
Co-authored-by: Michal Kleiner <michal.kleiner@cub3.com>
2022-11-29 15:07:56 +13:00
Steve Boyd
b5533e4680 API Stop using deprecated API 2022-11-28 19:16:31 +13:00
Michal Kleiner
da06a2d0cf
Merge pull request #10577 from creative-commoners/pulls/4/textcollector-class-notation 2022-11-25 10:27:59 +13:00
Will Rossiter
1354edf054
fix misleading error message with test class 2022-11-25 09:13:08 +13:00
Chris Penny
31d5aef520 Bugfix: SSViewer check object exists before calling prop or method 2022-11-24 13:18:56 +13:00
Steve Boyd
20582936d8 Merge branch '4.12' into 4 2022-11-23 16:42:25 +13:00
Sabina Talipova
a52c7795c7 Merge branch '4' into 5 2022-11-22 11:41:53 +13:00
Guy Sartorelli
8e16b57646
Merge branch '4' into 5 2022-11-21 18:13:01 +13:00
Steve Boyd
cb76f312a4 Merge branch '4.11' into 4.12-release 2022-11-21 13:44:23 +13:00
Steve Boyd
dc98cad48a Merge branch '4.10' into 4.11 2022-11-21 13:43:59 +13:00
Steve Boyd
fe13856769 [CVE-2022-37429] Sanitise XSS 2022-11-21 13:06:40 +13:00
Guy Sartorelli
17f1c7ceed
Merge pull request #10585 from creative-commoners/pulls/4.11/cve-2022-37430
Sanitise mixed case javascript
2022-11-21 13:03:30 +13:00
Guy Sartorelli
e5b81109de
Merge pull request #10584 from creative-commoners/pulls/4.11/cve-2022-38462
Don't allow CRLF in header values
2022-11-21 13:02:25 +13:00
Steve Boyd
4308a93cc8 [CVE-2022-38148] Validate SortColumn exists 2022-11-21 13:01:32 +13:00
Guy Sartorelli
b17b29eea1
Merge pull request #10583 from creative-commoners/pulls/4.11/cve-2022-38724-embed-shortcode
Restrict embed shortcode attributes
2022-11-21 13:01:23 +13:00
Sabina Talipova
ad116c63e6
Merge pull request #10565 from creative-commoners/pulls/4/stop-depr
API Stop using deprecated API
2022-11-16 14:26:18 +13:00
Steve Boyd
137ebcebec API Stop using deprecated API 2022-11-15 18:20:54 +13:00
Daniel Hensby
c49abf0fcc
Merge remote-tracking branch 'upstream/4.11' into 4.12 2022-11-11 13:25:54 +00:00
Guy Sartorelli
521c8179b1
ENH Correctly parse SomeClass::class syntax in textcollection 2022-11-11 11:37:53 +13:00
Lee Bradley
78b661dcf6
Prevent infinite loop when getting table name for ComponentID
If the field isn't in the first 2 classes then would just continue to loop
Fix means it will continue going to parent classes

Can be seen in the UsedOnTable in `admin` module if you have injected a new `Image` class that extends the built in one
2022-11-10 14:00:29 +00:00
Guy Sartorelli
ed63beeeee
Merge branch '4.11' into 4 2022-11-09 10:53:09 +13:00
Loz Calver
7f8f5afc91 Ensure forms/fields overridden by onBeforeRender() can override templates 2022-11-02 11:57:57 +00:00
Loz Calver
e2cb683f14 FIX: Stop FormField onBeforeRenderHolder extension result being overridden 2022-11-02 10:06:23 +00:00
Loz Calver
c925fae180 NEW: Add onBeforeRender extension hook to Form 2022-11-02 10:05:02 +00:00
Steve Boyd
9091d64652 API Deprecate Member::create_new_password() 2022-11-02 10:08:27 +13:00
Steve Boyd
b1dc861aac NEW Record deprecated config 2022-10-31 19:00:59 +13:00
Steve Boyd
a3c1cb0ddf
ENH Set PasswordEncryption on default admin 2022-10-27 13:57:27 +13:00
Guy Sartorelli
168ca00555
[CVE-2022-38724] Restrict embed shortcode attributes 2022-10-26 09:31:12 +13:00
Michal Kleiner
e11216d8ea
Merge pull request #10558 from creative-commoners/pulls/5/broken-builds 2022-10-21 18:46:41 +13:00
Steve Boyd
df1d4a4b9a ENH Move email to data conversion to protected method 2022-10-21 15:54:06 +13:00
Steve Boyd
6e9d3ab632 Merge branch '4' into 5 2022-10-21 12:00:39 +13:00
Steve Boyd
59b980edd7 Merge branch '4.11' into 4 2022-10-21 11:46:39 +13:00
Steve Boyd
897f9906f9 FIX Handle calling Deprecation::notice() before manifests are available 2022-10-21 10:08:31 +13:00
Sabina Talipova
3601b7ab8b
DEP Upgrade installer dependencies (#10534) 2022-10-21 09:59:34 +13:00
Steve Boyd
bd2eb15c72 FIX Ensure Deprecation works with 1.x branches 2022-10-20 13:14:58 +13:00
Steve Boyd
e3a6cad8a8 FIX Allow passing objects to InjectionCreator::create()
Co-authored-by: Nate Devereux <nate@daveclark.co.nz>
2022-10-19 18:04:48 +13:00
Guy Sartorelli
919cfcf435
Merge pull request #10494 from creative-commoners/pulls/5/symfony-mailer
NEW Migrate from swiftmailer/swiftmailer to symfony/mailer
2022-10-19 15:52:31 +13:00
Steve Boyd
2e85674ccc NEW Migrate from swiftmailer/swiftmailer to symfony/mailer 2022-10-19 15:16:14 +13:00
Steve Boyd
a57c7315a2 API Strongly-type action method signatures 2022-10-17 17:58:20 +13:00
Phillip King
c4b3d5304d Update tinymce links in comments 2022-10-14 16:11:58 +13:00
Steve Boyd
9c453abf89 API Update deprecations 2022-10-13 14:49:15 +13:00
Steve Boyd
33b6a00f49 ENH Update deprecation messages 2022-10-13 14:48:40 +13:00
Steve Boyd
e6aa183eb4 API Update deprecations for SapphireTest and FunctionalTest 2022-10-13 14:05:49 +13:00
Steve Boyd
2991901660 ENH Update deprecation messages 2022-10-13 14:05:49 +13:00
Steve Boyd
7b87926428 ENH Update deprecation messages 2022-10-13 14:05:49 +13:00
Steve Boyd
9f541b9a04 MNT Remove deprecation from private method 2022-10-13 14:05:49 +13:00
Steve Boyd
cc49036616 ENH Standardise deprecation messages 2022-10-13 14:05:49 +13:00
Steve Boyd
0852f504fb API Update deprecations for SapphireTest and FunctionalTest 2022-10-13 14:05:49 +13:00
Steve Boyd
1ee0aff1d1 FIX Prevent infinite loops in Deprecation::notice() 2022-10-13 13:37:29 +13:00
Steve Boyd
83a09daa3a Merge branch '4' into 5 2022-10-07 14:45:05 +13:00
Steve Boyd
906cd0e76d
API Deprecate render() (#10527) 2022-10-07 14:44:02 +13:00
Guy Sartorelli
8419984b36
Merge pull request #10517 from creative-commoners/pulls/4/deprecate-swiftmailer
API Deprecate swiftmailer
2022-10-07 09:37:11 +13:00
Steve Boyd
96a931d24f API Deprecate swiftmailer 2022-10-06 09:52:06 +13:00
Sabina Talipova
721b3cb597
Merge pull request #10508 from creative-commoners/pulls/5/tinymce6
FIX Update config to support tinymce6
Nice job!
2022-09-30 11:05:48 +13:00
Guy Sartorelli
ef8a02dfdc
FIX Update config to support tinymce6 2022-09-30 10:40:52 +13:00
Christian Bünte
e24fb3f86c
Fix i18nTextCollector produces corrupt output / namespaces when running under PHP8.0 (#10228)
* FIX i18nTextCollector produces corrupt output / namespaces when running under PHP8.0
2022-09-29 13:40:40 +13:00
Guy Sartorelli
5e16b29699
Merge branch '4' into 5 2022-09-29 09:43:31 +13:00
Guy Sartorelli
421864d111
Merge branch '4.11' into 4 2022-09-29 09:41:06 +13:00
Thomas Portelange
54892fa267
request may not have a session
see https://github.com/silverstripe/silverstripe-framework/pull/10512
2022-09-28 10:44:13 +02:00
Guy Sartorelli
4a598ded51
FIX Allow removing named extensions in yaml config 2022-09-27 13:15:28 +13:00
Bram de Leeuw
f78c3ee5bb
Member updateName extension hook
Allow updating the Member name from an extension
2022-09-26 16:57:39 +02:00
Guy Sartorelli
433926fc11
API Remove deprecated tinymce generator class 2022-09-19 16:21:09 +12:00
Steve Boyd
fc78763d20
Merge pull request #10497 from creative-commoners/pulls/5/rescue-master-template-enhancements
Rescue master branch PRs: Template enhancements
2022-09-15 16:55:18 +12:00
Guy Sartorelli
e140c3786c
FIX Ensure consistent behaviour with repeat iterations 2022-09-15 16:22:48 +12:00
Guy Sartorelli
62ee63706f
FIX PHP 8.1 compatability for iterators.
Setting a proper return type for these will be done in a separate PR
2022-09-15 13:29:41 +12:00
Guy Sartorelli
a76fa32a39
API Remove unnecessary getGenerator() method.
`getIterator()` now returns a generator by default.
2022-09-15 13:29:29 +12:00
Guy Sartorelli
bf331072df
FIX Don't try to call count() on an iterator 2022-09-15 13:29:29 +12:00
Sam Minnee
81beddc161
Add deprecated method to make CMS tests work 2022-09-15 13:29:29 +12:00
Sam Minnee
9eb9e13071
FIX: Re-set finalisedQuery to allow recreation of iterator. 2022-09-15 13:29:29 +12:00
Sam Minnee
9c7ecb1f79
Further work on Loz’ solution 2022-09-15 13:29:29 +12:00
Loz Calver
850482138b
Proposed solution for caching template generator counts 2022-09-15 13:29:29 +12:00
Loz Calver
8e0e797b40
Fix code style 2022-09-15 13:29:27 +12:00
Sam Minnee
6ef5785fc5
FIX: pre-cache loop content within SSViewer.
SSViewer iterates on Iterators that it receives twice: first to get the
total number of items, then to actually render each item.

This necessitates a rewind. In order to make more use of generators,
which are not rewindable, I’d like to remove the need for a rewind.

I’ve done this by caching the content of the iterator as an array
within SSViewer_Scope.

Although this means a bit of memory usage, there are no cases in which
code will get to this point without iterating on all items, which would
use the memory anyway. It would only create onerous impacts in cases
where you are iterating on very long iterators, which would mean you’re
rendering a very large page anyway, and probably have other performance
issues.
2022-09-15 13:29:00 +12:00
Loz Calver
1b8f601023
NEW: Make DataList::getIterator a generator 2022-09-15 13:29:00 +12:00
Sam Minnee
77c7552c3f
NEW: ORM’ Query is a generator-based IteratorAggregate
API: Query no longer has iterator methods current(), first(), rewind(), next()

Using generators reduces the amount of boilerplate needed for this
code.

Turning it into an IteratorAggregate means that the iterator can be
re-created for each subsequent foreach call. This means that the
rewind() and seek() functionality can be discarded.
2022-09-15 13:28:56 +12:00
Sam Minnee
d8735633a7
FIX: Don’t call PaginatedList::getIterator() directly.
It’s best for foreach() to call this for us.
2022-09-15 13:28:20 +12:00
Sam Minnee
1efe2b46ff
FIX: Fix PaginatedList::toArray()
It wasn’t respecting pagination.
2022-09-15 13:28:20 +12:00
Sam Minnee
6c136c9cf2
NEW: Iterate ArrayList via a generator
Using a generator here means that we don’t need to prepare a duplicate
array in-memory before iterating.
2022-09-15 13:28:20 +12:00
Sam Minnee
2ead3746d6
Replace Map_Iterator with a generator.
Generators (PHP 5.5+) make this kind of code structure much easier to
build.
2022-09-15 13:28:20 +12:00
Guy Sartorelli
03b929dd33
API Remove support for PDO (#10499) 2022-09-15 13:13:48 +12:00
Steve Boyd
5111b56ac9 ENH Add PHP 8.1 safe null-coalescing operators to peg file 2022-09-15 12:59:05 +12:00
Steve Boyd
a2028a2817 FIX Pass PSR6 caches to ChainAdapter 2022-09-13 16:44:07 +12:00
Guy Sartorelli
a605093656
Merge branch '4' into 5 2022-09-09 16:48:20 +12:00
Guy Sartorelli
c4eadcd074
Merge branch '4.11' into 4 2022-09-09 16:47:49 +12:00
Guy Sartorelli
5b2820e8ac
MNT Fix unit tests 2022-09-09 13:38:55 +12:00
Loz Calver
47337782a2
API: <% loop %> and <% with %> only ever create one new scope level 2022-09-09 11:23:38 +12:00
Loz Calver
3a6c48cddb
FIX: template parser erroring on strings partially matching true/false/null 2022-09-09 11:16:58 +12:00
Loz Calver
d6e8229352
FIX: Fix type preservation in <% include %> arguments 2022-09-09 11:16:55 +12:00
Loz Calver
4339e4d02c
NEW: Add support for native nulls as template lookup arguments 2022-09-09 11:15:09 +12:00
Loz Calver
4cda967eae
API: Preserve variable types in template lookup args 2022-09-09 11:11:30 +12:00
Steve Boyd
a87a657367 API Update translation to use symfony 6 2022-09-08 11:52:34 +12:00
Steve Boyd
c9bc01473c API Update caching to use symfony 6 2022-09-07 16:08:54 +12:00
Guy Sartorelli
d3c28579b7
[CVE-2022-38462] Don't allow CRLF in header values 2022-09-07 11:22:07 +12:00
Guy Sartorelli
06b13e0fa6
Revert "Merge pull request #10450 from creative-commoners/pulls/5/rescue-master-generators" (#10483)
This reverts commit 9edf3a5ca6, reversing
changes made to 934fafd29d.
2022-09-02 10:58:37 +12:00
Guy Sartorelli
1bf86cf39f
API Revert shorten auto-generated table names (#10482)
* Revert "BUG Fix table name test"

This reverts commit b36a01a8fd.

* Revert "ENH shorten auto-generated table names"

This reverts commit 156f63bce3.
2022-09-02 10:55:45 +12:00
Steve Boyd
37ff4ee46a
Merge pull request #10454 from creative-commoners/pulls/5/rescue-master-table-name
API rescue master-branch PR: Shorten auto-generated table names #7621
2022-09-01 09:12:11 +12:00
Guy Sartorelli
89a0f59ef1
FIX Remove accidental deprecation warnings.
These were erroneously added via a merge-up from 4 to 5.
2022-08-31 13:50:33 +12:00
Guy Sartorelli
f0a20ed400
MNT Fix merge-up error. 2022-08-31 13:38:18 +12:00
Guy Sartorelli
715415d5c8
Merge branch '4' into 5 2022-08-31 13:37:25 +12:00
Steve Boyd
250a75b233
Merge pull request #10457 from creative-commoners/pulls/5/rescue-master-extensions-expose-public
API Rescue Master Branch PR: Only expose public extension methods
2022-08-29 19:09:00 +12:00
Steve Boyd
9edf3a5ca6
Merge pull request #10450 from creative-commoners/pulls/5/rescue-master-generators
API rescue master-branch PR: Use Generators for ORM
2022-08-29 19:03:47 +12:00
Guy Sartorelli
6d885ab894
FIX Normalise casing before casting fields 2022-08-25 17:36:06 +12:00
Steve Boyd
934fafd29d
Merge pull request #10459 from creative-commoners/pulls/5/rescue-master-no-dual-support
ENH Rescue Master Branch Commits: CSV BOM stripping is now handled internally by league/csv
2022-08-25 10:01:50 +12:00
Steve Boyd
feb57dbf1f
Merge pull request #10461 from creative-commoners/pulls/5/rescue-master-abstract-testcase
API Rescue Master Branch PR: TestCase classes should be abstract to prevent warnings
2022-08-24 15:37:18 +12:00
Steve Boyd
9e057d8902
Merge pull request #10458 from creative-commoners/pulls/5/rescue-master-abstract-migrationtask
API Rescue Master Branch PR: Update MigrationTask class to be an abstract class
2022-08-24 15:35:46 +12:00
Steve Boyd
b37921d0b1
Merge pull request #10462 from creative-commoners/pulls/5/rescue-master-join-aliases
Rescue Master Branch PR: Fix SQLConditionalExpression::getJoins so it always adds explicit aliases
2022-08-24 15:33:41 +12:00
Damian Mooyman
f2211d690f
BUG Fix extend() failing on protected extend-prefixed methods 2022-08-24 15:31:43 +12:00
Damian Mooyman
76fc8f1596
API Only expose public extension methods
API Enable `extend*` methods to handle ->extend()
API Remove Extensible::constructExtensions()
2022-08-24 15:31:34 +12:00
Steve Boyd
f5d72e998c
Merge pull request #10460 from creative-commoners/pulls/5/rescue-master-dataobject-get-any-one
API Rescue Master Branch PR: Allow dataobject get_one without passing a class
2022-08-24 15:25:13 +12:00
Steve Boyd
4a3b6d951b
Merge pull request #10456 from creative-commoners/pulls/5/rescue-master-remove-unsafe-queryparams
API Rescue Master Branch PR: Remove isDev / isTest querystring arguments
2022-08-24 15:14:45 +12:00
Viktor Szépe
94d1ac8d99
ENH Various changes via static analysis tooling 2022-08-24 12:14:32 +12:00
Serge Latyntcev
e07671a890
Fix SQLConditionalExpression::getJoins so it always adds explicit aliases
This is a revert of https://github.com/silverstripe/silverstripe-framework/pull/8956
2022-08-24 11:27:02 +12:00
Daniel Hensby
2c102c61a9
API TestCase classes should be abstract to prevent warnings 2022-08-23 17:12:24 +12: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
Dan Hensby
a666814a80
ENH CSV BOM stripping is now handled internally by league/csv 2022-08-23 15:57:13 +12:00
Michal Kleiner
e42ed95be1
API Update MigrationTask class to be an abstract class 2022-08-23 15:53:33 +12:00
Steve Boyd
2b5420ee7d [CVE-2022-37430] Sanitise mixed case javascript 2022-08-23 15:36:48 +12:00
Damian Mooyman
08d1cd3834
API Remove isDev / isTest querystring arguments 2022-08-23 11:40:43 +12:00
Guy Sartorelli
a4521a7348
API Undeprecate table warning message
I think it's worth keeping this message around to encourage best
practices.
2022-08-22 17:45:00 +12:00
Christopher Joe
156f63bce3
ENH shorten auto-generated table names
Fix add check for legacy long table name and rename to short version
2022-08-22 17:44:51 +12:00
Guy Sartorelli
a75317343e
Merge pull request #10439 from creative-commoners/pulls/4/better-button-keep-state
ENH Update page number in the state on reaching the first or the last…
2022-08-22 13:47:47 +12:00
Sabina Talipova
c0b38fc411 ENH Update page number in the state on reaching the first or the last element in a list 2022-08-22 12:44:11 +12:00
Guy Sartorelli
10ef46a5ec
ENH Make DataObject::exists() an alias of DataObject::isInDB() (#10407) 2022-08-16 09:43:54 +12:00
Guy Sartorelli
3284c06703
API Remove PHPUnit 5.7 compatability hacks 2022-08-12 10:52:56 +12:00
Guy Sartorelli
1153bacc11
API Remove unnecessary getGenerator() method.
`getIterator()` now returns a generator by default.
2022-08-11 16:29:39 +12:00
Guy Sartorelli
5bdfaea78a
FIX Don't try to call count() on an iterator 2022-08-11 16:29:39 +12:00
Daniel Hensby
595835bb15
Merge pull request #6518 from sminnee/generators
Use Generators for ORM Query, Map, ArrayList
2022-08-11 16:29:32 +12:00
Guy Sartorelli
a7461a8ffa
API Deprecate PHPUnit 5.7 compatability hacks 2022-08-10 16:21:05 +12:00
Sergey Shevchenko
4994844729 refactor: variable naming in Requirements_Backend::resolveCSSReferences() 2022-08-05 21:27:36 +12:00
Sergey Shevchenko
ebb1601d5d fix: misc suggested changes
* disable resolve_relative_css_refs by default
* variable naming
* using proper path joiner
* test comment typo
2022-08-05 15:35:26 +12:00
Sergey Shevchenko
bc9a323418 fix: more tests, improved paths detection, readability 2022-08-05 15:35:26 +12:00
Sergey Shevchenko
9854e48cfc Update Requirements_Backend.php 2022-08-05 15:35:26 +12:00
Sergey Shevchenko
a2906cd02c ENH Requirements_Backend::resolveCSSReferences(): Tests, config, doc, safety.
* Changed to ignore absolute paths altogether
* Improve tests
* Added config flag
* Changed docs
2022-08-05 15:35:26 +12:00
Sergey Shevchenko
c5e68dd2c0 ENH: resolve relative references in CSS files when combining 2022-08-05 15:35:26 +12:00
Guy Sartorelli
ee4144fc35 ENH Set the default resources dir to "_resources" 2022-08-04 11:36:54 +12:00
Guy Sartorelli
37dc0daacc API Remove deprecated ManifestFileFinder::RESOURCES_DIR const 2022-08-04 11:36:27 +12:00
Steve Boyd
311afc25ef Merge branch '4.11' into 4 2022-08-02 18:26:54 +12:00
Steve Boyd
c466ca5ca5
Merge pull request #9341 from unclecheese/pulls/4/come-on-baby-make-it-search-so-good
NEW: Allow search field customisation
2022-08-02 11:59:55 +12:00
Loz Calver
6b15bd6dd4 FIX: Invalid argument warning in backtrace 2022-08-01 09:08:52 +01:00
Guy Sartorelli
11595952f4
NEW Search across multiple searchable fields by default (#10382)
* NEW Search across multiple searchable fields by default

* ENH Split search query and search each term separately.
2022-08-01 12:19:02 +12:00
Guy Sartorelli
c7504aa337
Merge pull request #10331 from creative-commoners/pulls/4/gridfield-keep-state
ENH Restore gridfield state from get vars (POC)
2022-07-29 11:33:19 +12:00
Sabina Talipova
7a9bc7f577 ENH Keep Request in URL 2022-07-28 10:14:43 +12:00
Guy Sartorelli
af3c50c9da NEW Set many_many_extraFields data via the ORM 2022-07-28 09:29:36 +12:00
Guy Sartorelli
1253ab82af
Merge pull request #10415 from kinglozzer/10413-php81-enums
NEW: Add support for autoloading PHP 8.1 enums
2022-07-27 11:38:51 +12:00
Aaron Carlino
07a6c1191a NEW: Allow search field customisation in GridFieldFilterHeader 2022-07-25 17:33:09 +12:00
Guy Sartorelli
afa1fa14b7
Merge pull request #10410 from ntd/pr8
DOCS Fix DataObject examples
2022-07-25 11:49:15 +12:00
Loz Calver
d3f104382d NEW: Add support for autoloading PHP 8.1 enums 2022-07-22 15:59:55 +01:00
Steve Boyd
d4d1ff3450 Merge branch '4.11' into 4 2022-07-22 11:21:15 +12:00
Steve Boyd
dd210e0f84
FIX Check if blank method passed (#10417) 2022-07-21 15:49:48 +12:00
Nicola Fontana
d65ba0d718 DOCS Fix DataObject examples 2022-07-15 06:48:59 +02:00
Sabina Talipova
2262d84a73
Merge pull request #9952 from creative-commoners/pulls/4.7/allow-class-to-inject-over-parent
All works perfect.
2022-07-12 15:29:17 +12:00
Steve Boyd
b62c4a9f53 Merge branch '4.11' into 4 2022-07-08 17:13:31 +12:00
Guy Sartorelli
3cad03357a
Merge pull request #10384 from creative-commoners/pulls/4.11/remove-wrong-message
FIX Unexpected message issue
2022-07-08 13:20:11 +12:00
Guy Sartorelli
3e85c4dc5c
Merge pull request #9905 from christopherdarling/patch-20
BUG fieldNameError() references invalid $this->form
2022-07-07 20:29:38 +12:00
Guy Sartorelli
29fae72211 API TableBuilder class reduces inconsistency between temp & prod db 2022-07-07 09:49:19 +12:00
Maxime Rainville
33600c3b73 BUG Manually create singleton when building table 2022-07-06 11:29:19 +12:00
Guy Sartorelli
0cd6665130 Merge branch '4.11' into 4 2022-07-06 11:28:41 +12:00
Loz Calver
9b45342a06 FIX: Add missing casting for Form::getAttributesHTML (fixes #10386) 2022-07-04 12:24:58 +01:00
Sabina Talipova
babc811381 FIX Remove unexpected message 2022-07-04 16:05:57 +12:00
Steve Boyd
5a940b0f14 FIX PDO in PHP 8 2022-07-04 15:08:52 +12:00
Steve Boyd
b101b8bdb8 Merge branch '4.11' into 4 2022-07-04 13:20:12 +12:00
Brandon Iffert
ad83b78a10
FIX Handle null values passed to PDO::quote() (#10383) 2022-07-04 13:17:51 +12:00
Loz Calver
b37178e831
FIX: 'passwordsent' title was not being displayed (fixes #10366) (#10367) 2022-07-01 13:58:57 +12:00
Guy Sartorelli
cfb347dc9b Merge branch '4.11' into 4 2022-06-30 16:33:12 +12:00
Guy Sartorelli
6c01661512 FIX Support search filters with match_any searchable_fields 2022-06-30 15:55:53 +12:00
Guy Sartorelli
4e53c35b53 MNT Deprecate unusable property
This property must always have the value 'AND' or an exception will be
thrown - it should be deprecated. Also, no need to process the query
before throwing.
2022-06-30 15:53:17 +12:00
Steve Boyd
3a0fff25de FIX PDO in PHP 8 2022-06-30 12:34:05 +12:00
Steve Boyd
a77ca74a7e FIX Ensure not passing null to mysql methods for PHP 8.1 compatibility 2022-06-29 09:34:30 +12:00
Steve Boyd
4d662d2dea Merge branch '4.11' into 4 2022-06-28 17:42:07 +12:00
Steve Boyd
98b985fb91 Merge branch '4.10' into 4.11 2022-06-28 17:41:49 +12:00
Guy Sartorelli
794640247b
Merge pull request #10374 from creative-commoners/pulls/4.10/cve-2022-28803
[CVE-2022-28803] Block XSS in links and iframes.
2022-06-28 17:27:37 +12:00
Guy Sartorelli
a78d3458ea
Merge pull request #10375 from creative-commoners/pulls/4.10/cve-2022-25238
[CVE-2022-25238] Sanitise htmlfields serverside by default
2022-06-28 17:27:21 +12:00
Steve Boyd
b5abc38455 CVE-2021-41559 Disable xml entities 2022-06-28 17:04:34 +12:00
Steve Boyd
991aedf017 [CVE-2022-25238] Sanitise htmlfields serverside by default 2022-06-28 17:03:05 +12:00