- Jul 08, 2022
-
-
Larry Garfield authored
This introduces two new events to interact with the backend controller page generation process. They mirror and replace the renderPreProcess and renderPostProcess hooks, which are removed. The vestigial constructorPostProcess hook is also removed entirely. Resolves: #97451 Releases: main Change-Id: I58bccf341b478eedc87c9a9dd81fac788bba0a91 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74797 Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Benni Mack <benni@typo3.org>
-
- Jul 07, 2022
-
-
Benni Mack authored
This change reduces the logic within TMENU in order to further unify link generation within the menu rendering. Resolves: #97865 Releases: main Change-Id: I495b167b7e6e302fc7e8b04757eab1eb8e359528 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75043 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Benni Mack <benni@typo3.org>
-
Larry Garfield authored
This patch adds property and return types to the core Request class. Parameter types cannot be added to methods from RequestInterface as it has no typed version yet. Doing so allows for the removal of a lot of now-unnecessary tests as well as PHPstan baseline issues. This patch also notes, but does not correct, the incorrect implementation of getUri(), which this implementation permits to return null even though that is a PSR-7 violation. Fixing that has several knock-on effects better addressed in future patches. Resolves: #97620 Releases: main Change-Id: I9b754a261b77fa8fdb6fa58706edf8a5c5248be4 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74634 Tested-by:
Daniel Haupt <mail@danielhaupt.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Daniel Haupt <mail@danielhaupt.de> Reviewed-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
-
Larry Garfield authored
Fluid's TagBuilder::getAttribute() is doc-typed as returning `string`, but the description says it returns `?string`. That meant PHPStan believes the `$file !== null` check is unnecessary, when it actually is. The TagBuilder class is not in core, though, but in the typo3fluid vendored package, so it cannot be corrected from here. However, the `$attributes` array is already requested above, and then href/src is removed from it anyway because it's the same piece of data. So just reading off of the array we already have and doing missing-value handling there ourselves resolves the PHPStan issue, is slightly more consistent with what the next line does (the unset() call), and is ever so slightly faster as it skips a method call. Resolves: #97743 Releases: main Change-Id: I4b24eebdfded4c02c5d59eac2ee00d1cc036d0da Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74828 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by:
Felix P. <f.pachowsky@neusta.de> Tested-by:
Henning Liebe <h.liebe@neusta.de> Tested-by:
Vanessa Räbiger <vmartens91@gmail.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by:
Felix P. <f.pachowsky@neusta.de> Reviewed-by:
Henning Liebe <h.liebe@neusta.de> Reviewed-by:
Vanessa Räbiger <vmartens91@gmail.com> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
-
Larry Garfield authored
ComparisonInterface's documented types and actual types are inconsistent. This patch corrects the types to be consistent with what the actual code does, which allows for the removal of several PHPStan errors. Resolves: #97604 Releases: main Change-Id: Ib58def06b4c702443f4aac63a667cadfac26dc49 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74655 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
-
linawolf authored
Introduce development and API section, so they can be referenced. Resolves: #97140 Releases: main Change-Id: I28051e09c7800c2653b288460bb618c2bcb987f7 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73857 Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
-
Oliver Klee authored
Storage folder identifiers can also be int-like strings, which causes them to automatically get cast to int when used as array keys. Our types annotations need to reflect this in order to keep developers and static analysis for taking those array keys to be always strings (which can lead to type errors and has recently done so). Resolves: #97858 Relates: #97851 Relates: #97711 Releases: main, 11.5 Change-Id: If0fbfab5792446cfe10564803d8d540dd3cc6bb5 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75033 Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
-
Benni Mack authored
This change adds two new PSR-14 Events * \TYPO3\CMS\Frontend\Event\AfterCacheableContentIsGeneratedEvent * \TYPO3\CMS\Frontend\Event\AfterCachedPageIsPersistedEvent which replace $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-cached'] $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-all'] and $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['usePageCache'] $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['insertPageIncache'] hooks. Those hooks were much important and powerful, receiving even more power by the new Events, which allow manipulating content stored in cache, or when a page was cached in the Frontend. Additionally, the TSFE->generatePage_postProcessing() method does now require a ServerRequestInterface as first paramter, to be able to pass the current request to the new events. Resolves: #97862 Releases: main Change-Id: Ibd97d22ec1c4a726a78164b234bf8b4ce41f9dca Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75039 Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Benni Mack <benni@typo3.org>
-
Oliver Hader authored
Several places in the TYPO3 core fall back to using 'http' as protocol for links in case none was given. In order to adjust this behavior new $GLOBALS['TYPO3_CONF_VARS']['SYS']['defaultScheme'] setting has been introduced, which uses 'http' as default. In order to adjust the default protocol, one has to add the following assignment to their LocalConfiguration.php settings: $GLOBALS['TYPO3_CONF_VARS']['SYS']['defaultScheme'] = 'https' Resolves: #97111 Releases: main, 11.5 Change-Id: I8c86a3b98dfdfef96c6e433de28e24c1af7f27ab Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73867 Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Nikita Hovratov <nikita.h@live.de>
-
Georg Ringer authored
Fix a notice if a browse menu is being generated but no parent page is available. Resolves: #97608 Releases: main, 11.5 Change-Id: Id0674fddccf62e02febdfa7b609521d0db3114b1 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74603 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
crell <larry@garfieldtech.com> Reviewed-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by:
Torben Hansen <derhansen@gmail.com> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
-
Lina Wolf authored
Releases: main, 11.5, 10.4 Resolves: #97867 Change-Id: I5948ff1ab539d6f90da9034fdd05c104ea344c25 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75044 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Björn Jacob <bjoern.jacob@tritum.de> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Björn Jacob <bjoern.jacob@tritum.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
-
Simon Schaufelberger authored
The TSconfig options "mod.web_layout.disableNewContentElementWizard" and "mod.newContentElementWizard.override" are removed with this patch as they are serving edge-case usages. Resolves: #97701 Related: #92504 Related: #92507 Releases: main Change-Id: I5d8b24fa4bb339fdd0435c7ea29b38b2fa86caf7 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74777 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Benni Mack <benni@typo3.org>
-
Oliver Klee authored
Methods from InaccessibleFolder should not be called and always throw an exception when called. Annotate this to help static code analysis understand this. Resolves: #97859 Releases: main, 11.5 Change-Id: Id3f563e5cd2780715a860de7faf567f9cb960d30 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75034 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Mathias Brodala <mbrodala@pagemachine.de> Tested-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Mathias Brodala <mbrodala@pagemachine.de> Reviewed-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by:
Benni Mack <benni@typo3.org>
-
Benni Mack authored
Various properties can be accessed directly via TypoScript config settings. * $TSFE->spamProtectEmailAddresses * $TSFE->intTarget * $TSFE->extTarget * $TSFE->fileTarget * $TSFE->baseUrl They have been marked as deprecated. In addition, some internal functionality is now marked as @internal as well, somehow related to the deprecated properties. Resolves: #97866 Releases: main Change-Id: Ieecd1674783a1d9b9092528d16a988568e857e18 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75040 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Benni Mack <benni@typo3.org>
-
- Jul 06, 2022
-
-
Oliver Klee authored
This helps reduce warnings when extensions are type-checked with PHPStan. Resolves: #97820 Releases: main, 11.5 Change-Id: Iee5cd28402d9e33af0bfaa34815552ba331718ee Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74991 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Nikita Hovratov <nikita.h@live.de>
-
- Jul 05, 2022
-
-
Andreas Fernandez authored
The method FileStorageTreeProvider->getSubfoldersRecursively() iterates an array of subfolders and prepares folder information based on the iterated data. This functionality has a minor flaw, thanks to PHP, in case a folder is named with numbers only, PHP treats array indices as integer if they can be parsed as such, leading to TypeErrors as the method prepareFolderInformation() expects a nullable string. The passed subfolder name is now cast to string to solve this issue. Resolves: #97851 Releases: main, 11.5 Change-Id: I3357121c4892d6063b6714e4e7b436b3ebdd1802 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75028 Tested-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
Benni Mack authored
This change removes the internal property "indexedDocTitle" which is filled by the PageTitleProvider API. This API is then moved to Indexed Search to use the same logic to fetch the "real" page title (without site title etc) when a plugin is registered. Resolves: #97861 Releases: main Change-Id: Ide1b8d1b700d9e555e02d4a02af154f05cb54130 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75036 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
Markus Friedrich authored
Adapts several content objects to use the local TypoScriptFrontendController instance of ContentObjectRenderer, to reduce usage of global objects and to avoid conflicts when different frontend environments are used, e.g. while indexing with EXT:solr. This adaption should be safe as the ContentObjectRenderer falls back to the global TypoScriptFrontendController, which was used in the content objects until now. If TypoScriptFrontendController is not available, a ContentRenderingException is thrown. Resolves: #97638 Releases: main Change-Id: I224829359f150739931da8b972ac3afded67a0fd Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74681 Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
Benni Mack <benni@typo3.org>
-
Andreas Fernandez authored
With the upgrade of TypeScript to version 4.7, typescript-eslint reported itself as incompatible. To solve this, all eslint related packages are updated to their respective latest version. Executed commands: cd Build nvm use yarn add --dev \ @typescript-eslint/eslint-plugin@^5.30.5 \ @typescript-eslint/parser@^5.30.5 \ @typescript-eslint/typescript-estree@^5.30.5 \ eslint@^8.19.0 grunt build Resolves: #97854 Related: #97698 Releases: main, 11.5 Change-Id: Id59b1658b1d83bfa537629b8d1df32c3624351b4 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75027 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Oliver Klee <typo3-coding@oliverklee.de> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
Nikita Hovratov authored
Resolves: #97855 Releases: main, 11.5 Change-Id: I2cff602b6b77f451061024797adec94713f8b82e Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75032 Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Benni Mack <benni@typo3.org>
-
- Jul 04, 2022
-
-
Andreas Fernandez authored
To improve both, UX and acceptance tests (incl. automated screenshots for docs), a notification is now dispatched when records were saved via EditDocumentController. Resolves: #95271 Releases: main Change-Id: I98b43bb9ecf643d634740ffc4241943a49a5a87f Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74196 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Björn Jacob <bjoern.jacob@tritum.de> Tested-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Björn Jacob <bjoern.jacob@tritum.de> Reviewed-by:
Oliver Bartsch <bo@cedev.de>
-
Francois Suter authored
In two places \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory accesses the TCA for some table without checking if it exists. Resolves: #97853 Releases: main, 11.5 Change-Id: I02c46153013c920cc771f085f872004e9a22ab3c Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75025 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by:
Markus Klein <markus.klein@typo3.org> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Reviewed-by:
Benni Mack <benni@typo3.org>
-
Francois Suter authored
Make sure that item key for custom permission options are cast to string before being parsed for invalid characters. Resolves: #97852 Releases: main, 11.5 Change-Id: Id8ff1997b875171316784d00bdc7bf72702d7645 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75024 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by:
Benni Mack <benni@typo3.org>
-
Florian Rival authored
Use new Symfony TypoScript condition syntax instead of outdated syntax. Releases: main,11.5,10.4 Resolves: #97847 Change-Id: Ib0711c2ed871762415b022159a3c6c4b5e688a10 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75023 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Oliver Klee <typo3-coding@oliverklee.de> Tested-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Björn Jacob <bjoern.jacob@tritum.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Björn Jacob <bjoern.jacob@tritum.de> Reviewed-by:
Benni Mack <benni@typo3.org>
-
Christian Kuhn authored
This adds a rewritten TypoScript syntax parser to ext:core. The heart of the existing parser dates back to Kasper's initial commit in 2003 and most parts have never been touched structurally. Even though various parts of TypoScript became less important in the Frontend rendering chain over time, it still plays a central point. Looking at the given parser approach, it became clear the project can benefit from a revamped parser based on modern PHP code. Goals: * A well structured, flexible and tested codebase. * Fix long standing syntax shenanigans and limits of the current parser approach and make the syntax interpretation more robust and resilient. * Have a better cache layer that kicks in more often to ultimately gain speed building the FE TypoScript. * Allow improving the Backend "Template" module to show and analyze more TypoScript details. * Have an object based structure for the final TypoScript tree, and allow an array export of it to keep backwards compatibility. The new implementation aims to fully substitute the old parser. This first patch however only brings the "library" part of needed code changes: There is no usage of the new parser whatsoever with this patch, except of course unit and functional tests. To understand the structure of the new parser, it might be helpful to have a rough understanding of the old parser. We'll look at the frontend parsing steps only, Backend usages in Template module are similar, though. When accessing a frontend page, TYPO3 at some points finds the requested page uid. It then builds the "rootline" of page records from the top page root node down to the requested page. This creates a list of page database records, mountpoints and similar are taken care of at this point, too. This rootline is fed to the old TypoScript parser. The parser now finds all relevant sys_template records attached to the rootline pages. These are the "entry" TypoScript snippets to parse. It then resolves all "includes": Snippets from sys_template include_static_file db records, snippets from various globals, snippets from sys_template basedOn, and so on. It also resolves @import and <INCLUDE_TYPOSCRIPT: syntax and substitutes them with the included content. All that is gathered in one huge string. The main parsing process then goes through this string and creates the TypoScript array, while taking care of conditions and constants substitution at the same time. This approach has various drawbacks: First, gathering everything into one main string forces to parse the entire string a-new for each and every page: A different page could have different includes or sys_template records attached. Secondly, parsing conditions and constants while creating the final array from the source string, ties "runtime" information (especially conditions) hard into the main parsing process, rendering an effective cache layer impossible. Third, the main strategy of gathering everything in one string leads to various funny details, for instance when opening a condition in one file and not closing it with [end] or [global], this state leaks to the next file. Bracket handling "}" has similar issues. These structural issues can't be changed by refactoring the given codebase, the only option is to rewrite the entire thing. IncludeTree: The entry point to the new parser is IncludeTree/TreeBuilder: This one again receives the pages "rootline" from Frontend. But instead of creating one huge string, it creates an object tree of includes. Each attached sys_template record is a child of "RootInclude" in the tree, and each sys_template include node can have children for further includes (like include_static_file). Single source snippets of each include are tokenized (see below) and analyzed for @import and <INCLUDE_TYPOSCRIPT: and conditions: If they exist, an include is marked as "split". Each part is then represented by child includes. We thus receive a tree of objects where imports are already resolved, and conditions are child nodes in the tree. The main advantage is this tree does not carry runtime information. A single snippet *always* leads to the same tree, no matter if a condition matched or not. This way, the tree can be cached and the full tree, or parts of it can be re-used when requesting a different page. To do that efficiently, a new cache "typoscript" is established to store a serialized representation of the tree as php file, which can be unserialized relatively quickly. Tokenizer: The tokenizer takes a single source snipped and creates a stream of Line objects from it, with tokens representing the source line. For instance, a TypoScript snipped like "foo = fooValue" creates a IdentifierAssignmentLine object, with a T_IDENTIFIER token for "foo" and a T_VALUE token for "fooValue". There are Line classes for all the different Lines (assignment, copy, condition, ...) and Tokens for the various details (T_VALUE, T_CONSTANT, ...). Tokens are sometimes encapsulated in TokenStreams, for example multiple identifiers "foo.bar = barValue" create a stream of the two T_IDENTIFIER tokens "foo" and "bar". This depends on the line type. We also have two different tokenizers: The Frontend uses the LossyTokenizer which creates a stream only of "relevant" tokens: Empty lines, comments and lines with invalid syntax are ignored. The LosslessTokenizer however creates a 1:1 representation of the source snipped, including token positions (line and start column). This allows detailed analysis in the Backend Template module. AstBuilder: This is the third part of the structure: A representation of parsed TypoScript as object tree. This is similar to the array we're dealing with now, but it can carry additional functionality. For instance, the well-known TypoScript array can be extracted from it. Using the AstBuilder works like this: Create the IncludeTree first (from cache). Next, traverse the IncludeTree with a visitor that looks at condition includes and sets an information if they match. Then, feed all includes that matched to the AstBuilder to create the object tree. The AstBuilder receives a LineStream of each include and extends the object tree depending on the line type. This means: IncludeTree building and source tokenizing can be cached in Frontend, applying constants and condition verdicts together with building the finally TypoScript object tree is a runtime step on each page. Separating tokenizing and AST building with a cache layer in between is roughly twice as fast in Frontend compared to the previous solution. The patch establishes these three main structures and comes with an extensive set of unit and functional tests. It is an extract of a bigger WIP patch that already contains usages of the new structure in Frontend and some parts of the Backend. The patch also adds a ReST file to explain some subtle TypoScript syntax changes. These will kick in as soon as we start using the structure with upcoming changes. The new parser should be rather robust already. Further changes that start using the new parser will probably only change minor things. For now, the entire structure is marked @internal, though: API is still the array representation, only. This will change later when we actively start using the TypoScript object tree in the core. Change-Id: I4047a878494078b6ac149553fa305c1d69329e37 Resolves: #97816 Resolves: #96503 Resolves: #90146 Resolves: #41327 Resolves: #76447 Releases: main Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74987 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
-
- Jul 03, 2022
-
-
Simon Schaufelberger authored
Resolves: #97845 Releases: main, 11.5 Change-Id: Iac347c7e2b5c46302a5a323222130437e4f772b6 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75021 Tested-by:
Oliver Klee <typo3-coding@oliverklee.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
Andreas Fernandez authored
The used flatpickr library version is quite dated and was not updated since its introduction in mid 2020. This commit updates the library to version 4.6.13, fixing several bugs. Additionally, the flatpickr can now be hidden by pressing the ESC key. Changelogs: https://github.com/flatpickr/flatpickr/releases Executed commands: cd Build nvm use yarn add flatpickr@^4.6.13 grunt build Resolves: #97837 Releases: main, 11.5 Change-Id: I4720f30447514374d638cf3d3a318e6a8e789f6d Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75003 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Torben Hansen <derhansen@gmail.com> Tested-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Torben Hansen <derhansen@gmail.com> Reviewed-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
- Jul 02, 2022
-
-
Elias Häußler authored
When translating values in EXT:form, we must ensure to handle translated values correctly. Prior to this change, the native PHP function "empty()" was used to determine if a translated value is valid. This, however, generates wrong translations for valid empty values, such as "0". Therefore, the native function has been replaced by a helper method in TranslationService. This fix is a potential change of behavior. Translated values that were previously interpreted as "empty" might now be rendered as-is. This can possibly lead to a different rendering result in Frontend forms. Therefore, this change is not backported to previous versions. Resolves: #91833 Releases: main Change-Id: I373ca97f91b97495f605ad3344b355539966a371 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74992 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Björn Jacob <bjoern.jacob@tritum.de> Tested-by:
waldhacker <hello@waldhacker.dev> Reviewed-by:
Björn Jacob <bjoern.jacob@tritum.de> Reviewed-by:
waldhacker <hello@waldhacker.dev>
-
Tobias Siegler authored
When changing values in the form editor inspector, their header content is updated and overridden - as a result the corresponding type icon in the header suddenly disappears. Resolves: #97841 Releases: main, 11.5, 10.4 Change-Id: I18bbd668a16a5b350a14cfa565fb5b96ab205fe8 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75010 Tested-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Björn Jacob <bjoern.jacob@tritum.de> Tested-by:
waldhacker <hello@waldhacker.dev> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Björn Jacob <bjoern.jacob@tritum.de> Reviewed-by:
waldhacker <hello@waldhacker.dev>
-
Ralf Zimmermann authored
A new `FormRequestHandler` has been introduced as entry point which takes care of creating and rendering the actual `FormRuntime`. Independent of the current application dispatcher (either the default `FormFrontendController`, any custom Extbase controller or a TypoScript `FLUIDTEMPLATE` cObject) any processing will end up here. To ensure proper caching, it is important to separate the two main actions `render` and `perform`, which unfortunately cannot be resolved easily, especially when using custom Extbase controller actions. The term uncached refers to using cObject `USER_INT` instead of `USER`. More details about the process flow are described in `\TYPO3\CMS\Form\Core\FormRequestHandler`, introduced by this change. Resolves: #93887 Resolves: #92406 Releases: main, 11.5, 10.4 Change-Id: I0b98d39f04b6c70ea370200c53316b381019dd2a Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460 Tested-by:
Elias Häußler <e.haeussler@familie-redlich.de> Tested-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
core-ci <typo3@b13.com> Tested-by:
waldhacker <hello@waldhacker.dev> Reviewed-by:
Elias Häußler <e.haeussler@familie-redlich.de> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
waldhacker <hello@waldhacker.dev>
-
- Jul 01, 2022
-
-
Torben Hansen authored
With #93667 logging of HMAC validation errors caused by potentially manipulated form submissions has been disabled. The change does however not consider exceptions handled in the ProductionExceptionHandler for content objects in ext:frontend. This change prevents logging of two exceptions caused by potential manipulated form submissions in ProductionExceptionHandler for content objects. Resolves: #97830 Related: #90134 Releases: main, 11.5 Change-Id: Ibee8268584e2729766c5528bf8687fd6055a4030 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74998 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Markus Klein <markus.klein@typo3.org> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Reviewed-by:
Rudy Gnodde <rudy@famouswolf.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
-
Oliver Klee authored
Used commands: > composer req --dev phpstan/phpstan:^1.8.0 > ./Build/Scripts/runTests.sh -s phpstanGenerateBaseline Resolves: #97823 Releases: main, 11.5 Change-Id: Ia124e34cf81c55915c2815cdff71bdde6aabe972 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74792 Tested-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
-
Georg Ringer authored
Set the return type to string|false instead of mixed. Resolves: #97832 Releases: main, 11.5 Change-Id: I8648392bb8b8d95aaf8ab5416d9e7d1043f8e9b0 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75017 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Oliver Klee <typo3-coding@oliverklee.de> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
-
Elias Häußler authored
When switching from `master` to `main` as default branch, it was forgotten to change the `defaultbranch` value in `.gitreview` as well. Resolves: #97843 Releases: main Change-Id: I84d011f86d0f165eeb9eccce757bb7fc32f54924 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75014 Tested-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org>
-
Benjamin Kott authored
With the update to v3.x of the TYPO3 Icon set, there comes a little change in favor of understanding what sizes of icons to use. There is no defined "default" size anymore. While it is still usable, the new default scales with font size. So it does not matter if you call it "default" or "auto". The default size for icon rendering was adapted to now use the "medium" size. That is the same size as default was before. Fixed sizes are now defined in order: small: 16px medium: 32px large: 64px Aside from some special treatment the CSS from the icon set is now used. It was already reworked in the icon set to make use of CSS variables instead of compiled fixed compiled values. Resolves: #97809 Releases: main Change-Id: I88ff4c4f09a08461674ae5acc6b1cc9b202787b3 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74981 Tested-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
-
Nikita Hovratov authored
Resolves: #97840 Related: #96935 Releases: main Change-Id: If3ea919f5350aa65d2967b22b40a1334eb33fbca Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75006 Tested-by:
Björn Jacob <bjoern.jacob@tritum.de> Tested-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Björn Jacob <bjoern.jacob@tritum.de> Reviewed-by:
Nikita Hovratov <nikita.h@live.de>
-
Elias Häußler authored
The core team agreed on not using yoda-style conditions in PHP. An appropriate PHP-CS-Fixer rule to explicitly disable yoda-style has been added to ensure that this coding style is respected. Additionally, all yoda-style conditions have been transformed to normal conditions. Resolves: #97839 Releases: main, 11.5 Change-Id: Ic3a77fe412c15ec8c8d793f2b4aa6017562a4863 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75005 Reviewed-by:
Björn Jacob <bjoern.jacob@tritum.de> Reviewed-by:
Mathias Brodala <mbrodala@pagemachine.de> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Mathias Brodala <mbrodala@pagemachine.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
Nikita Hovratov <nikita.h@live.de>
-
Elias Häußler authored
With #96473, the first parameter of `AbstractFormViewHelper::renderHiddenIdentityField()` was hardened to `object|null`. This is actually fine since only objects are suitable to render those fields (falling back to NULL, probably for bc reasons). However, form elements in EXT:form cannot be directly accessed with the FormRuntime. Instead, calling `$formRuntime[$formField]` returns the current value of the form element instead of the elemnt itself. To avoid situations where everything else than an object is passed to said method, the resolved object is now checked and falls back to NULL if it's not an object. This change restores the previous behavior of EXT:form elements prior to the change introcuded with #96473. Resolves: #97834 Related: #96473 Releases: main Change-Id: Ib46fdc7d2ceca56dc5b93787b9f1f7da468128d2 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75004 Tested-by:
core-ci <typo3@b13.com> Tested-by:
Björn Jacob <bjoern.jacob@tritum.de> Tested-by:
waldhacker <hello@waldhacker.dev> Tested-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Björn Jacob <bjoern.jacob@tritum.de> Reviewed-by:
waldhacker <hello@waldhacker.dev> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org>
-
Stefan Bürk authored
xdebug does not have an official compatible version which can be used with PHP8.2, and thus xdebug had been missing in the PHP8.2 alpha1 image. To avoid using xdebug with PHP8.2 this had been guarded with a corresponding check in `runTests.sh`. `typo3/core-testing-php82` docker image has since been rebuilt with PHP8.2 alpha2 and using a fork of xdebug, which compiles the extension against PHP8.2. The check in `runTests.sh` is now removed again in order to allow early xdebug-ging using `Build/Scripts/runTests.sh`. Resolves: #97811 Releases: main, 11.5 Change-Id: Ie9b6795873f38e0a8ea98cfabe4acf7de9ef2056 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74983 Tested-by:
Sybille Peters <sypets@gmx.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Sybille Peters <sypets@gmx.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
-
Björn Jacob authored
A new chapter for editors regarding form finishers has been added. While being on it a small typo in the form editor has been fixed. Resolves: #97026 Releases: main Change-Id: I94b662d9da45cde6f4c6c4c81161a33294241454 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75002 Tested-by:
Elias Häußler <e.haeussler@familie-redlich.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
waldhacker <hello@waldhacker.dev> Reviewed-by:
Elias Häußler <e.haeussler@familie-redlich.de> Reviewed-by:
waldhacker <hello@waldhacker.dev>
-