Commit Graph

23497 Commits

Author SHA1 Message Date
Guy Sartorelli
ef8a02dfdc
FIX Update config to support tinymce6 2022-09-30 10:40:52 +13:00
Guy Sartorelli
0b80643210
Merge pull request #10522 from creative-commoners/pulls/4.11/backport-textcollector-fix
Fix i18nTextCollector produces corrupt output / namespaces when runni…
2022-09-29 14:42:39 +13:00
Guy Sartorelli
4fa10aab5f
Merge pull request #10520 from creative-commoners/pulls/4.11/backport-textcollector-fix
backport i18nTextCollector fix
2022-09-29 14:24:41 +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
Guy Sartorelli
b36c987eef
Merge pull request #10519 from lekoala/patch-30
request may not have a session
2022-09-29 09:05:12 +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
Michal Kleiner
b80309093c
Merge pull request #10516 from creative-commoners/pulls/4.11/override-named-extension 2022-09-27 23:43:52 +13:00
Guy Sartorelli
7fd8ed165d
Merge pull request #10513 from TheBnl/patch-3
Member updateName extension hook
2022-09-27 13:17:57 +13: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
Steve Boyd
71dca0118d
Merge pull request #10484 from creative-commoners/pulls/5/rescue-master-orm-generators
API rescue master-branch PR: Use Generators for ORM
2022-09-15 16:51:29 +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
d9be52579d
MNT Fix test 2022-09-15 13:29:29 +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
Loz Calver
749405170c
Update MySQLDatabaseTest to work with new query iterators 2022-09-15 13:29:10 +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
52744c7848
Merge pull request #10507 from creative-commoners/pulls/4/peg
ENH Add PHP 8.1 safe null-coalescing operators to peg file
2022-09-15 13:17:39 +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
Guy Sartorelli
5da5555ce3
Merge pull request #10506 from creative-commoners/pulls/5/symfony-cache-fix
FIX Pass PSR6 caches to ChainAdapter
2022-09-13 17:28:39 +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
1385712ffd
MNT Make sure to test strings of boolean/null values 2022-09-09 13:42:06 +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
Guy Sartorelli
7e9ced0824
Merge pull request #10470 from creative-commoners/pulls/4.11/case-insensitive-casting
FIX Normalise casing before casting fields
2022-09-08 12:45:09 +12:00
Guy Sartorelli
a6a07a7ef2
Merge pull request #10491 from creative-commoners/pulls/5/symfony6-translation-2
API Update translation to use symfony 6
2022-09-08 12:29:43 +12:00
Steve Boyd
a87a657367 API Update translation to use symfony 6 2022-09-08 11:52:34 +12:00