[!!!][FEATURE] Switch to standalone Fluid template engine 25/42425/132
authorClaus Due <claus@namelesscoder.net>
Thu, 11 Jun 2015 12:06:35 +0000 (14:06 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 29 Jan 2016 16:12:09 +0000 (17:12 +0100)
This change:

* Adds `typo3fluid/fluid` as dependency
* Converts system extension `fluid` to a so-called Fluid adapter
* Adds TYPO3-specific Fluid integrations as compatibility layer
* Turns Fluid's RenderingContext into a very flexible API
* Updates a few templates and core ViewHelpers for compatibility

On a more general level the change allows using a wide array of
new template syntaxes and integration features (see feature
documentation included with this commit in `core` extension).

The breaking changes are minimal; mostly caused by removal of
deprecated code from the `fluid` system extension (rather than
fundamental changes to how Fluid itself works). Custom templates
should work with little or no migration required.

Change-Id: Ib505cb66dabcc711868924d2fab3015ce549fbde
Releases: master
Resolves: #62940
Resolves: #69863
Resolves: #58752
Resolves: #48221
Resolves: #49903
Resolves: #54509
Resolves: #55343
Resolves: #55660
Resolves: #57446
Resolves: #70036
Resolves: #61144
Resolves: #60082
Resolves: #11287
Resolves: #70960
Resolves: #71552
Resolves: #67930
Resolves: #48656
Resolves: #71821
Resolves: #59540
Reviewed-on: https://review.typo3.org/42425
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Marc Neuhaus <apocalip@gmail.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
360 files changed:
composer.json
composer.lock
typo3/sysext/backend/Classes/ViewHelpers/AvatarViewHelper.php
typo3/sysext/belog/Classes/ViewHelpers/Be/PagePathViewHelper.php
typo3/sysext/belog/Classes/ViewHelpers/ErrorIconViewHelper.php
typo3/sysext/belog/Classes/ViewHelpers/Form/TranslateLabelSelectViewHelper.php
typo3/sysext/belog/Classes/ViewHelpers/FormatDetailsViewHelper.php
typo3/sysext/belog/Classes/ViewHelpers/HistoryEntryViewHelper.php
typo3/sysext/belog/Classes/ViewHelpers/IsExtensionLoadedViewHelper.php
typo3/sysext/belog/Classes/ViewHelpers/UsernameViewHelper.php
typo3/sysext/belog/Classes/ViewHelpers/WorkspaceTitleViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/ArrayElementViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/Display/PagesViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/Display/SysFileMountsViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/Display/SysLanguageViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/EditRecordViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/IssueCommandViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/PermissionsViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/RemoveUserViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/SpriteIconForRecordViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/SwitchUserViewHelper.php
typo3/sysext/core/Classes/ViewHelpers/IconViewHelper.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-69863-ChangesInViewHelpersPostFluidStandalone.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Breaking-69863-FluidEscapingBehaviourChangedFromENT_COMPATToENT_QUOTES.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Breaking-69863-RemovedDeprecatedCodeFromExtfluid.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Deprecation-69863-DeprecateGetTemplateVariableContainerFunction.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Feature-69863-UseNewStandaloneFluidAsComposerDependency.rst [new file with mode: 0644]
typo3/sysext/cshmanual/Classes/ViewHelpers/FormatViewHelper.php
typo3/sysext/documentation/Classes/ViewHelpers/FormatsViewHelper.php
typo3/sysext/extbase/Tests/Unit/Utility/DebuggerUtilityTest.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/Format/ImplodeViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/Format/JsonEncodeViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/InstallationStateCssClassViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/TimeSinceLastUpdateViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/Typo3DependencyViewHelper.php
typo3/sysext/filelist/Classes/ViewHelpers/Uri/DeleteFileViewHelper.php
typo3/sysext/filelist/Classes/ViewHelpers/Uri/EditFileContentViewHelper.php
typo3/sysext/filelist/Classes/ViewHelpers/Uri/EditSysFileMetadataRecordViewHelper.php
typo3/sysext/filelist/Classes/ViewHelpers/Uri/RenameFileViewHelper.php
typo3/sysext/filelist/Classes/ViewHelpers/Uri/ReplaceFileViewHelper.php
typo3/sysext/fluid/ChangeLog [deleted file]
typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php [deleted file]
typo3/sysext/fluid/Classes/Compatibility/TemplateParserBuilder.php [deleted file]
typo3/sysext/fluid/Classes/Core/Cache/FluidTemplateCache.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Compiler/AbstractCompiledTemplate.php [deleted file]
typo3/sysext/fluid/Classes/Core/Compiler/TemplateCompiler.php [deleted file]
typo3/sysext/fluid/Classes/Core/Exception.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/Configuration.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/Exception.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/Interceptor/Escape.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/InterceptorInterface.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/ParsedTemplateInterface.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/ParsingState.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/PreProcessor/XmlnsNamespaceTemplatePreProcessor.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ArrayNode.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/BooleanNode.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/Expression/LegacyNamespaceExpressionNode.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NodeInterface.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NumericNode.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RootNode.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ViewHelperNode.php [deleted file]
typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php [deleted file]
typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
typo3/sysext/fluid/Classes/Core/Rendering/RenderingContextInterface.php [deleted file]
typo3/sysext/fluid/Classes/Core/Variables/CmsVariableProvider.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractConditionViewHelper.php
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php
typo3/sysext/fluid/Classes/Core/ViewHelper/ArgumentDefinition.php
typo3/sysext/fluid/Classes/Core/ViewHelper/Arguments.php [deleted file]
typo3/sysext/fluid/Classes/Core/ViewHelper/Exception.php [deleted file]
typo3/sysext/fluid/Classes/Core/ViewHelper/Exception/InvalidVariableException.php [deleted file]
typo3/sysext/fluid/Classes/Core/ViewHelper/Exception/RenderingContextNotAccessibleException.php [deleted file]
typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/ChildNodeAccessInterface.php [deleted file]
typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/CompilableInterface.php [deleted file]
typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/PostParseInterface.php [deleted file]
typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php [deleted file]
typo3/sysext/fluid/Classes/Core/ViewHelper/TemplateVariableContainer.php [deleted file]
typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperInterface.php [deleted file]
typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperResolver.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperVariableContainer.php [deleted file]
typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetController.php
typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.php
typo3/sysext/fluid/Classes/Core/Widget/AjaxWidgetContextHolder.php
typo3/sysext/fluid/Classes/Core/Widget/Bootstrap.php
typo3/sysext/fluid/Classes/Core/Widget/Exception.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/MissingControllerException.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/RenderingContextNotFoundException.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/WidgetContextNotFoundException.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/WidgetRequestNotFoundException.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetContext.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetRequest.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetRequestBuilder.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetRequestHandler.php
typo3/sysext/fluid/Classes/Exception.php [deleted file]
typo3/sysext/fluid/Classes/Fluid.php [deleted file]
typo3/sysext/fluid/Classes/Service/AbstractGenerator.php [deleted file]
typo3/sysext/fluid/Classes/Service/DocbookGenerator.php [deleted file]
typo3/sysext/fluid/Classes/View/AbstractTemplateView.php
typo3/sysext/fluid/Classes/View/Exception.php [deleted file]
typo3/sysext/fluid/Classes/View/Exception/InvalidSectionException.php [deleted file]
typo3/sysext/fluid/Classes/View/Exception/InvalidTemplateResourceException.php [deleted file]
typo3/sysext/fluid/Classes/View/StandaloneView.php
typo3/sysext/fluid/Classes/View/TemplatePaths.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/View/TemplateView.php
typo3/sysext/fluid/Classes/ViewHelpers/AliasViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/AbstractBackendViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/InfoboxViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuItemGroupViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuItemViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/PagePathViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfAuthenticatedViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfHasRoleViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/TableListViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Widget/Controller/PaginateController.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Widget/PaginateViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/CaseViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/CommentViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/CountViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/CycleViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/DebugViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ElseViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ForViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/ButtonViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/HiddenViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/PasswordViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/RadioViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/SubmitViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/TextareaViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/ValidationResultsViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/AbstractEncodingViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/BytesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/CaseViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/CdataViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlentitiesDecodeViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlentitiesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlspecialcharsViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/Format/Nl2brViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/NumberViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/PaddingViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/PrintfViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/Format/RawViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/Format/StripTagsViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/UrlencodeViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/GroupedForViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/IfViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/LayoutViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/Link/ActionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/EmailViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/PageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/TypolinkViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/MediaViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/RenderChildrenViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/RenderViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/SectionViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/Security/IfAuthenticatedViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Security/IfHasRoleViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/SpacelessViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/SwitchViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/ThenViewHelper.php [deleted file]
typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ActionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/EmailViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ExternalViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/TypolinkViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/AutocompleteViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/AutocompleteController.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/PaginateController.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/LinkViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/PaginateViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php
typo3/sysext/fluid/Migrations/Code/ClassAliasMap.php [new file with mode: 0644]
typo3/sysext/fluid/Migrations/Code/LegacyClassesForIde.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/EscapeChildrenRenderingStandaloneTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/EscapeChildrenRenderingTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/.gitignore [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/Classes/ViewHelpers/AbstractEscapingBaseViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/Classes/ViewHelpers/EscapeChildrenDisabledAndEscapeOutputDisabledViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/Classes/ViewHelpers/EscapeChildrenDisabledAndEscapeOutputEnabledViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/Classes/ViewHelpers/EscapeChildrenEnabledAndEscapeOutputDisabledViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/Classes/ViewHelpers/EscapeChildrenEnabledAndEscapeOutputEnabledViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/README.md [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/composer.json [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/ext_emconf.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/ext_icon.gif [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Cache/FluidTemplateCacheTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Compiler/AbstractCompilerTemplateTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Compiler/Fixtures/AbstractCompiledTemplate.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Fixtures/TestViewHelper.php
typo3/sysext/fluid/Tests/Unit/Core/Fixtures/TestViewHelper2.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/ChildNodeAccessFacetViewHelper.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/PostParseFacetViewHelper.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture01-shorthand-split.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture01-shorthand.html [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture06-split.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture06.html [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture14-split.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture14.html [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Interceptor/EscapeTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/ParsingStateTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/PreProcessor/XmlnsNamespaceTemplatePreProcessorTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/AbstractNodeTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/BooleanNodeTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/LegacyNamespaceExpressionNodeTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/NumericNodeTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/TextNodeTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextFixture.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php
typo3/sysext/fluid/Tests/Unit/Core/Variables/CmsVariableProviderTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractConditionViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractTagBasedViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ArgumentDefinitionTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TagBuilderTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TemplateVariableContainerTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ViewHelperResolverTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ViewHelperVariableContainerTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/Core/Widget/AbstractWidgetControllerTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AbstractWidgetViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AjaxWidgetContextHolderTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetContextTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestBuilderTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestHandlerTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestTest.php
typo3/sysext/fluid/Tests/Unit/View/AbstractTemplateViewTest.php
typo3/sysext/fluid/Tests/Unit/View/Fixtures/TemplateViewFixture.php
typo3/sysext/fluid/Tests/Unit/View/Fixtures/TransparentSyntaxTreeNode.php
typo3/sysext/fluid/Tests/Unit/View/StandaloneViewTest.php
typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/AliasViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/IfAuthenticatedViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/IfHasRoleViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/Security/IfAuthenticatedViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/Security/IfHasRoleViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CaseViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CountViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CycleViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ElseViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/ConstraintSyntaxTreeNode.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/TranslateViewHelperFixtureForEmptyString.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/TranslateViewHelperFixtureForTranslatedString.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/FlashMessagesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ForViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/ButtonViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/CheckboxViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/ClassWithTwoGetters.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/EmptyClass.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/EmptySyntaxTreeNode.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/ExtendsAbstractEntity.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/UserDomainClass.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/FormFieldViewHelperBaseTestcase.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/HiddenViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/PasswordViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/RadioViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SubmitViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextareaViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextfieldViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/BytesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CaseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CropViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CurrencyViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesDecodeViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlspecialcharsViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/NumberViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PaddingViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PrintfViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/RawViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/StripTagsViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/UrlencodeViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/GroupedForViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/IfViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ImageViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/PageViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/TypolinkViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/RenderChildrenViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/RenderViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfAuthenticatedViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfHasRoleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/SpacelessViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/SwitchViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ThenViewHelperTest.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/TranslateViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/EmailViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/ExternalViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/PageViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/TypolinkViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Widget/Controller/PaginateControllerTest.php
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Header.html
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/SubHeader.html
typo3/sysext/fluid_styled_content/Resources/Private/Partials/MediaGallery.html
typo3/sysext/indexed_search/Classes/ViewHelpers/Format/DateTimeViewHelper.php
typo3/sysext/indexed_search/Classes/ViewHelpers/Format/FlagValueViewHelper.php
typo3/sysext/indexed_search/Classes/ViewHelpers/Format/GroupListViewHelper.php
typo3/sysext/indexed_search/Classes/ViewHelpers/PageBrowsingResultsViewHelper.php
typo3/sysext/indexed_search/Classes/ViewHelpers/PageBrowsingViewHelper.php
typo3/sysext/indexed_search/Resources/Private/Templates/Administration/Statistic.html
typo3/sysext/install/Classes/Controller/Action/AbstractAction.php
typo3/sysext/install/Classes/View/StandaloneView.php [deleted file]
typo3/sysext/install/Classes/ViewHelpers/Be/ContainerViewHelper.php
typo3/sysext/install/Classes/ViewHelpers/ConstantViewHelper.php
typo3/sysext/install/Classes/ViewHelpers/File/ExistsViewHelper.php
typo3/sysext/install/Classes/ViewHelpers/File/ImageDimensionViewHelper.php
typo3/sysext/install/Classes/ViewHelpers/File/RelativePathViewHelper.php
typo3/sysext/install/Classes/ViewHelpers/File/SizeViewHelper.php
typo3/sysext/install/Classes/ViewHelpers/Format/CropViewHelper.php
typo3/sysext/install/Classes/ViewHelpers/Format/ImageMagickCommandsViewHelper.php
typo3/sysext/install/Classes/ViewHelpers/Format/PhpErrorCodeViewHelper.php
typo3/sysext/install/Classes/ViewHelpers/Object/ArrayValueByKeyViewHelper.php
typo3/sysext/install/Classes/ViewHelpers/PhpInfoViewHelper.php
typo3/sysext/install/Resources/Private/Layouts/Step.html
typo3/sysext/install/Resources/Private/Partials/Action/Common/StatusMessage.html
typo3/sysext/install/Tests/Unit/ViewHelpers/Format/PhpErrorCodeViewHelperTest.php
typo3/sysext/reports/Classes/ViewHelpers/IconViewHelper.php
typo3/sysext/reports/Resources/Private/Templates/Report/Detail.html
typo3/sysext/scheduler/Classes/ViewHelpers/ModuleLinkViewHelper.php
typo3/sysext/sys_note/Classes/ViewHelpers/DeleteLinkViewHelper.php
typo3/sysext/sys_note/Classes/ViewHelpers/EditLinkViewHelper.php

index 091a221..89ccc0e 100644 (file)
@@ -43,7 +43,8 @@
                "typo3/cms-composer-installers": "^1.2.5",
                "psr/http-message": "~1.0",
                "cogpowered/finediff": "~0.3.1",
-               "mso/idna-convert": "^0.9.1"
+               "mso/idna-convert": "^0.9.1",
+               "typo3fluid/fluid": "^1.0.3"
        },
        "require-dev": {
                "phpunit/phpunit": "~4.8.0",
        },
        "extra": {
                "typo3/class-alias-loader": {
-                       "always-add-alias-loader": true
+                       "always-add-alias-loader": true,
+                       "class-alias-maps": [
+                               "typo3/sysext/fluid/Migrations/Code/ClassAliasMap.php"
+                       ]
                },
                "branch-alias": {
                        "dev-master": "7.x-dev"
index 8f97c3c..8f4be59 100644 (file)
@@ -4,8 +4,8 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "41598b90e8e110bf0f35092212ce802c",
-    "content-hash": "2d42a93c330f37e0f0e74072652d123a",
+    "hash": "b3ee1a2e920605bac9c105764365761e",
+    "content-hash": "d06ab9b6a8fe495278326559effe7788",
     "packages": [
         {
             "name": "cogpowered/finediff",
                 "typo3"
             ],
             "time": "2015-11-03 21:19:57"
+        },
+        {
+            "name": "typo3fluid/fluid",
+            "version": "1.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/TYPO3Fluid/Fluid.git",
+                "reference": "7465b0c8564b34a5cfdadda21d63b91b8596ac76"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/TYPO3Fluid/Fluid/zipball/7465b0c8564b34a5cfdadda21d63b91b8596ac76",
+                "reference": "7465b0c8564b34a5cfdadda21d63b91b8596ac76",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.0"
+            },
+            "require-dev": {
+                "mikey179/vfsstream": "*",
+                "phpunit/phpunit": "*",
+                "satooshi/php-coveralls": "*"
+            },
+            "bin": [
+                "bin/fluid"
+            ],
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "TYPO3Fluid\\Fluid\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "LGPL-3.0+"
+            ],
+            "description": "The TYPO3 Fluid template rendering engine",
+            "time": "2016-01-28 21:45:24"
         }
     ],
     "packages-dev": [
index 8e6e325..7c694ac 100644 (file)
@@ -17,12 +17,11 @@ use TYPO3\CMS\Backend\Backend\Avatar\Avatar;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Get avatar for backend user
  */
-class AvatarViewHelper extends AbstractViewHelper implements CompilableInterface
+class AvatarViewHelper extends AbstractViewHelper
 {
     /**
      * Resolve user avatar from backend user id.
index d9fd353..3f4d056 100644 (file)
@@ -15,14 +15,13 @@ namespace TYPO3\CMS\Belog\ViewHelpers\Be;
  */
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 use TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper;
 
 /**
  * Get page path string from page id
  * @internal
  */
-class PagePathViewHelper extends AbstractBackendViewHelper implements CompilableInterface
+class PagePathViewHelper extends AbstractBackendViewHelper
 {
     /**
      * Resolve page id to page path string (with automatic cropping to maximum given length).
index 41b4c8c..208b7df 100644 (file)
@@ -17,14 +17,13 @@ namespace TYPO3\CMS\Belog\ViewHelpers;
 use TYPO3\CMS\Backend\Template\DocumentTemplate;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 use TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper;
 
 /**
  * Display error icon from error integer value
  * @internal
  */
-class ErrorIconViewHelper extends AbstractBackendViewHelper implements CompilableInterface
+class ErrorIconViewHelper extends AbstractBackendViewHelper
 {
     /**
      * Renders an error icon link as known from the TYPO3 backend.
index 4557a4e..d37c108 100644 (file)
@@ -67,7 +67,7 @@ class TranslateLabelSelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\S
             return '';
         }
         $labelKey = $this->hasArgument('optionLabelPrefix') ? $this->arguments['optionLabelPrefix'] . $label : $label;
-        $translatedLabel = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($labelKey, $this->controllerContext->getRequest()->getControllerExtensionName());
+        $translatedLabel = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($labelKey, $this->renderingContext->getControllerContext()->getRequest()->getControllerExtensionName());
         return $translatedLabel ?: $label;
     }
 }
index f17eb67..866307f 100644 (file)
@@ -17,13 +17,12 @@ namespace TYPO3\CMS\Belog\ViewHelpers;
 use TYPO3\CMS\Belog\Domain\Model\LogEntry;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Create detail string from log entry
  * @internal
  */
-class FormatDetailsViewHelper extends AbstractViewHelper implements CompilableInterface
+class FormatDetailsViewHelper extends AbstractViewHelper
 {
     /**
      * Create formatted detail string from log row.
index b531d43..0d2e4ba 100644 (file)
@@ -24,13 +24,12 @@ use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Get history entry from for log entry
  * @internal
  */
-class HistoryEntryViewHelper extends AbstractViewHelper implements CompilableInterface
+class HistoryEntryViewHelper extends AbstractViewHelper
 {
     /**
      * Get system history record
index 9d0258c..c3e4f45 100644 (file)
@@ -17,13 +17,12 @@ namespace TYPO3\CMS\Belog\ViewHelpers;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Returns true, if a specific extension is loaded
  * @internal
  */
-class IsExtensionLoadedViewHelper extends AbstractViewHelper implements CompilableInterface
+class IsExtensionLoadedViewHelper extends AbstractViewHelper
 {
     /**
      * Checks whether an extension is loaded.
index 0275173..a9f1a92 100644 (file)
@@ -16,13 +16,12 @@ namespace TYPO3\CMS\Belog\ViewHelpers;
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Get username from backend user id
  * @internal
  */
-class UsernameViewHelper extends AbstractViewHelper implements CompilableInterface
+class UsernameViewHelper extends AbstractViewHelper
 {
     /**
      * First level cache of user names
index e67af94..c36d8e3 100644 (file)
@@ -16,13 +16,12 @@ namespace TYPO3\CMS\Belog\ViewHelpers;
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Get workspace title from workspace id
  * @internal
  */
-class WorkspaceTitleViewHelper extends AbstractViewHelper implements CompilableInterface
+class WorkspaceTitleViewHelper extends AbstractViewHelper
 {
     /**
      * First level cache of workspace titles
index b4c6c37..91de2da 100644 (file)
@@ -16,12 +16,11 @@ namespace TYPO3\CMS\Beuser\ViewHelpers;
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Get a value from an array by given key.
  */
-class ArrayElementViewHelper extends AbstractViewHelper implements CompilableInterface
+class ArrayElementViewHelper extends AbstractViewHelper
 {
     /**
      * Return array element by key. Accessed values must be scalar (string, int, float or double)
index 45dd608..f47054d 100644 (file)
@@ -16,13 +16,12 @@ namespace TYPO3\CMS\Beuser\ViewHelpers\Display;
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Converts comma separated list of pages uids to html unordered list (<ul>) with speaking titles
  * @internal
  */
-class PagesViewHelper extends AbstractViewHelper implements CompilableInterface
+class PagesViewHelper extends AbstractViewHelper
 {
     /**
      * Render unordered list for pages
index 1618ae7..4a876dd 100644 (file)
@@ -16,13 +16,12 @@ namespace TYPO3\CMS\Beuser\ViewHelpers\Display;
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Converts comma separated list of sys_filemounts uids to html unordered list (<ul>) with speaking titles
  * @internal
  */
-class SysFileMountsViewHelper extends AbstractViewHelper implements CompilableInterface
+class SysFileMountsViewHelper extends AbstractViewHelper
 {
     /**
      * Render unordered list for sys_filemounts
index 9043f9e..0ab1b72 100644 (file)
@@ -16,13 +16,12 @@ namespace TYPO3\CMS\Beuser\ViewHelpers\Display;
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Converts comma separated list of sys_language uids to html unordered list (<ul>) with speaking titles
  * @internal
  */
-class SysLanguageViewHelper extends AbstractViewHelper implements CompilableInterface
+class SysLanguageViewHelper extends AbstractViewHelper
 {
     /**
      * Render unordered list for sys_language
index 8544b83..ca49b17 100644 (file)
@@ -18,14 +18,13 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Edit Record ViewHelper, see FormEngine logic
  *
  * @internal
  */
-class EditRecordViewHelper extends AbstractViewHelper implements CompilableInterface
+class EditRecordViewHelper extends AbstractViewHelper
 {
     /**
      * Returns a URL to link to FormEngine
index 18a738a..50ebe98 100644 (file)
@@ -19,13 +19,12 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Render a link to DataHandler command
  * @internal
  */
-class IssueCommandViewHelper extends AbstractViewHelper implements CompilableInterface
+class IssueCommandViewHelper extends AbstractViewHelper
 {
     /**
      * Returns a URL with a command to TYPO3 Core Engine (tce_db.php)
index e3e5a31..1dff865 100644 (file)
@@ -17,7 +17,6 @@ namespace TYPO3\CMS\Beuser\ViewHelpers;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Render permission icon group (user / group / others) of the "Access" module.
@@ -25,7 +24,7 @@ use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
  * Most of that could be done in fluid directly, but this view helper
  * is much better performance wise.
  */
-class PermissionsViewHelper extends AbstractViewHelper implements CompilableInterface
+class PermissionsViewHelper extends AbstractViewHelper
 {
     /**
      * @var array Cached labels for a single permission mask like "Delete page"
@@ -46,7 +45,7 @@ class PermissionsViewHelper extends AbstractViewHelper implements CompilableInte
     }
 
     /**
-     * Implementing CompilableInterface suppresses object instantiation of this view helper
+     * Static rendering method
      *
      * @param array $arguments
      * @param \Closure $renderChildrenClosure
index 9d4e951..7689d80 100644 (file)
@@ -23,14 +23,13 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Displays 'Delete user' link with sprite icon to remove user
  *
  * @internal
  */
-class RemoveUserViewHelper extends AbstractViewHelper implements CompilableInterface
+class RemoveUserViewHelper extends AbstractViewHelper
 {
     /**
      * Render link with sprite icon to remove user
index e9437b0..6ba9676 100644 (file)
@@ -19,14 +19,13 @@ use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Domain\Model\BackendUser;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 use TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper;
 
 /**
  * Views sprite icon for a record (object)
  * @internal
  */
-class SpriteIconForRecordViewHelper extends AbstractBackendViewHelper implements CompilableInterface
+class SpriteIconForRecordViewHelper extends AbstractBackendViewHelper
 {
     /**
      * Displays spriteIcon for database table and object
index 839c2c7..4513c82 100644 (file)
@@ -21,13 +21,12 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Displays 'SwitchUser' link with sprite icon to change current backend user to target (non-admin) backendUser
  * @internal
  */
-class SwitchUserViewHelper extends AbstractViewHelper implements CompilableInterface
+class SwitchUserViewHelper extends AbstractViewHelper
 {
     /**
      * Render link with sprite icon to change current backend user to target
index a0e295a..dbdaf2e 100644 (file)
@@ -20,12 +20,11 @@ use TYPO3\CMS\Core\Type\Icon\IconState;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Displays icon identified by icon identifier
  */
-class IconViewHelper extends AbstractViewHelper implements CompilableInterface
+class IconViewHelper extends AbstractViewHelper
 {
     /**
      * Prints icon html for $identifier key
index 5da23f9..4e7b644 100644 (file)
@@ -181,7 +181,7 @@ return array(
                 ),
                 'fluid_template' => array(
                     'backend' => \TYPO3\CMS\Core\Cache\Backend\FileBackend::class,
-                    'frontend' => \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend::class,
+                    'frontend' => \TYPO3\CMS\Fluid\Core\Cache\FluidTemplateCache::class,
                     'groups' => array('system'),
                 ),
                 'extbase_object' => array(
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-69863-ChangesInViewHelpersPostFluidStandalone.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-69863-ChangesInViewHelpersPostFluidStandalone.rst
new file mode 100644 (file)
index 0000000..d1d8f65
--- /dev/null
@@ -0,0 +1,69 @@
+===============================================================
+Breaking: #69863 - changes in ViewHelpers post-standalone-Fluid
+===============================================================
+
+Description
+===========
+
+The following ViewHelpers have changed behaviours in Fluid:
+
+* The ``f:case`` ViewHelper does not support ``default`` argument any longer. To indicate which case is the default, use ``f:defaultCase``.
+* Tag content of ``f:render`` is no longer ignored and will be output if called with ``optional="1"``.
+* Arguments ``iconOnly`` and ``styleAttributes`` have been removed from ``f:be.buttons.csh``.
+* Argument ``alternateBackgroundColors`` has been removed from ``f:be.tableList``.
+* ViewHelpers no longer use the ``escapingInterceptorEnabled`` property but instead use ``escapeChildren`` and ``escapeOutput`` to control each behavior.
+
+The following ViewHelper classes are now only found in namespace ``TYPO3Fluid\Fluid\ViewHelpers`` and no longer exist in ``TYPO3\CMS\Fluid\ViewHelpers``:
+
+* ``TYPO3\CMS\Fluid\ViewHelpers\AliasViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\CaseViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\CommentViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\CycleViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\ForViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\GroupedForViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\IfViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\ThenViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\ElseViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\LayoutViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\SectionViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\SpacelessViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\Format\CdataViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlspecialcharsViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\Format\PrintfViewHelper``
+* ``TYPO3\CMS\Fluid\ViewHelpers\Format\RawViewHelper``
+
+Impact
+======
+
+* A warning about use of an unregistered argument ``default`` will be displayed if templates contain ``f:case`` with ``default`` argument.
+* Unexpected template output will be output if templates are rendered which contain ``<f:render partial/section optional="1">will be output now</f:render>``.
+* A warning about use of an unregistered argument ``iconOnly`` and/or ``styleAttributes`` will be displayed if templates contain ``f:be.buttons.csh`` with either argument.
+* A warning about use of an unregistered argument ``alternateBackgroundColors`` will be displayed if templates contain ``f:be.tableList`` with that argument.
+* Any third-party ViewHelpers subclassing any of the classes listed above must change parent class to new namespace.
+* Any third-party ViewHelpers using ``escapingInterceptorEnabled`` property to disable escaping.
+
+
+Affected Installations
+======================
+
+Any TYPO3 instance that uses a template which contains:
+
+* An ``f:case`` with ``default`` argument.
+* An ``f:render`` with ``optional="1"`` and having content in the ``<f:render>`` tag.
+* An ``f:be.buttons.csh`` with either ``iconOnly`` or ``styleAttributes`` (value irrelevant).
+* An ``f:be.tableList`` with ``alternateBackgroundColors`` (value irrelevant).
+* Any third-party ViewHelper which subclasses any of the classes listed above.
+* Any third-party ViewHelper which uses ``escapingInterceptorEnabled`` property to disable escaping.
+
+
+Migration
+=========
+
+* Remove the ``default`` option and change ``f:case`` to ``f:defaultCase`` for that case.
+* Remove the tag contents of ``f:render``.
+* Remove arguments ``iconOnly`` and ``styleAttributes`` from ``f:be.buttons.csh`` where found.
+* Remove argument ``alternateBackgroundColors`` from ``f:be.tableList`` where found.
+* Update namespace of parent class in ViewHelpers subclassing any of the classes listed above.
+* Update ViewHelper class to use ``escapeChildren`` and/or ``escapeOutput`` depending on desired behavior.
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-69863-FluidEscapingBehaviourChangedFromENT_COMPATToENT_QUOTES.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-69863-FluidEscapingBehaviourChangedFromENT_COMPATToENT_QUOTES.rst
new file mode 100644 (file)
index 0000000..032e011
--- /dev/null
@@ -0,0 +1,26 @@
+=================================================================================
+Breaking: #69863 - Fluid escaping behaviour changed from ENT_COMPAT to ENT_QUOTES
+=================================================================================
+
+Description
+===========
+
+The escaping behaviour in Fluid has been changed. Before, ENT_COMPAT was used. Now, ENT_QUOTES is used.
+
+
+Impact
+======
+
+Fluid templates which depend on single quotes not being escaped when escaping variables. Affects ObjectAccessor (variable access in general) and calls to ``f:format.htmlentities`` and  ``f:format.htmlspecialchars``.
+
+
+Affected Installations
+======================
+
+Any TYPO3 site containing Fluid templates which depend on single quotes not being escaped.
+
+
+Migration
+=========
+
+Change template to not depend on single quotes being escaped in any ObjectAccessor, consider adding ``{variable -> f:format.htmlspecialchars(keepQuotes: 1)}`` or ``<f:format.htmlspecialchars keepQuotes="1">{variable}</f:format.htmlentities>`` when accessing variables but be aware of possible XSS implications due to incomplete escaping.
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-69863-RemovedDeprecatedCodeFromExtfluid.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-69863-RemovedDeprecatedCodeFromExtfluid.rst
new file mode 100644 (file)
index 0000000..e6a31fe
--- /dev/null
@@ -0,0 +1,49 @@
+=========================================================
+Breaking: #69863 - Removed deprecated code from ext:fluid
+=========================================================
+
+Description
+===========
+
+Removed deprecated code from EXT:fluid
+
+The ChangeLog file has been removed.
+
+The renderMode option in ``FlashMessagesViewHelper`` has been removed.
+
+The following methods have been removed:
+
+``StandaloneView::setLayoutRootPath``
+``StandaloneView::getLayoutRootPath``
+``StandaloneView::setPartialRootPath``
+``StandaloneView::getPartialRootPath``
+``AbstractFormFieldViewHelper::getValue``
+
+The following class has been removed:
+
+``IconViewHelper``
+
+
+Impact
+======
+
+Using the methods above directly in any third party extension will result in a fatal error.
+
+Relying on the renderMode option might lead to different frontend output.
+
+
+Affected Installations
+======================
+
+Instances which use calls to the methods above, use the removed ``IconViewHelper or use the renderMode option in ``FlashMessagesViewHelper``.
+
+
+Migration
+=========
+
+For ``StandaloneView::setLayoutRootPath`` use ``StandaloneView::setLayoutRootPaths`` instead.
+For ``StandaloneView::getLayoutRootPath`` use ``StandaloneView::getLayoutRootPaths`` instead.
+For ``StandaloneView::setPartialRootPath`` use ``StandaloneView::setPartialRootPaths`` instead.
+For ``StandaloneView::getPartialRootPath`` use ``StandaloneView::setPartialRootPaths`` instead.
+
+For ``IconViewHelper`` use ``\TYPO3\CMS\Core\ViewHelpers\IconViewHelper`` instead.
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-69863-DeprecateGetTemplateVariableContainerFunction.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-69863-DeprecateGetTemplateVariableContainerFunction.rst
new file mode 100644 (file)
index 0000000..7a2f419
--- /dev/null
@@ -0,0 +1,26 @@
+=====================================================================
+Deprecation: #69863 - Deprecate getTemplateVariableContainer function
+=====================================================================
+
+Description
+===========
+
+``RenderingContext->getTemplateVariableContainer`` has been marked as deprecated in favor of getVariableProvider due to a changed concept for variable provisioning in standalone fluid. It now does more than just contain variables so a change in naming is necessary.
+
+
+Impact
+======
+
+Calling this method directly will trigger a deprecation log entry.
+
+
+Affected Installations
+======================
+
+Any TYPO3 instance using ``getTemplateVariableContainer`` method directly within an extension or third-party code.
+
+
+Migration
+=========
+
+Use ``getVariableProvider`` instead of ``getTemplateVariableContainer``.
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-69863-UseNewStandaloneFluidAsComposerDependency.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-69863-UseNewStandaloneFluidAsComposerDependency.rst
new file mode 100644 (file)
index 0000000..b37a7d3
--- /dev/null
@@ -0,0 +1,361 @@
+=================================================================
+Feature: #69863 - Use new standalone Fluid as composer dependency
+=================================================================
+
+Description
+===========
+
+The Fluid rendering engine of TYPO3 CMS is replaced by the standalone capable Fluid which is now included as composer dependency.
+The old Fluid extension is converted to a so-called Fluid adapter which allows TYPO3 CMS to use standalone Fluid with the many
+new features this facilitates.
+
+
+Impact
+======
+
+New features/capabilities have been added in nearly all areas of Fluid. Most importantly: several of the Fluid components which
+in the past were completely internal and impossible to replace, are now easy to replace and have been fitted with a public API.
+Unless noted otherwise each feature below is part of such a new API component which you can replace. This gives you unprecedented
+control over almost all of Fluid's behaviours in a way that can be controlled via each View instance, for example from within a
+controller's initializeView method.
+
+Developers working with just the template side of Fluid will not notice many differences. Those that they will notice are, for
+the most part, hidden away beneath a compatibility flag that is set via the View, allowing each extension to opt-in to the
+extended capabilities or to stick with the legacy behaviour of Fluid. The new features that relate to these new behaviours are:
+
+RenderingContext
+----------------
+
+The most important new piece of public API is the RenderingContext. The previously internal-only RenderingContext used by Fluid
+has been expanded to be responsible for a vital new Fluid feature: implementation provisioning. This enables a developer to
+change a range of classes Fluid uses for parsing, resolving, caching etc. by either including a custom RenderingContext or
+manipulating the default RenderingContext by public methods, a developer is able to change a range of classes Fluid uses for
+parsing, resolving, caching etc.
+
+Each component which can be replaced this way is described in further detail below.
+
+Impact for template developers
+==============================
+
+The following behaviours can all be controlled by manipulating the RenderingContext. By default, none of them are enabled - but
+calling a simple method (via your View instance) allows you to enable them:
+
+.. code-block:: php
+
+       $view->getRenderingContext()->setLegacyMode(false);
+
+Doing so causes the RenderingContext to deliver different implementations, which simply means that in addition to what you
+already know Fluid to be capable of (variable access, inline syntax etc.) you gain access to the following features:
+
+ExpressionNodes
+---------------
+
+Expression Nodes are a new type of Fluid syntax structures which all share a common trait: they only work inside the curly braces
+previously only used by variable accessing and inline syntax of ViewHelpers. You can define the exact collection of
+ExpressionNodes that are active for your rendering process, via the View instance:
+
+.. code-block:: php
+
+       $view->getRenderingContext()->setExpressionNodeTypes(array(
+               'Class\Number\One',
+               'Class\Number\Two'
+       ));
+
+When added to this collection these Expression Node types allow new syntaxes such as ``{myVariable + 1}`` or
+``{myArrayLikeObject as array}``. When the legacy mode toggle when set to ``false`` this will enable the following
+expression types:
+
+1. CastingExpressionNode - this type allows casting a variable to certain types, for example to guarantee an integer or a
+   boolean. It is used simply with an ``as`` keyword: ``{myStringVariable as boolean}``, ``{myBooleanVariable as integer}`` and
+   so on. Attempting to cast a variable to an incompatible type causes a standard Fluid error.
+2. MathExpressionNode - this type allows basic mathematical operations on variables, for example ``{myNumber + 1}``,
+   ``{myPercent / 100}``, ``{myNumber * 100}`` and so on. An impossible expression returns an empty output.
+3. TernaryExpressionNode - this type allows an inline ternary condition which only operates on variables. The use case is "if
+   this variable then use that variable else use another variable". It is used as
+   ``{myToggleVariable ? myThenVariable : myElseVariable}``. Note that it does not support any nested expressions, inline
+   ViewHelper syntaxes or similar inside it - it must be used only with standard variables as input.
+
+Developers can add their own additional ExpressionNodeTypes. Each one consists of a pattern to be matched and methods dictated
+by an interface to process the matches - any existing ExpressionNode type can be used as reference.
+
+Namespaces are extensible
+-------------------------
+
+Fluid now allows each namespace alias (for example ``f:``) to be extended by adding to it additional PHP namespaces that are
+also checked for the presence of ViewHelper classes. This is what allows TYPO3 CMS to transparently add just the ViewHelpers that
+are unique to TYPO3 CMS and let Fluid add the rest. It also means that developers can override individual ViewHelpers with custom
+versions and have their ViewHelpers called when the ``f:`` namespace is used.
+
+This change also implies that namespaces are no longer monadic - any time you use ``{namespace f=My\Extension\ViewHelpers}`` you
+will no longer receive an error with "namespace already registered". Fluid will instead add this PHP namespace and look for
+ViewHelpers there as well. Additional namespaces are checked from the bottom up, allowing the additional namespaces to override
+ViewHelper classes by placing them in the same scope (e.g. ``f:format.nl2br`` can be overridden with
+``My\Extension\ViewHelpers\Format\Nl2brViewHelper`` given the namespace registration example above.
+
+The behaviour is used both for legacy namespace registration in curly braces and the modern ``xmlns`` approach using a
+container HTML tag.
+
+Rendering using f:render
+------------------------
+
+This specific ViewHelper is fundamentally different in the standalone Fluid version - in the default (current) usage scenarios
+it behaves completely like you are used to, but has been fitted with some major impact features that you can use whenever you
+want to, in any template.
+
+There are two specific changes both documented in their respective commits:
+
+1. Default content (when section/partial is missing) now possible - https://github.com/TYPO3Fluid/Fluid/commit/cd67f9d974bc489058bde1c4272b480eb349da09
+2. Tag content of ``f:render`` can now be passed as a variable to the section/partial being rendered (essentially becoming a
+   wrapping/block strategy) - https://github.com/TYPO3Fluid/Fluid/commit/454121cba81baed4e3fe526412ff3e14f7c499a9
+
+All TagBasedViewHelpers natively support data- prefixed attributes
+------------------------------------------------------------------
+
+Simply put - any TagBasedViewHelper can now receive ``data-`` prefixed attributes without requiring those attributes to be
+declared by the ViewHelper. Any suffix can be used as long as the prefix is ``data-``.
+
+Complex conditional statements
+------------------------------
+
+As a forced new feature - which is backwards compatible - Fluid now supports any degree of complex conditional statements with
+nesting and grouping:
+
+.. code-block:: xml
+
+       <f:if condition="({variableOne} && {variableTwo}) || {variableThree} || {variableFour}">
+               // Done if both variable one and two evaluate to true, or if either variable three or four do.
+       </f:if>
+
+In addition, ``f:else`` has been fitted with an "elseif"-like behavior:
+
+.. code-block:: xml
+
+       <f:if condition="{variableOne}">
+               <f:then>Do this</f:then>
+               <f:else if="{variableTwo}">Do this instead if variable two evals true</f:else>
+               <f:else if="{variableThree}">Or do this if variable three evals true</f:else>
+               <f:else>Or do this if nothing above is true</f:else>
+       </f:if>
+
+Dynamic variable name parts
+---------------------------
+
+Another forced new feature, likewise backwards compatible, is the added ability to use sub-variable references when accessing
+your variables. Consider the following Fluid template variables array:
+
+.. code-block:: php
+
+       $mykey = 'foo'; // or 'bar', set by any source
+       $view->assign('data', ['foo' => 1, 'bar' => 2]);
+       $view->assign('key', $mykey);
+
+With the following Fluid template:
+
+.. code-block:: xml
+
+       You chose: {data.{key}}.
+       (output: "1" if key is "foo" or "2" if key is "bar")
+
+The same approach can also be used to generate dynamic parts of a string variable name:
+
+.. code-block:: php
+
+       $mydynamicpart = 'First'; // or 'Second', set by any source
+       $view->assign('myFirstVariable', 1);
+       $view->assign('mySecondVariable', 2);
+       $view->assign('which', $mydynamicpart);
+
+With the following Fluid template:
+
+.. code-block:: xml
+
+       You chose: {my{which}Variable}.
+       (output: "1" if which is "First" or "2" if which is "Second")
+
+This syntax can be used anywhere a variable is referenced, with one exception: variables passed as pure variable accessors cannot
+contain dynamic parts, e.g. the following will **NOT** work:
+
+.. code-block:: xml
+
+       {f:if(condition: my{which}Variable, then: 'this', else: 'that')}
+
+Whereas the following **will** work because the variables are accessed wrapped in a text node:
+
+.. code-block:: xml
+
+       {f:if(condition: '{my{which}Variable}', then: 'this', else: 'that')}
+
+In other words: unless your outer variable reference is enclosed with curly braces, Fluid does not detect that you are
+referencing a dynamic variable and will instead assume you meant a variable actually named ``my{which}Variable`` which was added
+as ``$view->assign('my{which}Variable', 'value')``.
+
+New ViewHelpers
+---------------
+
+A few new ViewHelpers have been added to the collection as part of standalone Fluid and as such are also available in TYPO3 from now on:
+
+* ``f:or`` which is a shorter way to write (chained) conditions. It supports syntax like
+  ``{variableOne -> f:or(alternative: variableTwo) -> f:or(alternative: variableThree)}`` which checks each variable and outputs
+  the first one that's not empty.
+* ``f:spaceless`` which can be used in tag-mode around template code to eliminate redundant whitespace and blank lines for
+  example caused by indenting ViewHelper usages.
+
+Improved error reporting
+------------------------
+
+Syntax errors or problems with required arguments or incorrect argument types will now be reported with line number and template
+code example from the line that fails. Any ViewHelper Exception is turned into this improved error type by converting it to a
+special syntax error and attaching the original Exception to it.
+
+An example error could be:
+
+``TYPO3Fluid\Fluid\Core\Parser\Exception: Fluid parse error in template Default_action_Default_1cb8dc11e29962882f629f79c0b9113ff33d6219,
+line 11 at character 3. Error: The ViewHelper "<f:serender>" could not be resolved. Based on your spelling, the system would load
+the class "TYPO3Fluid\Fluid\ViewHelpers\SerenderViewHelper", however this class does not exist. (1407060572). Template code:
+<f:serender section="Foo" optional="1">``. A stack trace is still included if TYPO3 does not run in Production context.
+
+Impact for extension developers
+===============================
+
+Extension developers are affected mainly by gaining access to a range of new APIs that control Fluid's behavior. These new APIs
+can all be accessed via the RenderingContext which is available in Views and ViewHelpers (also when compiled). Developers can
+provide custom implementations or manipulate the standard implementations by retrieving each API through the RenderingContext
+and using methods of those.
+
+There are no significant changes to best practices and the ViewHelper API (which you use when creating custom ViewHelpers)
+remains largely untouched. The most notable change is that ``$this->renderingContext`` in ViewHelpers and Views now allows direct
+access to on-the-fly changes in Fluid's behavior.
+
+RenderingContext as implementation API
+--------------------------------------
+
+Rather than just being a simple context which hangs on to variables, the RenderingContext has been given a completely new and
+even more vital role in Fluid - it is now the API for delivering custom implementations for a range of features that until now
+were only possible to achieve via means like XCLASSing. A RenderingContext now delivers the following components:
+
+* The VariableProvider (previously known as TemplateVariableContainer, see below) used in rendering
+* The ViewHelperVariableContainer (already known) used in rendering
+* The ViewHelperResolver (new pattern) responsible for handling namespaces and resolving/creating ViewHelper instances
+  and arguments
+* The ViewHelperInvoker (new pattern) responsible for calling ViewHelpers (circumvented when ViewHelpers implement a custom
+  ``compile()`` method)
+* The TemplatePaths (new pattern) which is a template file resolving class that now contains resolving methods previously found
+  on the View itself
+* The TemplateParser (already known) which is responsible for parsing the template and creating a ParsedTemplate
+* The TemplateCompiler (already known) which is responsible for converting a ParsedTemplate to a native PHP class
+* The FluidCache (new pattern) which is a custom caching implementation compatible with TYPO3 caching frontends/backends
+  storing PHP files
+* An array of ExpressionNodeTypes (class names, new pattern) - see description of those above
+* An array of TemplateProcessors (instances, new pattern) which pre-process template source code before it gets handed off to the
+  TemplateParser, allowing things like extracting registered namespaces in custom ways.
+* The controller name, if one applies to the context
+* The controller action name, if one applies to the context
+* And for TYPO3 CMS only, the Extbase ControllerContext (which is as it has always been; contains a Request etc.).
+
+All (!) of which can be replaced with custom implementations and all of which are accessible through View and ViewHelpers alike.
+Just a few of the capabilities you gain:
+
+* You can create custom VariableProvider implementations which retrieve variables in new ways from new sources - Fluid itself now
+  includes a JSON-based VariableProvider as well as a ChainedVariableProvider which allows "plugging" multiple variable sources.
+* You can create a custom ViewHelperResolver implementation which can do things like automatically register namespaces that are
+  always available or change the way ViewHelper classes are detected, instantiated, how arguments are detected, and more.
+* You can create a custom ViewHelperInvoker implementation which calls ViewHelpers in new ways - combined with a custom
+  ViewHelperResolver this can for example allow non-ViewHelper classes to be used as if they actually were ViewHelpers.
+* You can create custom TemplatePaths implementations which for example read template sources not from the local file system but
+  from database, remote storage, zip files, whatever you desire.
+* You can replace the TemplateParser itself (but be careful if you do, obviously). There are no current use cases for this, but
+  the possibility exists.
+* You can replace the TemplateCompiler (be careful here too). No use case exists but this could be used to compile Fluid
+  templates to other things than PHP.
+* You can replace the Cache implementation - for example to cache compiled Fluid templates in memcache or a distributed cache
+  accessible by PHP opcache.
+* You can change which Expression Node types are possible to use in templates rendered with your context, for example disabling
+  ternary expressions or adding a custom type of expression of your own.
+* You can change which TemplateProcessors will be used to process templates when rendered with your context, to do whatever you
+  like - transform, analyse and so on the template source.
+
+All of these parts are possible to replace via the provided RenderingContext - you don't necessarily have to create your own -
+but when creating multiple implementations it is often easier to combine those in a custom RenderingContext and just provide
+that for your View.
+
+But perhaps most importantly, because all of these components are contained in the RenderingContext which is available to Views
+and ViewHelpers alike (also once compiled!), it becomes possible for your View or ViewHelpers to actually interact with the Fluid
+environment in powerful ways. To illustrate how powerful, you could create a single ViewHelper which: manipulates the Expression
+Node types usable in its tag content, changes the paths used to resolve Partials, registers a number of other ViewHelper
+namespaces, changes the variable source to be a JSON file or URL and adds a pre-processing class that triggers on every template
+source read from within the ViewHelper's tag contents, to strip some undesired namespace from third party Partials. And it could
+restore the context afterwards so that all of this only applies inside that ViewHelper's tag content.
+
+ViewHelper namespaces can be extended also from PHP
+---------------------------------------------------
+
+By accessing the ViewHelperResolver of the RenderingContext, developers can change the ViewHelper namespace inclusions on a
+global (read: per View instance) basis:
+
+.. code-block:: php
+
+       $resolver = $view->getRenderingContext()->getViewHelperResolver();
+       // equivalent of registering namespace in template(s):
+       $resolver->registerNamespace('news', 'GeorgRinger\News\ViewHelpers');
+       // adding additional PHP namespaces to check when resolving ViewHelpers:
+       $resolver->extendNamespace('f', 'My\Extension\ViewHelpers');
+       // setting all namespaces in advance, globally, before template parsing:
+       $resolver->setNamespaces(array(
+               'f' => array(
+                       'TYPO3Fluid\\Fluid\\ViewHelpers',
+                       'TYPO3\\CMS\\Fluid\\ViewHelpers',
+                       'My\\Extension\\ViewHelpers'
+               ),
+               'vhs' => array(
+                   'FluidTYPO3\\Vhs\\ViewHelpers',
+                   'My\\Extension\\ViewHelpers'
+               ),
+               'news' => array(
+                       'GeorgRinger\\News\\ViewHelpers',
+               );
+       ));
+
+By "extending" a namespace Fluid adds additional lookup namespaces when detecting ViewHelper classes and uses the last added path first, allowing you to replace ViewHelpers by placing a class with the same sub-name in your own ViewHelpers namespace that extends Fluid's. Doing so also allows you to change the arguments the ViewHelper accepts/requires.
+
+ViewHelpers can accept arbitrary arguments
+------------------------------------------
+
+This feature allows your ViewHelper class to receive any number of additional arguments using any names you desire. It works by
+separating the arguments that are passed to each ViewHelper into two groups: those that are declared using ``registerArgument``
+(or render method arguments), and those that are not. Those that are not declared are then passed to a special function -
+``handleAdditionalArguments`` - on the ViewHelper class, which in the default implementation throws an error if additional
+arguments exist. So by overriding this method in your ViewHelper you can change if and when the ViewHelper should throw an
+error on receiving unregistered arguments.
+
+This feature is also the one allowing TagBasedViewHelpers to freely accept arbitrary ``data-`` prefixed arguments without
+failing - on TagBased ViewHelpers, the ``handleAdditionalArguments`` method simply adds new attributes to the tag that gets
+generated and throws an error if any additional arguments which are neither registered nor prefixed with ``data-`` are given.
+
+ViewHelpers automatically compilable
+------------------------------------
+
+All ViewHelpers, including those you write yourself, are now automatically compilable. This means you no longer have to care
+about implementing the CompilableInterface or a custom ``compile()`` function, and that every Fluid template can now be cached
+to a compiled PHP script regardless of ViewHelpers.
+
+ViewHelpers still are able to define a custom ``compile()`` function but are no longer required to do so. When they don't define
+such a method, an execution is chosen which is identical in performance to calling the ViewHelper from a template that before
+this could not be compiled. The ViewHelpers that do define a custom compiling method can further increase performance.
+
+When you explicitly require a ViewHelper of yours to prevent template caching it is possible to implement a custom ``compile()``
+method which calls ``$templateParser->disable();` and nothing else. Doing this disables the compiling inside the scope (template,
+partial or section) currently being rendered.
+
+New and more efficient escaping
+-------------------------------
+
+Contrary to earlier versions of Fluid which used a ViewHelperNode for ``f:format.htmlentities`` around other nodes it wished to
+escape, standalone Fluid has implemented a custom SyntaxTreeNode type which does the escaping in a more efficient manner
+(directly using ``htmlentities``). Although it means you cannot override this escaping behaviour by overriding the
+``f:format.htmlentities`` ViewHelper (which is completely possible to do with Fluid now) it should mean a significant boost to
+performance as it avoids an excessive amount of ViewHelper resolving and -rendering operations, replacing them with a single PHP
+function call wrapped in a tiny class, which compiles also to a single function call and which compiles in a way that it wraps
+the compiled output of the Node it escapes as a pure string operation.
+
+Escaping interception is still contained within the ``Configuration`` instance given to the TemplateParser - and those can be
+manipulated with a custom RenderingContext (see above).
index ce06436..1ed7551 100644 (file)
@@ -16,14 +16,13 @@ namespace TYPO3\CMS\Cshmanual\ViewHelpers;
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Format the given content
  *
  * @internal
  */
-class FormatViewHelper extends AbstractViewHelper implements CompilableInterface
+class FormatViewHelper extends AbstractViewHelper
 {
     /**
      * Disable the escaping interceptor
index 7baad7a..c2fba2d 100644 (file)
@@ -19,7 +19,6 @@ use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * ViewHelper to display all download links for a document
@@ -28,7 +27,7 @@ use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
  *
  * @internal
  */
-class FormatsViewHelper extends AbstractViewHelper implements CompilableInterface
+class FormatsViewHelper extends AbstractViewHelper
 {
     /**
      * Renders all format download links.
index 05e76da..1e64ec7 100644 (file)
@@ -56,8 +56,8 @@ class DebuggerUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
             $parameters[$i] = $argument;
         }
 
-        /** @var $arguments \TYPO3\CMS\Fluid\Core\ViewHelper\Arguments */
-        $arguments = $this->getMock(\TYPO3\CMS\Fluid\Core\ViewHelper\Arguments::class, array('dummy'), array('arguments' => $parameters));
+        /** @var $arguments \ArrayAccess */
+        $arguments = $this->getMock('ArrayAccess');
 
         $arguments->expects($this->never())->method('rewind');
         $this->debugger->var_dump($arguments, null, 8, true, false, true);
index 921e414..4f78ac7 100644 (file)
@@ -16,13 +16,12 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers\Format;
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * View Helper for imploding arrays
  * @internal
  */
-class ImplodeViewHelper extends AbstractViewHelper implements CompilableInterface
+class ImplodeViewHelper extends AbstractViewHelper
 {
     /**
      * Implodes a string
index 99084f0..cb3cb3a 100644 (file)
@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers\Format;
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Wrapper for PHPs json_encode function.
@@ -24,7 +23,7 @@ use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
  * @see http://www.php.net/manual/en/function.json-encode.php
  * @internal
  */
-class JsonEncodeViewHelper extends AbstractViewHelper implements CompilableInterface
+class JsonEncodeViewHelper extends AbstractViewHelper
 {
     /**
      * Constructor
index 8032747..cfee8c6 100644 (file)
@@ -16,14 +16,13 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Returns a string meant to be used as css class stating whether an extension is
  * available or installed
  * @internal
  */
-class InstallationStateCssClassViewHelper extends AbstractViewHelper implements CompilableInterface
+class InstallationStateCssClassViewHelper extends AbstractViewHelper
 {
     /**
      * Returns string meant to be used as css class
index bbad26d..b34f33c 100644 (file)
@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
 
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Shows the elapsed time since the last update of the extension repository
@@ -24,7 +23,7 @@ use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
  *
  * @internal
  */
-class TimeSinceLastUpdateViewHelper extends AbstractViewHelper implements CompilableInterface
+class TimeSinceLastUpdateViewHelper extends AbstractViewHelper
 {
     /**
      * Render method
index 2fefd16..c8006b3 100644 (file)
@@ -20,14 +20,13 @@ use TYPO3\CMS\Extensionmanager\Domain\Model\Dependency;
 use TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Shows the version numbers of the TYPO3 dependency, if any
  *
  * @internal
  */
-class Typo3DependencyViewHelper extends AbstractViewHelper implements CompilableInterface
+class Typo3DependencyViewHelper extends AbstractViewHelper
 {
     /**
      * Finds and returns the suitable TYPO3 versions of an extension
index d64b160..07198b7 100755 (executable)
@@ -18,12 +18,11 @@ use Closure;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Class DeleteFileViewHelper
  */
-class DeleteFileViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper implements CompilableInterface
+class DeleteFileViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 {
     /**
      * Renders a link to delete the file
index 3cb532b..c516ddb 100644 (file)
@@ -19,12 +19,11 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Class EditFileContentViewHelper
  */
-class EditFileContentViewHelper extends AbstractViewHelper implements CompilableInterface
+class EditFileContentViewHelper extends AbstractViewHelper
 {
     /**
      * Renders a link to edit the file content
index a068fa4..2275e28 100644 (file)
@@ -19,12 +19,11 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Class EditSysFileMetadataRecordViewHelper
  */
-class EditSysFileMetadataRecordViewHelper extends AbstractViewHelper implements CompilableInterface
+class EditSysFileMetadataRecordViewHelper extends AbstractViewHelper
 {
     /**
      * Renders a link to edit sys_file_metadata
index b4a45d2..76f1295 100644 (file)
@@ -19,12 +19,11 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Class RenameFileViewHelper
  */
-class RenameFileViewHelper extends AbstractViewHelper implements CompilableInterface
+class RenameFileViewHelper extends AbstractViewHelper
 {
     /**
      * Renders a link to rename a file
index d7e8238..8fd0a10 100644 (file)
@@ -19,12 +19,11 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 
 /**
  * Class ReplaceFileViewHelper
  */
-class ReplaceFileViewHelper extends AbstractViewHelper implements CompilableInterface
+class ReplaceFileViewHelper extends AbstractViewHelper
 {
     /**
      * Renders a link to replace a file
diff --git a/typo3/sysext/fluid/ChangeLog b/typo3/sysext/fluid/ChangeLog
deleted file mode 100644 (file)
index c70402b..0000000
+++ /dev/null
@@ -1,585 +0,0 @@
-This file is not maintained anymore and is only here for backwards compatibility
-@deprecated since TYPO3 CMS 7, this file will be removed in TYPO3 CMS 8
-================================================================================
-
-ChangeLog for Fluid
-===================
-
-Changes for 6.2
-===============
-
-!!! Image view helper does not render title tag by default
-
-In previous versions of fluid the image view helper always rendered the
-title attribute. If not set, the value of the required alt attribute was set as
-title.
-This fallback was removed with version 6.2. If not specifically set, title
-is not rendered anymore.
-
-Full Changes for 6.2
-====================
-
-[TASK] Move language include to .xlf
-[TASK] Replace inject methods with @inject
-[FEATURE] Improve BE container view helper
-[TASK] Remove Comment for deprecation of f:translate key
-[!!!][FEATURE] Backport recursive and allowing empty validation from Flow
-[BUGFIX] ShortcutVH must not ignore options.enableBookmarks
-[TASK] Remove last bits of forceCharset handling
-[FEATURE] ViewHelper to display file sizes
-[TASK] Move ExtJS- & JavaScript from t3lib
-[FEATURE] Switch View Helper
-[BUGFIX] FormFieldVH->getPropertyValue() must work without form object
-[BUGFIX] Enable CheckboxViewHelper binding to ArrayObject and Null
-[TASK] Remove mention of template.php
-[BUGFIX] Remove second registration of argument 'placeholder'
-[FEATURE] Add placeholder argument to VH for Textarea and Textfield
-[FEATURE] ImageViewHelper removed title fallback onto alt tag
-[BUGFIX] Mentions of old class names
-[TASK] Reschedule the removal for the old property mapper
-
-Changes for 6.1.0
-=================
-
-[!!!][FEATURE] Allow Fluid arrays only in ViewHelper arguments
---------------------------------------------------------------
-
-This change greatly enhances the JavaScript compatibility of Fluid.
-
-Fluid Arrays are a subset of the JavaScript object syntax, making it
-hard to work with them in mixed HTML/JavaScript documents. For example
-before this change, the following JavaScript Object was parsed by Fluid::
-
-       var uris = {
-         endPoint1: '{f:uri.action(.)}',
-         endPoint2: '{f:uri.action(.)}',
-       };
-
-Before this change, the above snippet resulted in the following template,
-as the generated array was casted to a string:
-
-       var uris = Array
-
-With this change, Fluid only parses arrays which are used inside
-ViewHelper arguments, such that an array inside normal text is not
-converted anymore.
-
-Breaking Change
-===============
-
-This change is only breaking in very rare cases where one relied on
-the inner contents of the ViewHelper being an array, f.e. if one used
-the debug ViewHelper as follows::
-
-       <f:debug>{key1: 'value1', key2: 'value2'}</f:debug>
-
-. or if anybody wrote custom ViewHelpers which use this convention.
-
-Relying on that would be very fragile anyways, as the insertion of a
-single space character before the opening curly bracket or after the
-closing one would cast the array back to a string.
-
-ViewHelpers which were written like this should be re-written to take
-the array as ViewHelper argument::
-
-       <f:debug value="{key1: 'value1', key2: 'value2'}" />
-
-Full Changes for 6.1.0
-======================
-
-[BUGFIX] Fluid must not use legacy flash message handling
-[BUGFIX] Don't use folders as templates, partials and layouts
-[TASK] Use __DIR__ instead of dirname(__FILE__)
-[TASK] Add namespaing to ConfigurationManagerInterface
-[TASK] Remove further t3lib mentions
-[TASK] Update t3lib mentions
-[TASK] Adjust Comments to describe string comparison
-[CLEANUP] Drop incomplete tests
-[BUGFIX] Add needed setting to handle file_references correctly
-[BUGFIX] Add needed setting to handle file_references correctly
-[TASK] Remove not maintained md5 in ext_emconf
-[BUGFIX] Incomplete mock reset in StandaloneViewTest
-[BUGFIX] FormViewHelper creates inline styling
-[BUGFIX] PHP 5.4 E_STRICT warning in HtmlViewHelper
-[TASK] Cleanup fluid
-[FEATURE] Adjustable decimals for view helper format.currency
-[TASK] Update examples in ValidationResults ViewHelper
-[TASK] Sync TYPO3 CMS Fluid with Flow Fluid 1.1 (part3)
-[TASK] Sync CMS Fluid with Flow Fluid 1.1 (part2)
-[TASK] Add test for GroupedForViewHelper to support DateTime Objects
-[TASK] Replace ObjectManager create with get
-[BUGFIX] Apply arguments to the default string
-[TASK] Clean up Unit tests in fluid
-[FEATURE] Complete the Property Mapper whitelist change for fluid
-[BUGFIX] Follow-up typo to #45316
-[TASK] Sync CMS Fluid with Flow Fluid 1.1 (part1)
-[FEATURE] Support literal strings in boolean arguments
-[TASK] Add dataproviders for 2 tests in DateViewHelperTest
-[BUGFIX] Skip a SelectViewHelperTest on Mac
-[BUGFIX] Unit test fails with broken timezone
-[BUGFIX] Wrong numbers in BE paginage widget
-[BUGFIX] Remove superfluous newline
-[BUGFIX] Date ViewHelper not using configured Timezones
-[BUGFIX] Fix typo and improve backup of system settings
-[FEATURE] Introduce prepend option for Select ViewHelper
-[BUGFIX] Remove PHP Error caused by setlocale call
-[BUGFIX] Incomplete locale backup in unit test
-[BUGFIX] selectViewHelper sorting should respect locales
-Revert "[TASK] Adjust failing test"
-[TASK] Adjust failing test
-[BUGFIX] Image viewhelper clears $GLOBALS['TSFE'] in backend context
-[TASK] Update version to 6.1.0-dev
-
-Changes for 1.4.0:
-==================
-included in TYPO3 4.6.0
-
-This change features numerous cleanups, and the following new features:
-
-Compilation of Fluid Templates to PHP files
--------------------------------------------
-
-This adds a compile step to the parsing process of templates, layouts and
-partials.
-If no compiled cache file exists, Fluid will create it while parsing the
-respective Fluid template.
-The cache file is invalidated as soon as the template/layout/partial
-has been modified (or if caches are flushed).
-This speeds up the rendering process by factor 2-5, and reduces memory
-consumption drastically.
-
-!!! $this->arguments->hasArgument() removed
--------------------------------------------
-
-AbstractViewHelper::$arguments are no longer an object but an array.
-
-If you used $this->arguments->hasArgument() in your custom ViewHelpers,
-you'll have to replace this with $this->hasArgument().
-
-THIS IS A BREAKING CHANGE.
-
-!!! Introduction of {_all} Variable
------------------------------------
-
-You can now use {_all} inside your template to access all variables available
-right now. This is especially helpful for debugging:
-
-    {_all -> f:debug()}
-
-or for passing all currently available variables to a partial:
-
-    <f:render partial="..." arguments="{_all}" />
-
-This is only a breaking change if you used a variable _all inside your own
-templates.
-
-Widgets: Allow overriding templateRootPath
-------------------------------------------
-It is now possible to override the widget template root path via the framework
-configuration, for example:
-
-    plugin.tx_extension.view {
-      widget.<WidgetViewHelperClassName>.templateRootPath=...
-    }
-
-Full Changes from 1.4.0 beta1 to 1.4.0:
-=======================================
-[TASK] Update version to 1.4.0-rc1
-[TASK] Increase version number
-[BUGFIX] Create new CObject in CObject ViewHelper
-[BUGFIX] Fix Doc comment in format.padding ViewHelper
-[BUGFIX] ViewHelper: Make SelectViewHelper use property paths as arguments
-[FEATURE] Add parameter to RenderViewHelper for optional sections
-[BUGFIX] Sanitize identifier when compiling templates
-[BUGFIX] use $for only when not empty and not NULL
-[+BUGFIX] disable cache when displaying FlashMessages in frontend
-[+FEATURE] Comment ViewHelper
-[TASK] Remove fluid autoloader
-[+TASK] Marking Fluid as "stable" instead of "beta"
-[+BUGFIX] Incorrect type of Error thrown (FLOW3 Error)
-[BUGFIX] Make textfield view helper handle zero (not empty) values
-
-Full Changes for 1.4.0 beta1:
-=============================
-
-[!!!][FEATURE] Compilation of Fluid templates to PHP files. Resolves: #28545
-[TASK] Minor cleanups
-[TASK] Tweak inline comment in TemplateView
-[!!!][+FEATURE] Add a reserved variable {_all} returning all template variables
-[BUGFIX] Deactivate EscapeInterceptor for certain ViewHelpers. Related: #27678
-[TASK] Split escape ViewHelper into dedicated format ViewHelpers. Related: #27628
-[BUGFIX] Whitespace fixes
-[FEATURE] IconViewHelper (BE) should support CSS-sprites. Resolves: #9957
-[TASK] Code Cleanup in TemplateView
-[+BUGFIX] Use of depreciated function debug in debugViewHelper. Fixes: #27970
-[BUGFIX] Fix Widget support. Resolves: #27783
-[TASK] Recreate ext_autoload.php. Related: #27680
-[+FEATURE] (ViewHelpers): Adjust Fluid to new Property Mapper. Related: #27656
-[+TASK] Fluid: Make use of newly introduced Extension Service. Related: #13864
-[+BUGFIX] Fix unit tests
-[TASK] Fluid: Use strpos() instead of strstr() where possible
-[TASK] Make TextboxViewHelper a subclass of TextFieldViewHelper
-[TASK] (ViewHelper): Code Cleanup to AbstractFormField ViewHelper
-[TASK] (Core): Code Cleanup in AbstractTagBasedViewHelper
-[+BUGFIX] (Core): Condition improvements. Resolves: #27557
-[TASK] Cleanup and small improvements to Interceptors
-[TASK] Comment and non-functional changes
-[+BUGFIX] Empty a tag ends with /> instead of </a>. Resolves: #27556
-[BUGFIX] Better error message for "unknown section" exception
-[+BUGFIX] Fluid (Core): Simplify debugging of exceptions thrown during render
-[+BUGFIX] Fluid: Fix CObjViewHelper. Fixes: #26138
-[+FEATURE] Widgets: Allow overriding templateRootPath. Thanks to Peter B├╝cker. Resolves: #10823
-[FEATURE] PaddingViewHelper: allow padding-type right/left/both. Resolves: #9283
-[BUGFIX] Fix documentation for BE-ViewHelpers. Resolves: #9942
-[~TASK] Update jQuery versions
-[+BUGFIX] CObjViewHelper: fixed using numeric values as data argument. Fixes: #12891
-[+BUGFIX] ActionMenuItemViewHelper: XHTML compliance in "selected" attribute value. Fixes: #8744
-[+BUGFIX] Fluid: CObjViewHelper fix deprecated call "getAccessibleProperties". Fixes: #26138
-[!!!][+TASK] Fluid v4 (Core): Make layout UpperCamelCase (with fallback)
-[~TASK] Fluid: Raising version from 1.3.0 to 1.4.0-devel
-[+FEATURE] Fluid (ViewHelpers): Add RawViewHelper
-[+FEATURE] Fluid v4 (Core): Set layoutName by variable
-
-
-
-Changes for 1.3.0:
-==================
-included in TYPO3 4.5.0 LTS.
-
-Here, only smaller bugs and inconsistencies have been fixed. For a description of bigger features, see below to the versions where they were introduced.
-
-Full Changes for 1.3.0:
-=======================
-
-[+TASK] Fluid (ViewHelpers): fixed typo in doc comment examples of emailViewhelper
-[+BUGFIX] Fluid (Tests): Fixed CropViewHelper unit test
-[+BUGFIX] Fixed comparison of Objects
-       Objects in comparison expressions were compared lazily
-       with == before this change. Now, they are compared with
-       ===, which is the expected behavior on objects.
-[+TASK] Fluid (ViewHelpers): Extended inline documentation of FlashMessages ViewHelper
-[+BUGFIX] Fluid (Tests): Fixed Fluid unit tests!
-
-Changes for 1.3.0 RC1:
-======================
-included in TYPO3 4.5.0 RC1.
-
-This change contains numerous bugfixes, most notably fixes the Widget
-Bootstrap and the Standalone View (which is used in "FLUIDTEMPLATE").
-
-Full Changes for 1.3.0 RC1:
-===========================
-
-[+BUGFIX] Fluid (View): Fix StandaloneView
-       Since implementation of Dependency Injection the Fluid
-       Standalone view was broken in some cases, cause it did not
-       properly initialize all needed objects.
-       Fixes: #11520
-[+BUGFIX] Fluid (Core): Allow ViewHelpers to be placed in t3lib and tslib
-       The Fluid template parser does now recognize ViewHelpers inside t3lib/
-       or sysext/cms/tslib/, so Fluid can now be used inside the TYPO3 core.
-       Thanks to Andreas Wolf for the patch!
-       Resolves: #12061
-[+BUGFIX] Fluid (Widget): Adopt Widget Bootstrap to Extbase Bootstrap changes
-       Problem: The configureObjectManager method in Tx_Fluid_Core_Widget_Bootstrap
-       uses a call on a static method Tx_Extbase_Object_Container_Container::getContainer()
-       which doesn't exist anymore. The Container has become a t3lib_Singleton.
-       This patch changes the behavior, and makes it work again.
-       Thanks to Thomas Maroschik for the patch!
-       Resolves: #11991
-
-Changes for 1.3.0 Beta 4:
-=========================
-included in TYPO3 4.5.0 Beta 4.
-
-This change contains numerous bugfixes.
-
-Full Changes for 1.3.0 Beta 4:
-==============================
-
-[~TASK] Fluid (Tests): Fixed some testcase class names
-[+FEATURE] Fluid (ViewHelpers): prepend URIs with scheme if it's not specified in link.external / uri.external ViewHelpers. Resolves #10401
-[+TASK] Fluid (ViewHelpers): Fix, cleanup and extend inline documentation of ViewHelpers
-[+BUGFIX] Fluid (View): Fixed deprecation message about lowercase template files names
-
-Changes for 1.3.0 Beta 2:
-=========================
-included in TYPO3 4.5.0 Beta 2.
-
-The main change is the updating of the FlashMessage ViewHelper and concept:
-
-Since r3062 Extbase uses the t3lib_FlashMessageQueue to store flashmessages.
-Now you can output them including title and severity, making it possible
-to render flashmessages just like the ones from the core in BE mode.
-To keep backwards compatibility, the default rendering still outputs
-only the message bodies in an unordered list. Set the renderMode argument
-to "div" in order to display the new style:
-<f:flashMessages renderMode="div" />
-
-**********************************************************************************************
-*Extbase / Fluid 1.3.0 can now ONLY BE USED WITH TYPO3 4.5, as the older versions do not have*
-*the FlashMessageQueue available!                                                            *
-**********************************************************************************************
-
-Full Changes for 1.3.0 Beta 2:
-==============================
-[+BUGFIX] Fluid (ViewHelpers/Widget): widget.link and widget.uri no create relative URLs
-[+FEATURE] Fluid (ViewHelpers): Add render mode to FlashMessage ViewHelper
-[-TASK] Fluid: Removed all @scope annotations as they are not used in v4
-[+TASK] Fluid (View): Added additional check for deprecated lower case template filenames that works on case insensitive file systems (Windows) too. Watch your deprecation log in typo3conf and fix your template filenames if they're still lower case.
-[+BUGFIX]: explicitly cast offset to integer to avoid exceptions in paginate view helper
-
-
-Changes for 1.3.0 Beta 1a:
-==========================
-included in TYPO3 4.5.0 Beta 1.
-
-This Fluid Release contains the following main features, along with the usual bunch of bugfixes:
-
-* Fluid Widgets (see below)
-* Fluid Standalone View (in Fluid 1.3.0 Alpha 3, but has not been inside a TYPO3 Release yet)
-       In order to be able to use Fluid templates beyond the Extbase plugin context
-       (e.g. to render E-Mail templates or to use the new FLUIDTEMPLATE content object)
-       we created a new template view, that encapsulates inner workings and provides
-       an easy-to-use API:
-
-       $view = t3lib_div::makeInstance('Tx_Fluid_View_StandaloneView');
-       $view->setTemplatePathAndFilename('foo/Bar.html');
-       print $view->render();
-
-Fluid Widgets
--------------
-
-Widgets are special ViewHelpers which encapsulate complex functionality. It can be best understood
-what widgets are by giving some examples:
-* <f:widget.paginate> renders a Paginator, i.e. can be used to display large amounts of objects. This
-  is best known from search engines.
-* <f:widget.autocomplete> adds autocompletion functionality to a text field.
-* More widgets could include a Google Maps widget, a sortable grid, ...
-
-Internally, widgets consist of an own Controller and View part.
-
-Using widgets inside your templates is really simple: Just use them like standard ViewHelpers,
-and consult their documentation for usage examples. An example for the <f:widget.paginate> follows below:
-
-<f:widget.paginate itemsPerPage="10" objects="{blogs}" as="paginatedBlogs">
-       // use {paginatedBlogs} as you used {blogs} before, most certainly inside
-       // a <f:for> loop.
-</f:widget.paginate>
-
-In the above example, it looks like {blogs} contains all Blog objects, thus you might wonder if all
-objects were fetched from the database. However, the blogs are NOT fetched from the database until
-you actually use them, so the paginate ViewHelper will adjust the query sent to the database and
-receive only the small subset of objects. So, there is no negative performance overhead in using
-the Paginate Widget.
-
-For more details on how to write widgets, consult the Fluid manual, section "Fluid Widgets".
-
-Full Changes for 1.3.0 Beta 1a:
-===============================
-[+FEATURE] Fluid (ViewHelpers): the subject argument of the count ViewHelper is now optional so you can use it like {objects -> f:count()}
-[+BUGFIX] Fluid (ViewHelpers): Fixed inline documentation of widget.autocomplete ViewHelper. This fixes #10882
-[+TASK] Fluid (ViewHelpers): Added some more inline documentation for cObject, widget.paginate, widget.autocomplete & count ViewHelpers
-[+BUGFIX] Fluid (ViewHelpers): replaced two occurrences of Tx_Extbase_Dispatcher::*() by using the injected ConfigurationManager
-[+TASK] Fluid (ViewHelpers): uri.image now works in BE mode too
-[+BUGFIX] Fluid (ViewHelpers): Adjustment to skinning api change
-[+FEATURE] Fluid (ViewHelpers/Widget): Slightly improved paginate widget: The link to the first page now skips the currentPage argument resulting in nicer URLs and less cHashes
-[+FEATURE] Fluid (ViewHelpers): excluding obsolete widget arguments & cHash from widget links if they're not explicitly set
-[+BUGFIX] Fluid (Core/Widget): AjaxWidgetContextHolder now uses a unique id for the Ajax WidgetContext. This makes sure, that the ajax response gets the right context, even if you open multiple browser windows in the same session
-[+BUGFIX] Fluid (Core): The Fluid Widget Bootstrap now initializes the object manager in order to respect "config.tx_extbase.object" configuration.. TODO: this should be somehow refactored to avoid code duplication
-[+BUGFIX] Fluid: Reduced the typeNum for the fluidAjaxWidgetResponse page. Apparently 7076857368 was too large ;) TODO: the typeNum should be somehow configurable
-[~TASK] Fluid (ViewHelpers/Widget): removed $GLOBALS['TSFE']->additionalHeaderData call from AutocompleteViewHelper as this is not configurable like this. Moved the jQuery includes to Configuration/TypoScript/setup.txt which can be included in your main TS template
-[+BUGFIX] Fluid (ViewHelpers): Fixed Widget URI generation in widget.link/widget.uri ViewHelpers/Link/WidgetViewHelpers
-[~TASK] Fluid (ViewHelpers/Widget): Tweaked PaginateViewHelper: Minor refactoring of controller & template
-[-TASK] Fluid (Compatibility): Forgot to remove obsolete Tx_Fluid_Compatibility_ObjectManager in previous commit
-[+FEATURE] Fluid (Core/Widget): Added Tx_Fluid_Core_Widget_Bootstrap that is used to dispatch Ajax requests (see ext_typoscript_setup.txt).
-[~TASK] Fluid (Compatibility): Removed Tx_Fluid_Compatibility_ObjectManager and replaced instances by Tx_Extbase_Object_ObjectManagerInterface instances
-[~TASK] Fluid (Core/Widget): AbstractWidgetController has to be a singleton so it can be injected in the WidgetViewHelper.. To be discussed!
-[+TASK] Fluid (Core/Widget): AjaxWidgetContextHolder is now correctly stored in the BE/FE Users session if the ajaxWidget of the corresponding Widget is TRUE.
-[+TASK] Fluid (Core/Widget): The WidgetContext now contains a reference to the parent extension & plugin name. That's needed for the widgetAjaxResponse.
-[+BUGFIX] Fluid (Core/Widget): WidgetRequestBuilder now correctly interprets GET parameters and dispatches Ajax requests
-[+BUGFIX] Fluid (ViewHelpers): Modified ViewHelpers cObject, format.crop, format.html, image, uri.image so that they use dependency injection in order to retrieve the current cObject instance from the configurationManager
-[+BUGFIX] Fluid (ViewHelpers): Fixed form ViewHelper to respect configured pluginNamespace in field name prefixes
-[+BUGFIX] Fluid (ViewHelpers): link.widget/uri.widget ViewHelpers now create correct URIs
-[+BUGFIX] Fluid (ViewHelpers): replaced @inject annotation by injectController method in AutocompleteViewHelper.
-[+FEATURE] First step of "Fluid widget" backport
-       This is the first step of the Widget backport (#8773). This contains all the core classes that are required for the widget implementation and two exemplary Widget ViewHelpers "widget.paginate" and "widget.autocomplete".
-       Note: Ajax widgets are not yet working!!
-       Relates to: #8773
-       Relates to: #10568
-[!!!][+BUGFIX] Fluid (View): Adjust fluid to recent resolveView() backport
-       Tx_Fluid_View_AbstractTemplateView now implements the Tx_Extbase_MVC_View_ViewInterface that was changed in r2675.
-       NOTE: This is a breaking change because the API method Tx_Fluid_View_TemplateView::hasTemplate was renamed to canRender(). Besides I deleted the TemplateViewInterface that is no longer needed. Implement Tx_Extbase_MVC_View_ViewInterface or simply extend Tx_Fluid_View_AbstractTemplateView if you want to write your own view implementation
-       Relates to: #8990
-[+BUGFIX] Fluid: Adjust Fluid to Dependency Injection changes. Relates to: #9062
-
-Changes for 1.3.0 Alpha 3:
-==========================
-[+BUGFIX] Fluid (ViewHelpers): ImageViewHelper supports additionalAttributes argument
-       The image view helper did not call the parent constructor, which registeres the "additionalAttributes" argument. Thanks to Michael Knoll.
-[+FEATURE] Fluid (View): Fluid Standalone view (#10473)
-[+TASK] Fluid (ViewHelpers): Minor tweak in CObject ViewHelper
-       Make sure, that the configurationManager is initialized.
-       This is just a preliminary solution that will be replaced as soon
-       as the Extbase dispatcher refactoring (#7153) is done.
-
-Changes for 1.3.0 Alpha 2:
-==========================
-included in TYPO3 4.5.0 Alpha 2.
-
-In this release, mostly small bugfixes have been made in Fluid. Highlights are:
-
- * {settings} is now automatically in partials. (#6289)
-
- * You can now use <f:security.ifAuthenticated> and <f:security.ifHasRole role="foo"> (#9143)
-   in your Fluid templates to check whether an FE user is currently logged in / belongs to the
-   specified usergroup.
-   Note: if "role" is a numeric value the uid of the usergroup is compared, otherwise the title
-   of the usergroup.
-   To deal with BE users you can use the respective be.security.* view helpers
-
- * Boolean expressions can now contain negative numbers. Resolves #9434.
-
-Full Changes:
--------------
-
-[+FEATURE] Fluid (Core): {settings} is available in Partials
-Now, the {settings} are automatically available in partials and sections.
-Before, they had to be passed explicitely, i.e. by calling
-<f:render section="..." arguments="{settings: settings}" />.
-If somebody defined his own "settings"-argument, this still takes precedence:
-<f:render section="..." arguments="{settings: some.different.settings}" />
-This means that this change is completely backwards compatible.
-NOTE: The settings are NOT merged together, like it has been suggested in #6289,
-as this will lead to un-obvious behavior for the user.
-
-[-API] Fluid (Core): Remove getTemplateParser() method.
-This method has accidentally gotten an @api annotation,
-and was only needed for the Viewhelpertest package.
-Now, this package is cleaned up, and this method can be
-completely thrown away.
-
-[+BUGFIX] Fluid (ViewHelpers): Fix bug in Form ViewHelper
-Since #6521 you can use the "objectName" argument to specify the name of a bound object rather then using the "name" attribute.
-But if you do so, the rendered hidden identity field is not correct anymore. This behavior is fixed with this commit.
-Resolves: #9515
-
-* Documentation Cleanup
-
-[+FEATURE] Fluid (ViewHelpers): Backported ifAuthenticated & ifHasRole security ViewHelpers
-you can now use <f:security.ifAuthenticated> and <f:security.ifHasRole role="foo">
-in your Fluid templates to check whether an FE user is currently logged in / belongs to the
-specified usergroup.
-Note: if role is a numeric value the uid of the usergroup is compared, otherwise the title
-of the usergroup.
-to deal with BE users you can use the respective be.security.* view helpers
-Resolves #9143
-
-[TASK] Fluid (Core): Regular Expression performance improvements
-In rare cases, on some systems (like mine), the
-PCRE parser reproducably crashes if one passes very
-long argument strings into it, or very complex ones.
-With this patch, the parser is slightly modified
-to decrease the use of backtracking; which then avoids
-the crashes mostly.
-
-[TASK] Fluid (Core): Formatted Regular Expressions more nicely
-There were some undocumented regular expressions
-in the parser, which needed to be formatted nicely.
-
-[+BUGFIX] Fluid (Core): Boolean expressions can now contain negative numbers. Resolves #9434.
-Boolean expressions with negative numbers did not work so far.
-Now, they work as expected. Example from Viewhelpertest which displayed
-a wrong result before, and now displays the correct result:
-<f:if condition="{testVariables.number.minusOne} < -1.1">
-       <f:then>Then part!</f:then>
-       <f:else>Else part!</f:else>
-</f:if>
-Issue: #9434
-
-
-
-Changes for 1.3.0 Alpha 1
-=========================
-included in TYPO3 4.5.0 Alpha 1.
-
-In this release, numerous bugs have been fixed, making Fluid more stable than ever. Below are some nice features which have been introduced:
-
-* Instead of <f:form name="...">, you should now write write <f:form objectName="...">, to create an XHTML compliant form (#6521)
-
-* The <f:for>-ViewHelper has now Iteration Information available, if you want that:
-  <f:for each="{objects}" as="object" iteration="iteration">
-     {iteration.index} is a counter which starts at 0
-     {iteration.cycle} is a counter which starts at 1
-     {iteration.isEven} / {iteration.isOdd} is a boolean variable which is true if the index is even/odd
-     {iteration.isFirst} / {iteration.isLast} is a boolean variable which is true if it is the first or last element in the list.
-  </f:for>
-
-!!! Refactored all Condition-ViewHelpers like f:if, f:security.if* to use a newly created base class F3\Fluid\Core\ViewHelper\ConditionViewHelper. This greatly simplifies the implementation of custom conditions.
-  THIS IS A BREAKING CHANGE in case you copied the f:if ViewHelper to create a custom condition ViewHelper, as the internal workings changed. Please check the new f:if ViewHelper to see how to adjust your ViewHelper -- you basically just have to throw away a lot of code. Resolves #8824.
-
-* Fixed section, partial and layout rendering to function in all cases as expected now, and tested this behavior also.
-  !!! Removed renderSection() and renderWithLayout() from public API in Tx_Fluid_View_TemplateView, as this should only be called from inside Fluid.
-
-* Fixing checkbox, radio and select-ViewHelpers, but this task is not finished yet.
-  !!! The value argument is required again in form.checkbox and form.radio ViewHelpers. This is a breaking change, as the value argument has not been mandatory for a while. But it probably won't break existing templates as omitting the value makes no sense at all.
-
-* Fixed BE support of ViewHelpers (cObject, format.crop, uri.resource, format.html, image)
-
-* Negative numeric values are now properly converted to FALSE when used in boolean ViewHelper arguments.
-
-* added f:uri.image ViewHelper, working just like f:image, but returning the URL and not the full image tag.
-
-Full Changes:
--------------
-[~TASK] Fluid: Changed version of Extbase dependency from '1.2.0-1.2.999' to '1.3.0.devel' to reflect the version scheme defined in the wiki. Relates to #9152.
-[+BUGFIX] Fluid (View): AbstractTemplateView now correctly implements F3\FLOW3\MVC\View\ViewInterface and assign() and assignMultiple() will return an instance of $this to allow chaining again like $this->view->assign()->assign()... This fixes #9090 (backported from Fluid package r4931)
-[~TASK] Fluid (Tests): committing modified AbstractFormFieldViewHelperTest that I forgot to add in previous commit
-[+TASK] Fluid (ViewHelpers): Small performance improvement in ForViewHelper: Objects will only be converted to arrays if reverse is TRUE. Relates to #8732 (backported from Fluid package r4907)
-[+TASK] Fluid (View): Added getter for template parser to AbstractTemplateView. This is useful if you want to use the parser from within your custom ViewHelper (creating a new instance would skip interceptor registration) (backported from Fluid package r4907)
-[~TASK] Fluid (ViewHelpers): Added argument "objectName" to form ViewHelper. This is now the recommended way to specify the name of the object that is bound to a form! If objectName is not specified, the name attribute will be used as object name for backwards-compatibility reasons. This resolves #6521 (backported from Fluid package r4905)
-* Raised Fluid version in trunk to 1.3.0-devel
-[+BUGFIX] Fluid (ViewHelpers): Fixed a possible security issue where the content inside the Fluid a is not properly HTML escaped.
-[+FEATURE] Fluid (ViewHelpers): Added iteration information to for ViewHelper. Thanks to all the contributors for your input and patches! This resolves #6149 (backported from Fluid package r4904)
-[~TASK] Fluid (ViewHelpers): Fresh backport from Fluid package r4899 (Mostly fixed typos. slightly improved count ViewHelper)
-[~TASK] Fluid (ViewHelpers): Replaced custom convertToArray() method by PHPs iterator_to_array() function in cycle, for and groupedFor ViewHelpers. This resolves #8732. (backport from Fluid package r4898)
-[+BUGFIX] Fluid (ViewHelpers): Now, it is possible to "unselect" checkboxes and multiselect fields in editing forms. This fixes #5638. This fixes #8535. This fixes #6897 (improved forward-backport from Fluid package r4874)
-[+TASK] Fluid (Tests): Backported FormViewHelperTest from Fluid package
-[+BUGFIX] Fluid (ViewHelpers): FormViewHelper wraps hidden fields with a div tag to create XHTML valid output. This fixes #5512 (backported from Fluid package)
-[~TASK] Fluid (ViewHelpers): Fixed BE support of the ViewHelpers cObject, format.crop, uri.resource. Relates to #8947
-[~TASK] Fluid (ViewHelpers): Added BE support in the ViewHelpers format.html and image. Relates to #8947
-[!!!][+TASK] Fluid (ViewHelpers): The value argument is required again in form.checkbox and form.radio ViewHelpers. This is a breaking change, as the value argument has not been mandatory for a while. But it probably won't break existing templates as omitting the value makes no sense at all. Relates to #8852 (backported from Fluid package r4864)
-[+FEATURE] Fluid (Core): implemented overrideArgument() method in AbstractViewHelper to be able to override previously registered arguments in subclasses. This resolves #8852 (backported from Fluid package r4864)
-[+BUGFIX] Fluid (Core): Negative numeric values are properly converted to FALSE when used in boolean ViewHelper arguments. This resolves #8893 (backported from Fluid package r4864)
-[+BUGFIX] Fluid (ViewHelpers): Reversed the rendering order of header and childNodes in be.container ViewHelper to enable child nodes to modify the pageRenderer. This resolves #8880 (thanks to Andreas Wolf)
-[+BUGFIX] Fluid: Removed leading slash from @var annotations that were backported by mistake
-[+BUGFIX] Fluid: Replaced SplObjectStorage by Tx_Extbase_Persistence_ObjectStorage to be PHP 5.2-compatible (which ships with a broken implementation of SplObjectStorage)
-[!!!][~TASK] Fluid (Core): Renamed ConditionViewHelper and TagBasedViewHelper to Abstract*ViewHelper as per CGL. (backported from Fluid package r4840). To be backwards-compatible, TagBasedViewHelper.php still exists and will write an entry to TYPO3s deprecation log if used. Please adapt your custom ViewHelpers and inherit from AbstractTagBasedViewHelper instead of TagBasedViewHelper. This resolves #8834
-[~TASK] Fluid: Marked vfs unit tests to be skipped, as vfs is not part of v4 (yet)
-[-TASK] Fluid: Removed @package/@subpackage annotations from all Fluid classes. They have already been removed in FLOW3 packages in r2813.
-[-TASK] Fluid: Removed @version annotation from all Fluid classes to ease the backporting process. Relates to #8835 (backported from Fluid package)
-[+BUGFIX] Fluid (View): fixed method signature of AbstractTemplateView:getTemplateSource() that was different from the concrete implementation (backported from Fluid package)
-Fluid in v5 and v4 are now synchronized again!
-[+FEATURE] Fluid: The TemplateVariableContainer now provides a method to retrieve all variables.
-[~TASK] Fluid (Core): Introduced a RenderingContextInterface to more cleanly decouple Fluid's rendering context from the TypoScript rendering context. Note that view helpers (and other code) should now refer to that interface instead of the concrete Fluid implementation!
-[!!!][+BUGFIX] Fluid (Core): Refactored all Condition-ViewHelpers like f:if, f:security.if* to use a newly created base class F3\Fluid\Core\ViewHelper\ConditionViewHelper. This greatly simplifies the implementation of custom conditions. However, THIS IS A BREAKING CHANGE in case you copied the f:if ViewHelper to create a custom condition ViewHelper, as the internal workings changed. Please check the new f:if ViewHelper to see how to adjust your ViewHelper -- you basically just have to throw away a lot of code. Resolves #8824.
-[!!!][-API] Fluid (TemplateView): Removed renderSection() and renderWithLayout() from public API in Tx_Fluid_View_TemplateView, as this should only be called from inside Fluid.
-[!!!][TASK] Fluid (ViewHelpers): the <f:section />-ViewHelper now does NOT render itself anymore when encountered in a normal template. Example: Before the change, the template "before <f:section name='...'> middle </f:section> after" was rendered as "before middle after", but now it is only rendered as "before after". Although this is a breaking change, it is quite unlikely that anybody relied on this behavior, as it was inconsistent beforehand.
-[TASK] Fluid (TemplateView): Major refactoring of the layout, partial and section rendering mechanism. This also induces a speedup as retundant rendering is eliminated.
-[+FEATURE] Fluid (ViewHelpers): The <f:render>-ViewHelper can be now used to render sections in the same partial and template. In these cases, all arguments need to be specified explicitely. Additionally, it can now be used to render a section recursively.
-[~TASK] Fluid (Core): Removed some non-API-methods which were never called.
-[+FEATURE] Fluid (ViewHelpers): format.crop ViewHelper now supports all features in Backend mode. Relates to #8648
-[+TASK] Fluid: Set dependency to Extbase 1.2.x in ext_emconf.php to avoid confusions when working with different versions
-[+TASK] Fluid: Backported recent changes from Fluid package:
-[+FEATURE] Fluid (ViewHelpers): added "selectAllByDefault" argument to form.select ViewHelper. Resolves #4984
-~TASK] Fluid (Parser): Got rid of the constructor in Parser\Configuration.
-[+FEATURE] Fluid (ViewHelpers): Added uri.image ViewHelper. This resolves #8233
-[+FEATURE] Fluid (ViewHelpers): Added URI options noCache, noCacheHash, section, format, additionalParams, absolute, addQueryString & argumentsToBeExcludedFromQueryString to FormViewHelper. Resolves #8247 [+BUGFIX] Fluid: Removed a leading backslash in ViewHelperBaseTestcase that led to an error with PHP < 5.3
-[+TASK] Fluid: Backported some recent Fluid changes (Note: this is not a complete backport, there are still changes in Fluid Package that are not backported yet):
-[+BUGFIX] Fluid (ViewHelpers): form.select ViewHelper did only check whether "multiple" attribute was set and not whether it was empty or not. Resolves #5879
-[+FEATURE] Fluid (ViewHelpers): GroupedForViewHelper can now group by object. Resolves #7389
-
-
-HOW TO CREATE THE CHANGELOG
-===========================
-git log [startRevision]..HEAD --pretty=format:"%s%n%b%n" | grep -v "^$" | grep -v "git-svn-id"
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php b/typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php
deleted file mode 100644 (file)
index b092252..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Compatibility;
-
-/*                                                                        *
- * This script is part of the TYPO3 project - inspiring people to share!  *
- *                                                                        *
- * TYPO3 is free software; you can redistribute it and/or modify it under *
- * the terms of the GNU General Public License version 2 as published by  *
- * the Free Software Foundation.                                          *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
- * Public License for more details.                                       *
- *                                                                        */
-
-/**
- * Class extending the docbook generator service for use in typo3 v4.
- *
- * Usage in TypoScript:
- *
- * config.disableAllHeaderCode = 1
- * page = PAGE
- * page.10 = USER_INT
- * page.10.userFunc = \TYPO3\CMS\Fluid\Compatibility\DocbookGeneratorService->userFunc
- *
- * @internal
- */
-class DocbookGeneratorService extends \TYPO3\CMS\Fluid\Service\DocbookGenerator
-{
-    /**
-     *
-     * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-     */
-    protected $objectManager;
-
-    /**
-     * User function
-     *
-     * @return string
-     */
-    public function userFunc()
-    {
-        $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
-        $this->injectDocCommentParser($this->objectManager->get(\TYPO3\CMS\Extbase\Reflection\DocCommentParser::class));
-        $this->injectReflectionService($this->objectManager->get(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class));
-        return $this->generateDocbook(\TYPO3\CMS\Fluid\ViewHelpers::class);
-    }
-
-    /**
-     * Get class names within namespace
-     *
-     * @param string $namespace
-     * @return array
-     */
-    protected function getClassNamesInNamespace($namespace)
-    {
-        $namespaceParts = explode('\\', $namespace);
-        if ($namespaceParts[count($namespaceParts) - 1] == '') {
-        }
-        $classFilePathAndName = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(\TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($namespaceParts[2])) . 'Classes/';
-        $classFilePathAndName .= implode(array_slice($namespaceParts, 3, -1), '/') . '/';
-        $classNames = array();
-        $this->recursiveClassNameSearch($namespace, $classFilePathAndName, $classNames);
-        sort($classNames);
-        return $classNames;
-    }
-
-    /**
-     * Search recursivly class names within namespace
-     *
-     * @param string $namespace
-     * @param string $directory
-     * @param array $classNames
-     * @return void
-     */
-    private function recursiveClassNameSearch($namespace, $directory, &$classNames)
-    {
-        $dh = opendir($directory);
-        $counter = 0;
-        while (($file = readdir($dh)) !== false) {
-            if ($file == '.' || $file == '..' || $file == '.svn') {
-                continue;
-            }
-            if (is_file($directory . $file)) {
-                if (substr($file, 0, 8) == 'Abstract') {
-                    continue;
-                }
-                $classNames[] = $namespace . substr($file, 0, -4);
-            } elseif (is_dir($directory . $file)) {
-                $this->recursiveClassNameSearch($namespace . $file . '\\', $directory . $file . '/', $classNames);
-            }
-        }
-        closedir($dh);
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Compatibility/TemplateParserBuilder.php b/typo3/sysext/fluid/Classes/Compatibility/TemplateParserBuilder.php
deleted file mode 100644 (file)
index 1a93cfc..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Compatibility;
-
-/*                                                                        *
- * This script is part of the TYPO3 project - inspiring people to share!  *
- *                                                                        *
- * TYPO3 is free software; you can redistribute it and/or modify it under *
- * the terms of the GNU General Public License version 2 as published by  *
- * the Free Software Foundation.                                          *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
- * Public License for more details.                                       *
- *                                                                        */
-/**
- * Build a template parser.
- * Use this class to get a fresh instance of a correctly initialized Fluid template parser.
- */
-class TemplateParserBuilder
-{
-    /**
-     * Creates a new TemplateParser which is correctly initialized. This is the correct
-     * way to get a Fluid parser instance.
-     *
-     * @return \TYPO3\CMS\Fluid\Core\Parser\TemplateParser A correctly initialized Template Parser
-     */
-    public static function build()
-    {
-        /** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */
-        $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
-        $templateParser = $objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\TemplateParser::class);
-        return $templateParser;
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Cache/FluidTemplateCache.php b/typo3/sysext/fluid/Classes/Core/Cache/FluidTemplateCache.php
new file mode 100644 (file)
index 0000000..e98c281
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+namespace TYPO3\CMS\Fluid\Core\Cache;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Cache\Exception\InvalidDataException;
+use TYPO3\CMS\Core\Cache\Frontend\PhpFrontend;
+use TYPO3Fluid\Fluid\Core\Cache\FluidCacheInterface;
+
+/**
+ * Class FluidTemplateCache
+ *
+ * Connector class that enables the TYPO3 cache called "fluid_template" to be operated with the
+ * interface appropriate for the Fluid engine.
+ */
+class FluidTemplateCache extends PhpFrontend implements FluidCacheInterface
+{
+    /**
+     * @param null $name
+     * @return void
+     */
+    public function flush($name = null)
+    {
+        parent::flush();
+    }
+
+    /**
+     * @param string $entryIdentifier
+     * @return mixed
+     */
+    public function get($entryIdentifier)
+    {
+        return $this->requireOnce($entryIdentifier);
+    }
+
+    /**
+     * @param string $entryIdentifier
+     * @param string $sourceCode
+     * @param array $tags
+     * @param int $lifetime
+     * @throws InvalidDataException
+     */
+    public function set($entryIdentifier, $sourceCode, array $tags = array(), $lifetime = null)
+    {
+        if (strpos($sourceCode, '<?php') === 0) {
+            // Remove opening PHP tag; it is added by the cache backend to which
+            // we delegate and would be duplicated if not removed.
+            $sourceCode = substr($sourceCode, 6);
+        }
+        parent::set($entryIdentifier, $sourceCode, $tags, time() + 86400);
+    }
+}
diff --git a/typo3/sysext/fluid/Classes/Core/Compiler/AbstractCompiledTemplate.php b/typo3/sysext/fluid/Classes/Core/Compiler/AbstractCompiledTemplate.php
deleted file mode 100644 (file)
index bda2964..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Compiler;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-/**
- * Abstract Fluid Compiled template.
- *
- * INTERNAL!!
- */
-abstract class AbstractCompiledTemplate implements \TYPO3\CMS\Fluid\Core\Parser\ParsedTemplateInterface
-{
-    /**
-     * @var array
-     */
-    protected $viewHelpersByPositionAndContext = array();
-
-    // These tokens are replaced by the Backporter for implementing different behavior in TYPO3 v4
-    /**
-     * @var \TYPO3\CMS\Extbase\Object\Container\Container
-     */
-    protected static $objectContainer;
-
-    /**
-     * @var string
-     */
-    protected static $defaultEncoding = null;
-
-    /**
-     * Public such that it is callable from within closures
-     *
-     * @param int $uniqueCounter
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @param string $viewHelperName
-     * @return \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
-     * @internal
-     */
-    public function getViewHelper($uniqueCounter, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext, $viewHelperName)
-    {
-        if (self::$objectContainer === null) {
-            self::$objectContainer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\Container\Container::class);
-        }
-        if (isset($this->viewHelpersByPositionAndContext[$uniqueCounter])) {
-            if ($this->viewHelpersByPositionAndContext[$uniqueCounter]->contains($renderingContext)) {
-                $viewHelper = $this->viewHelpersByPositionAndContext[$uniqueCounter][$renderingContext];
-                $viewHelper->resetState();
-                return $viewHelper;
-            } else {
-                $viewHelperInstance = self::$objectContainer->getInstance($viewHelperName);
-                if ($viewHelperInstance instanceof \TYPO3\CMS\Core\SingletonInterface) {
-                    $viewHelperInstance->resetState();
-                }
-                $this->viewHelpersByPositionAndContext[$uniqueCounter]->attach($renderingContext, $viewHelperInstance);
-                return $viewHelperInstance;
-            }
-        } else {
-            $this->viewHelpersByPositionAndContext[$uniqueCounter] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class);
-            $viewHelperInstance = self::$objectContainer->getInstance($viewHelperName);
-            if ($viewHelperInstance instanceof \TYPO3\CMS\Core\SingletonInterface) {
-                $viewHelperInstance->resetState();
-            }
-            $this->viewHelpersByPositionAndContext[$uniqueCounter]->attach($renderingContext, $viewHelperInstance);
-            return $viewHelperInstance;
-        }
-    }
-
-    /**
-     * @return bool
-     */
-    public function isCompilable()
-    {
-        return false;
-    }
-
-    /**
-     * @return bool
-     */
-    public function isCompiled()
-    {
-        return true;
-    }
-
-    /**
-     * @return string
-     * @internal
-     */
-    public static function resolveDefaultEncoding()
-    {
-        if (static::$defaultEncoding === null) {
-            static::$defaultEncoding = 'UTF-8';
-        }
-        return static::$defaultEncoding;
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Compiler/TemplateCompiler.php b/typo3/sysext/fluid/Classes/Core/Compiler/TemplateCompiler.php
deleted file mode 100644 (file)
index bafc5d2..0000000
+++ /dev/null
@@ -1,430 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Compiler;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-class TemplateCompiler implements \TYPO3\CMS\Core\SingletonInterface
-{
-    const SHOULD_GENERATE_VIEWHELPER_INVOCATION = '##should_gen_viewhelper##';
-
-    /**
-     * @var \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend
-     */
-    protected $templateCache;
-
-    /**
-     * @var int
-     */
-    protected $variableCounter = 0;
-
-    /**
-     * @var array
-     */
-    protected $syntaxTreeInstanceCache = array();
-
-    /**
-     * @param \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend $templateCache
-     * @return void
-     */
-    public function setTemplateCache(\TYPO3\CMS\Core\Cache\Frontend\PhpFrontend $templateCache)
-    {
-        $this->templateCache = $templateCache;
-    }
-
-    /**
-     * @param string $identifier
-     * @return bool
-     */
-    public function has($identifier)
-    {
-        $identifier = $this->sanitizeIdentifier($identifier);
-        return $this->templateCache->has($identifier);
-    }
-
-    /**
-     * @param string $identifier
-     * @return \TYPO3\CMS\Fluid\Core\Parser\ParsedTemplateInterface
-     */
-    public function get($identifier)
-    {
-        $identifier = $this->sanitizeIdentifier($identifier);
-        if (!isset($this->syntaxTreeInstanceCache[$identifier])) {
-            $this->templateCache->requireOnce($identifier);
-            $templateClassName = 'FluidCache_' . $identifier;
-            $this->syntaxTreeInstanceCache[$identifier] = new $templateClassName();
-        }
-        return $this->syntaxTreeInstanceCache[$identifier];
-    }
-
-    /**
-     * @param string $identifier
-     * @param \TYPO3\CMS\Fluid\Core\Parser\ParsingState $parsingState
-     * @return void
-     */
-    public function store($identifier, \TYPO3\CMS\Fluid\Core\Parser\ParsingState $parsingState)
-    {
-        $identifier = $this->sanitizeIdentifier($identifier);
-        $this->variableCounter = 0;
-        $generatedRenderFunctions = '';
-
-        if ($parsingState->getVariableContainer()->exists('sections')) {
-            $sections = $parsingState->getVariableContainer()->get('sections');
-            // @todo refactor to $parsedTemplate->getSections()
-            foreach ($sections as $sectionName => $sectionRootNode) {
-                $generatedRenderFunctions .= $this->generateCodeForSection($this->convertListOfSubNodes($sectionRootNode), 'section_' . sha1($sectionName), 'section ' . $sectionName);
-            }
-        }
-        $generatedRenderFunctions .= $this->generateCodeForSection($this->convertListOfSubNodes($parsingState->getRootNode()), 'render', 'Main Render function');
-        $convertedLayoutNameNode = $parsingState->hasLayout() ? $this->convert($parsingState->getLayoutNameNode()) : array('initialization' => '', 'execution' => 'NULL');
-
-        $classDefinition = 'class FluidCache_' . $identifier . ' extends \\TYPO3\\CMS\\Fluid\\Core\\Compiler\\AbstractCompiledTemplate';
-
-        $templateCode = <<<EOD
-%s {
-
-public function getVariableContainer() {
-       // @todo
-       return new \TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer();
-}
-public function getLayoutName(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface \$renderingContext) {
-\$currentVariableContainer = \$renderingContext->getTemplateVariableContainer();
-%s
-return %s;
-}
-public function hasLayout() {
-return %s;
-}
-
-%s
-
-}
-EOD;
-        $templateCode = sprintf($templateCode,
-                $classDefinition,
-                $convertedLayoutNameNode['initialization'],
-                $convertedLayoutNameNode['execution'],
-                ($parsingState->hasLayout() ? 'TRUE' : 'FALSE'),
-                $generatedRenderFunctions);
-        $this->templateCache->set($identifier, $templateCode);
-    }
-
-    /**
-     * Replaces special characters by underscores
-     *
-     * @see http://www.php.net/manual/en/language.variables.basics.php
-     * @param string $identifier
-     * @return string the sanitized identifier
-     */
-    protected function sanitizeIdentifier($identifier)
-    {
-        return preg_replace('([^a-zA-Z0-9_\\x7f-\\xff])', '_', $identifier);
-    }
-
-    /**
-     * @param array $converted
-     * @param string $expectedFunctionName
-     * @param string $comment
-     * @return string
-     */
-    protected function generateCodeForSection(array $converted, $expectedFunctionName, $comment)
-    {
-        $templateCode = <<<EOD
-/**
- * %s
- */
-public function %s(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface \$renderingContext) {
-\$self = \$this;
-\$currentVariableContainer = \$renderingContext->getTemplateVariableContainer();
-
-%s
-
-return %s;
-}
-
-EOD;
-        return sprintf($templateCode, $comment, $expectedFunctionName, $converted['initialization'], $converted['execution']);
-    }
-
-    /**
-     * Returns an array with two elements:
-     * - initialization: contains PHP code which is inserted *before* the actual rendering call. Must be valid, i.e. end with semi-colon.
-     * - execution: contains *a single PHP instruction* which needs to return the rendered output of the given element. Should NOT end with semi-colon.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $node
-     * @return array two-element array, see above
-     * @throws \TYPO3\CMS\Fluid\Exception
-     */
-    protected function convert(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $node)
-    {
-        if ($node instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode) {
-            return $this->convertTextNode($node);
-        } elseif ($node instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NumericNode) {
-            return $this->convertNumericNode($node);
-        } elseif ($node instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode) {
-            return $this->convertViewHelperNode($node);
-        } elseif ($node instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode) {
-            return $this->convertObjectAccessorNode($node);
-        } elseif ($node instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ArrayNode) {
-            return $this->convertArrayNode($node);
-        } elseif ($node instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode) {
-            return $this->convertListOfSubNodes($node);
-        } elseif ($node instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\BooleanNode) {
-            return $this->convertBooleanNode($node);
-        } else {
-            throw new \TYPO3\CMS\Fluid\Exception('Syntax tree node type "' . get_class($node) . '" is not supported.');
-        }
-    }
-
-    /**
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode $node
-     * @return array
-     * @see convert()
-     */
-    protected function convertTextNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode $node)
-    {
-        return array(
-            'initialization' => '',
-            'execution' => '\'' . $this->escapeTextForUseInSingleQuotes($node->getText()) . '\''
-        );
-    }
-
-    /**
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NumericNode $node
-     * @return array
-     * @see convert()
-     */
-    protected function convertNumericNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NumericNode $node)
-    {
-        return array(
-            'initialization' => '',
-            'execution' => $node->getValue()
-        );
-    }
-
-    /**
-     * Convert a single ViewHelperNode into its cached representation. If the ViewHelper implements the "Compilable" facet,
-     * the ViewHelper itself is asked for its cached PHP code representation. If not, a ViewHelper is built and then invoked.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $node
-     * @return array
-     * @see convert()
-     */
-    protected function convertViewHelperNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $node)
-    {
-        $initializationPhpCode = '// Rendering ViewHelper ' . $node->getViewHelperClassName() . LF;
-
-        // Build up $arguments array
-        $argumentsVariableName = $this->variableName('arguments');
-        $initializationPhpCode .= sprintf('%s = array();', $argumentsVariableName) . LF;
-
-        $alreadyBuiltArguments = array();
-        foreach ($node->getArguments() as $argumentName => $argumentValue) {
-            $converted = $this->convert($argumentValue);
-            $initializationPhpCode .= $converted['initialization'];
-            $initializationPhpCode .= sprintf('%s[\'%s\'] = %s;', $argumentsVariableName, $argumentName, $converted['execution']) . LF;
-            $alreadyBuiltArguments[$argumentName] = true;
-        }
-
-        foreach ($node->getUninitializedViewHelper()->prepareArguments() as $argumentName => $argumentDefinition) {
-            if (!isset($alreadyBuiltArguments[$argumentName])) {
-                $initializationPhpCode .= sprintf('%s[\'%s\'] = %s;', $argumentsVariableName, $argumentName, var_export($argumentDefinition->getDefaultValue(), true)) . LF;
-            }
-        }
-
-        // Build up closure which renders the child nodes
-        $renderChildrenClosureVariableName = $this->variableName('renderChildrenClosure');
-        $initializationPhpCode .= sprintf('%s = %s;', $renderChildrenClosureVariableName, $this->wrapChildNodesInClosure($node)) . LF;
-
-        if ($node->getUninitializedViewHelper() instanceof \TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface) {
-            // ViewHelper is compilable
-            $viewHelperInitializationPhpCode = '';
-            $convertedViewHelperExecutionCode = $node->getUninitializedViewHelper()->compile($argumentsVariableName, $renderChildrenClosureVariableName, $viewHelperInitializationPhpCode, $node, $this);
-            $initializationPhpCode .= $viewHelperInitializationPhpCode;
-            if ($convertedViewHelperExecutionCode !== self::SHOULD_GENERATE_VIEWHELPER_INVOCATION) {
-                return array(
-                    'initialization' => $initializationPhpCode,
-                    'execution' => $convertedViewHelperExecutionCode
-                );
-            }
-        }
-
-        // ViewHelper is not compilable, so we need to instanciate it directly and render it.
-        $viewHelperVariableName = $this->variableName('viewHelper');
-
-        $initializationPhpCode .= sprintf('%s = $self->getViewHelper(\'%s\', $renderingContext, \'%s\');', $viewHelperVariableName, $viewHelperVariableName, $node->getViewHelperClassName()) . LF;
-        $initializationPhpCode .= sprintf('%s->setArguments(%s);', $viewHelperVariableName, $argumentsVariableName) . LF;
-        $initializationPhpCode .= sprintf('%s->setRenderingContext($renderingContext);', $viewHelperVariableName) . LF;
-
-        $initializationPhpCode .= sprintf('%s->setRenderChildrenClosure(%s);', $viewHelperVariableName, $renderChildrenClosureVariableName) . LF;
-
-        $initializationPhpCode .= '// End of ViewHelper ' . $node->getViewHelperClassName() . LF;
-
-        return array(
-            'initialization' => $initializationPhpCode,
-            'execution' => sprintf('%s->initializeArgumentsAndRender()', $viewHelperVariableName)
-        );
-    }
-
-    /**
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode $node
-     * @return array
-     * @see convert()
-     */
-    protected function convertObjectAccessorNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode $node)
-    {
-        $objectPathSegments = explode('.', $node->getObjectPath());
-        $firstPathElement = array_shift($objectPathSegments);
-        if ($objectPathSegments === array()) {
-            return array(
-                'initialization' => '',
-                'execution' => sprintf('$currentVariableContainer->getOrNull(\'%s\')', $firstPathElement)
-            );
-        } else {
-            $executionCode = '\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::getPropertyPath($currentVariableContainer->getOrNull(\'%s\'), \'%s\', $renderingContext)';
-            return array(
-                'initialization' => '',
-                'execution' => sprintf($executionCode, $firstPathElement, implode('.', $objectPathSegments))
-            );
-        }
-    }
-
-    /**
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ArrayNode $node
-     * @return array
-     * @see convert()
-     */
-    protected function convertArrayNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ArrayNode $node)
-    {
-        $initializationPhpCode = '// Rendering Array' . LF;
-        $arrayVariableName = $this->variableName('array');
-
-        $initializationPhpCode .= sprintf('%s = array();', $arrayVariableName) . LF;
-
-        foreach ($node->getInternalArray() as $key => $value) {
-            if ($value instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode) {
-                $converted = $this->convert($value);
-                $initializationPhpCode .= $converted['initialization'];
-                $initializationPhpCode .= sprintf('%s[\'%s\'] = %s;', $arrayVariableName, $key, $converted['execution']) . LF;
-            } elseif (is_numeric($value)) {
-                // this case might happen for simple values
-                $initializationPhpCode .= sprintf('%s[\'%s\'] = %s;', $arrayVariableName, $key, $value) . LF;
-            } else {
-                // this case might happen for simple values
-                $initializationPhpCode .= sprintf('%s[\'%s\'] = \'%s\';', $arrayVariableName, $key, $this->escapeTextForUseInSingleQuotes($value)) . LF;
-            }
-        }
-        return array(
-            'initialization' => $initializationPhpCode,
-            'execution' => $arrayVariableName
-        );
-    }
-
-    /**
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $node
-     * @return array
-     * @see convert()
-     */
-    public function convertListOfSubNodes(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $node)
-    {
-        switch (count($node->getChildNodes())) {
-            case 0:
-                return array(
-                    'initialization' => '',
-                    'execution' => 'NULL'
-                );
-            case 1:
-                $converted = $this->convert(current($node->getChildNodes()));
-
-                return $converted;
-            default:
-                $outputVariableName = $this->variableName('output');
-                $initializationPhpCode = sprintf('%s = \'\';', $outputVariableName) . LF;
-
-                foreach ($node->getChildNodes() as $childNode) {
-                    $converted = $this->convert($childNode);
-
-                    $initializationPhpCode .= $converted['initialization'] . LF;
-                    $initializationPhpCode .= sprintf('%s .= %s;', $outputVariableName, $converted['execution']) . LF;
-                }
-
-                return array(
-                    'initialization' => $initializationPhpCode,
-                    'execution' => $outputVariableName
-                );
-        }
-    }
-
-    /**
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\BooleanNode $node
-     * @return array
-     * @see convert()
-     */
-    protected function convertBooleanNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\BooleanNode $node)
-    {
-        $initializationPhpCode = '// Rendering Boolean node' . LF;
-        if ($node->getComparator() !== null) {
-            $convertedLeftSide = $this->convert($node->getLeftSide());
-            $convertedRightSide = $this->convert($node->getRightSide());
-
-            return array(
-                'initialization' => $initializationPhpCode . $convertedLeftSide['initialization'] . $convertedRightSide['initialization'],
-                'execution' => sprintf(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\BooleanNode::class . '::evaluateComparator(\'%s\', %s, %s)', $node->getComparator(), $convertedLeftSide['execution'], $convertedRightSide['execution'])
-            );
-        } else {
-            // simple case, no comparator.
-            $converted = $this->convert($node->getSyntaxTreeNode());
-            return array(
-                'initialization' => $initializationPhpCode . $converted['initialization'],
-                'execution' => sprintf(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\BooleanNode::class . '::convertToBoolean(%s)', $converted['execution'])
-            );
-        }
-    }
-
-    /**
-     * @param string $text
-     * @return string
-     */
-    protected function escapeTextForUseInSingleQuotes($text)
-    {
-        return str_replace(array('\\', '\''), array('\\\\', '\\\''), $text);
-    }
-
-    /**
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $node
-     * @return string
-     */
-    public function wrapChildNodesInClosure(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $node)
-    {
-        $convertedSubNodes = $this->convertListOfSubNodes($node);
-        if ($convertedSubNodes['execution'] === 'NULL') {
-            return 'function() {return NULL;}';
-        }
-
-        $closure = '';
-        $closure .= 'function() use ($renderingContext, $self) {' . LF;
-        $closure .= '$currentVariableContainer = $renderingContext->getTemplateVariableContainer();' . LF;
-        $closure .= $convertedSubNodes['initialization'];
-        $closure .= sprintf('return %s;', $convertedSubNodes['execution']) . LF;
-        $closure .= '}';
-        return $closure;
-    }
-
-    /**
-     * Returns a unique variable name by appending a global index to the given prefix
-     *
-     * @param string $prefix
-     * @return string
-     */
-    public function variableName($prefix)
-    {
-        return '$' . $prefix . $this->variableCounter++;
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Exception.php b/typo3/sysext/fluid/Classes/Core/Exception.php
deleted file mode 100644 (file)
index 027c54f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-/**
- * A generic Fluid Core exception.
- *
- * @api
- */
-class Exception extends \TYPO3\CMS\Fluid\Exception
-{
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/Configuration.php b/typo3/sysext/fluid/Classes/Core/Parser/Configuration.php
deleted file mode 100644 (file)
index 52a4ba1..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * The parser configuration. Contains all configuration needed to configure
- * the building of a SyntaxTree.
- */
-class Configuration
-{
-    /**
-     * Generic interceptors registered with the configuration.
-     *
-     * @var array<\TYPO3\CMS\Extbase\Persistence\ObjectStorage>
-     */
-    protected $interceptors = array();
-
-    /**
-     * Adds an interceptor to apply to values coming from object accessors.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface $interceptor
-     * @return void
-     */
-    public function addInterceptor(\TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface $interceptor)
-    {
-        foreach ($interceptor->getInterceptionPoints() as $interceptionPoint) {
-            if (!isset($this->interceptors[$interceptionPoint])) {
-                $this->interceptors[$interceptionPoint] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class);
-            }
-            if (!$this->interceptors[$interceptionPoint]->contains($interceptor)) {
-                $this->interceptors[$interceptionPoint]->attach($interceptor);
-            }
-        }
-    }
-
-    /**
-     * Returns all interceptors for a given Interception Point.
-     *
-     * @param int $interceptionPoint one of the \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_* constants,
-     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface>
-     */
-    public function getInterceptors($interceptionPoint)
-    {
-        if (isset($this->interceptors[$interceptionPoint]) && $this->interceptors[$interceptionPoint] instanceof \TYPO3\CMS\Extbase\Persistence\ObjectStorage) {
-            return $this->interceptors[$interceptionPoint];
-        }
-        return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class);
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/Exception.php b/typo3/sysext/fluid/Classes/Core/Parser/Exception.php
deleted file mode 100644 (file)
index 704c471..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-/**
- * A Parsing Exception
- *
- * @api
- */
-class Exception extends \TYPO3\CMS\Fluid\Core\Exception
-{
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/Interceptor/Escape.php b/typo3/sysext/fluid/Classes/Core/Parser/Interceptor/Escape.php
deleted file mode 100644 (file)
index 84c3231..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser\Interceptor;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * An interceptor adding the escape viewhelper to the suitable places.
- */
-class Escape implements \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface
-{
-    /**
-     * Is the interceptor enabled right now?
-     *
-     * @var bool
-     */
-    protected $interceptorEnabled = true;
-
-    /**
-     * A stack of ViewHelperNodes which currently disable the interceptor.
-     * Needed to enable the interceptor again.
-     *
-     * @var array<\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface>
-     */
-    protected $viewHelperNodesWhichDisableTheInterceptor = array();
-
-    /**
-     * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-     * @inject
-     */
-    protected $objectManager;
-
-    /**
-     * Adds a ViewHelper node using the Format\HtmlspecialcharsViewHelper to the given node.
-     * If "escapingInterceptorEnabled" in the ViewHelper is FALSE, will disable itself inside the ViewHelpers body.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $node
-     * @param int $interceptorPosition One of the INTERCEPT_* constants for the current interception point
-     * @param \TYPO3\CMS\Fluid\Core\Parser\ParsingState $parsingState the current parsing state. Not needed in this interceptor.
-     * @return \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface
-     */
-    public function process(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $node, $interceptorPosition, \TYPO3\CMS\Fluid\Core\Parser\ParsingState $parsingState)
-    {
-        if ($interceptorPosition === \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_OPENING_VIEWHELPER) {
-            if (!$node->getUninitializedViewHelper()->isEscapingInterceptorEnabled()) {
-                $this->interceptorEnabled = false;
-                $this->viewHelperNodesWhichDisableTheInterceptor[] = $node;
-            }
-        } elseif ($interceptorPosition === \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER) {
-            if (end($this->viewHelperNodesWhichDisableTheInterceptor) === $node) {
-                array_pop($this->viewHelperNodesWhichDisableTheInterceptor);
-                if (count($this->viewHelperNodesWhichDisableTheInterceptor) === 0) {
-                    $this->interceptorEnabled = true;
-                }
-            }
-        } elseif ($this->interceptorEnabled && $node instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode) {
-            $escapeViewHelper = $this->objectManager->get(\TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlspecialcharsViewHelper::class);
-            $node = $this->objectManager->get(
-                \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class,
-                $escapeViewHelper,
-                array('value' => $node)
-            );
-        }
-        return $node;
-    }
-
-    /**
-     * This interceptor wants to hook into object accessor creation, and opening / closing ViewHelpers.
-     *
-     * @return array Array of INTERCEPT_* constants
-     */
-    public function getInterceptionPoints()
-    {
-        return array(
-            \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_OPENING_VIEWHELPER,
-            \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER,
-            \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_OBJECTACCESSOR
-        );
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/InterceptorInterface.php b/typo3/sysext/fluid/Classes/Core/Parser/InterceptorInterface.php
deleted file mode 100644 (file)
index 910e268..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * An interceptor interface. Interceptors are used in the parsing stage to change
- * the syntax tree of a template, e.g. by adding viewhelper nodes.
- */
-interface InterceptorInterface
-{
-    const INTERCEPT_OPENING_VIEWHELPER = 1;
-    const INTERCEPT_CLOSING_VIEWHELPER = 2;
-    const INTERCEPT_TEXT = 3;
-    const INTERCEPT_OBJECTACCESSOR = 4;
-
-    /**
-     * The interceptor can process the given node at will and must return a node
-     * that will be used in place of the given node.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $node
-     * @param int $interceptorPosition One of the INTERCEPT_* constants for the current interception point
-     * @param \TYPO3\CMS\Fluid\Core\Parser\ParsingState $parsingState the parsing state
-     * @return \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface
-     */
-    public function process(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $node, $interceptorPosition, \TYPO3\CMS\Fluid\Core\Parser\ParsingState $parsingState);
-
-    /**
-     * The interceptor should define at which interception positions it wants to be called.
-     *
-     * @return array Array of INTERCEPT_* constants
-     */
-    public function getInterceptionPoints();
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/ParsedTemplateInterface.php b/typo3/sysext/fluid/Classes/Core/Parser/ParsedTemplateInterface.php
deleted file mode 100644 (file)
index 13b16d3..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * This interface is returned by \TYPO3\CMS\Fluid\Core\Parser\TemplateParser->parse()
- * method and is a parsed template
- */
-interface ParsedTemplateInterface
-{
-    /**
-     * Render the parsed template with rendering context
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext The rendering context to use
-     * @return string Rendered string
-     */
-    public function render(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext);
-
-    /**
-     * Returns a variable container used in the PostParse Facet.
-     *
-     * @todo remove
-     * @return \TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer
-     */
-    public function getVariableContainer();
-
-    /**
-     * Returns the name of the layout that is defined within the current template via <f:layout name="..." />
-     * If no layout is defined, this returns NULL
-     * This requires the current rendering context in order to be able to evaluate the layout name
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return string
-     */
-    public function getLayoutName(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext);
-
-    /**
-     * Returns TRUE if the current template has a template defined via <f:layout name="..." />
-     *
-     * @see getLayoutName()
-     * @return bool
-     */
-    public function hasLayout();
-
-    /**
-     * If the template contains constructs which prevent the compiler from compiling the template
-     * correctly, isCompilable() will return FALSE.
-     *
-     * @return bool TRUE if the template can be compiled
-     */
-    public function isCompilable();
-
-    /**
-     * @return bool TRUE if the template is already compiled, FALSE otherwise
-     */
-    public function isCompiled();
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/ParsingState.php b/typo3/sysext/fluid/Classes/Core/Parser/ParsingState.php
deleted file mode 100644 (file)
index 38628bc..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * Stores all information relevant for one parsing pass - that is, the root node,
- * and the current stack of open nodes (nodeStack) and a variable container used
- * for PostParseFacets.
- */
-class ParsingState implements \TYPO3\CMS\Fluid\Core\Parser\ParsedTemplateInterface
-{
-    /**
-     * Root node reference
-     *
-     * @var \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode
-     */
-    protected $rootNode;
-
-    /**
-     * Array of node references currently open.
-     *
-     * @var array
-     */
-    protected $nodeStack = array();
-
-    /**
-     * Variable container where ViewHelpers implementing the PostParseFacet can
-     * store things in.
-     *
-     * @var \TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer
-     * @inject
-     */
-    protected $variableContainer;
-
-    /**
-     * The layout name of the current template or NULL if the template does not contain a layout definition
-     *
-     * @var \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-     */
-    protected $layoutNameNode;
-
-    /**
-     * @var bool
-     */
-    protected $compilable = true;
-
-    /**
-     * Set root node of this parsing state
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $rootNode
-     * @return void
-     */
-    public function setRootNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $rootNode)
-    {
-        $this->rootNode = $rootNode;
-    }
-
-    /**
-     * Get root node of this parsing state.
-     *
-     * @return \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode The root node
-     */
-    public function getRootNode()
-    {
-        return $this->rootNode;
-    }
-
-    /**
-     * Render the parsed template with rendering context
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext The rendering context to use
-     * @return string Rendered string
-     */
-    public function render(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
-    {
-        return $this->rootNode->evaluate($renderingContext);
-    }
-
-    /**
-     * Push a node to the node stack. The node stack holds all currently open
-     * templating tags.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $node Node to push to node stack
-     * @return void
-     */
-    public function pushNodeToStack(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $node)
-    {
-        array_push($this->nodeStack, $node);
-    }
-
-    /**
-     * Get the top stack element, without removing it.
-     *
-     * @return \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode the top stack element.
-     */
-    public function getNodeFromStack()
-    {
-        return $this->nodeStack[count($this->nodeStack) - 1];
-    }
-
-    /**
-     * Pop the top stack element (=remove it) and return it back.
-     *
-     * @return \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode the top stack element, which was removed.
-     */
-    public function popNodeFromStack()
-    {
-        return array_pop($this->nodeStack);
-    }
-
-    /**
-     * Count the size of the node stack
-     *
-     * @return int Number of elements on the node stack (i.e. number of currently open Fluid tags)
-     */
-    public function countNodeStack()
-    {
-        return count($this->nodeStack);
-    }
-
-    /**
-     * Returns a variable container which will be then passed to the postParseFacet.
-     *
-     * @return \TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer The variable container or NULL if none has been set yet
-     * @todo Rename to getPostParseVariableContainer
-     */
-    public function getVariableContainer()
-    {
-        return $this->variableContainer;
-    }
-
-    /**
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $layoutNameNode name of the layout that is defined in this template via <f:layout name="..." />
-     * @return void
-     */
-    public function setLayoutNameNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $layoutNameNode)
-    {
-        $this->layoutNameNode = $layoutNameNode;
-    }
-
-    /**
-     * @return \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-     */
-    public function getLayoutNameNode()
-    {
-        return $this->layoutNameNode;
-    }
-
-    /**
-     * Returns TRUE if the current template has a template defined via <f:layout name="..." />
-     *
-     * @see getLayoutName()
-     * @return bool
-     */
-    public function hasLayout()
-    {
-        return $this->layoutNameNode !== null;
-    }
-
-    /**
-     * Returns the name of the layout that is defined within the current template via <f:layout name="..." />
-     * If no layout is defined, this returns NULL
-     * This requires the current rendering context in order to be able to evaluate the layout name
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return string
-     * @throws \TYPO3\CMS\Fluid\View\Exception
-     */
-    public function getLayoutName(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
-    {
-        if (!$this->hasLayout()) {
-            return null;
-        }
-        $layoutName = $this->layoutNameNode->evaluate($renderingContext);
-        if (!empty($layoutName)) {
-            return $layoutName;
-        }
-        throw new \TYPO3\CMS\Fluid\View\Exception('The layoutName could not be evaluated to a string', 1296805368);
-    }
-
-    /**
-     * @return bool
-     */
-    public function isCompilable()
-    {
-        return $this->compilable;
-    }
-
-    /**
-     * @param bool $compilable
-     */
-    public function setCompilable($compilable)
-    {
-        $this->compilable = $compilable;
-    }
-
-    /**
-     * @return bool
-     */
-    public function isCompiled()
-    {
-        return false;
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/PreProcessor/XmlnsNamespaceTemplatePreProcessor.php b/typo3/sysext/fluid/Classes/Core/Parser/PreProcessor/XmlnsNamespaceTemplatePreProcessor.php
new file mode 100644 (file)
index 0000000..b879da1
--- /dev/null
@@ -0,0 +1,85 @@
+<?php
+namespace TYPO3\CMS\Fluid\Core\Parser\PreProcessor;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3Fluid\Fluid\Core\Parser\TemplateProcessorInterface;
+use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
+
+/**
+ * Class XmlnsNamespaceTemplatePreProcessor
+ */
+class XmlnsNamespaceTemplatePreProcessor implements TemplateProcessorInterface
+{
+    /**
+     * @var RenderingContextInterface
+     */
+    protected $renderingContext;
+
+    /**
+     * @param RenderingContextInterface $renderingContext
+     * @return void
+     */
+    public function setRenderingContext(RenderingContextInterface $renderingContext)
+    {
+        $this->renderingContext = $renderingContext;
+    }
+
+    /**
+     * Pre-process the template source before it is returned to the TemplateParser or passed to
+     * the next TemplateProcessorInterface instance.
+     *
+     * Detects all tags that carry an `xmlns:` definition using a Fluid-compatible prefix and a
+     * conventional namespace URL (http://typo3.org/ns/). Extracts the detected namespaces and 
+     * removes the detected tag.
+     *
+     * @param string $templateSource
+     * @return string
+     */
+    public function preProcessSource($templateSource)
+    {
+        $matches = array();
+        $namespacePattern = 'xmlns:([a-z0-9]+)="(http\\:\\/\\/typo3\\.org\\/ns\\/[^"]+)"';
+        $matched = preg_match_all('/<([a-z0-9]+)\\s+(?:[^>]+\\s+)*' . $namespacePattern . '[^>]*>/', $templateSource, $matches, PREG_SET_ORDER);
+        if ($matched) {
+            $namespaces = array();
+            preg_match_all('/' . $namespacePattern . '/', $matches[0][0], $namespaces, PREG_SET_ORDER);
+            foreach ($namespaces as $set) {
+                $namespaceUrl = $set[2];
+                $namespaceUri = substr($namespaceUrl, 20);
+                $namespacePhp = str_replace('/', '\\', $namespaceUri);
+                $this->renderingContext->getViewHelperResolver()->addNamespace($set[1], $namespacePhp);
+            }
+            if (strpos($matches[0][0], 'data-namespace-typo3-fluid="true"')) {
+                $templateSource = str_replace($matches[0][0], '', $templateSource);
+                $closingTagName = $matches[0][1];
+                $closingTag = '</' . $closingTagName . '>';
+                if (strpos($templateSource, $closingTag)) {
+                    $templateSource = substr($templateSource, 0, strrpos($templateSource, $closingTag)) .
+                        substr($templateSource, strrpos($templateSource, $closingTag) + strlen($closingTag));
+                }
+            } else {
+                if (!empty($namespaces)) {
+                    $namespaceAttributesToRemove = [];
+                    foreach ($namespaces as $namespace) {
+                        $namespaceAttributesToRemove[] = preg_quote($namespace[1], '/') . '="' . preg_quote($namespace[2], '/') . '"';
+                    }
+                    $matchWithRemovedNamespaceAttributes = preg_replace('/(?:\\s*+xmlns:(?:' . implode('|', $namespaceAttributesToRemove) . ')\\s*+)++/', ' ', $matches[0][0]);
+                    $templateSource = str_replace($matches[0][0], $matchWithRemovedNamespaceAttributes, $templateSource);
+                }
+            }
+        }
+        return $templateSource;
+    }
+}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php
deleted file mode 100644 (file)
index c923989..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * Abstract node in the syntax tree which has been built.
- */
-abstract class AbstractNode implements \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface
-{
-    /**
-     * List of Child Nodes.
-     *
-     * @var array<\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface>
-     */
-    protected $childNodes = array();
-
-    /**
-     * Evaluate all child nodes and return the evaluated results.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return mixed Normally, an object is returned - in case it is concatenated with a string, a string is returned.
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    public function evaluateChildNodes(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
-    {
-        $output = null;
-        foreach ($this->childNodes as $subNode) {
-            if ($output === null) {
-                $output = $subNode->evaluate($renderingContext);
-            } else {
-                if (is_object($output)) {
-                    if (!method_exists($output, '__toString')) {
-                        throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Cannot cast object of type "' . get_class($output) . '" to string.', 1248356140);
-                    }
-                    $output = $output->__toString();
-                } else {
-                    $output = (string)$output;
-                }
-                $subNodeOutput = $subNode->evaluate($renderingContext);
-
-                if (is_object($subNodeOutput)) {
-                    if (!method_exists($subNodeOutput, '__toString')) {
-                        throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Cannot cast object of type "' . get_class($subNodeOutput) . '" to string.', 1273753083);
-                    }
-                    $output .= $subNodeOutput->__toString();
-                } else {
-                    $output .= (string)$subNodeOutput;
-                }
-            }
-        }
-        return $output;
-    }
-
-    /**
-     * Returns all child nodes for a given node.
-     * This is especially needed to implement the boolean expression language.
-     *
-     * @return array<\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface> A list of nodes
-     */
-    public function getChildNodes()
-    {
-        return $this->childNodes;
-    }
-
-    /**
-     * Appends a subnode to this node. Is used inside the parser to append children
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $childNode The subnode to add
-     * @return void
-     */
-    public function addChildNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $childNode)
-    {
-        $this->childNodes[] = $childNode;
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ArrayNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ArrayNode.php
deleted file mode 100644 (file)
index 04d2d77..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * Array Syntax Tree Node. Handles JSON-like arrays.
- */
-class ArrayNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-{
-    /**
-     * An associative array. Each key is a string. Each value is either a literal, or an AbstractNode.
-     *
-     * @var array
-     */
-    protected $internalArray = array();
-
-    /**
-     * Constructor.
-     *
-     * @param array $internalArray Array to store
-     */
-    public function __construct($internalArray)
-    {
-        $this->internalArray = $internalArray;
-    }
-
-    /**
-     * Evaluate the array and return an evaluated array
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return array An associative array with literal values
-     */
-    public function evaluate(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
-    {
-        $arrayToBuild = array();
-        foreach ($this->internalArray as $key => $value) {
-            if ($value instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode) {
-                $arrayToBuild[$key] = $value->evaluate($renderingContext);
-            } else {
-                // @todo - this case should not happen!
-                $arrayToBuild[$key] = $value;
-            }
-        }
-        return $arrayToBuild;
-    }
-
-    /**
-     * INTERNAL; DO NOT CALL DIRECTLY!
-     *
-     * @return array
-     */
-    public function getInternalArray()
-    {
-        return $this->internalArray;
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/BooleanNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/BooleanNode.php
deleted file mode 100644 (file)
index 9915309..0000000
+++ /dev/null
@@ -1,352 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * A node which is used inside boolean arguments
- */
-class BooleanNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-{
-    /**
-     * List of comparators which are supported in the boolean expression language.
-     *
-     * Make sure that if one string is contained in one another, the longer
-     * string is listed BEFORE the shorter one.
-     * Example: put ">=" before ">"
-     *
-     * @var array
-     */
-    protected static $comparators = array('==', '!=', '%', '>=', '>', '<=', '<');
-
-    /**
-     * A regular expression which checks the text nodes of a boolean expression.
-     * Used to define how the regular expression language should look like.
-     *
-     * @var string
-     */
-    protected static $booleanExpressionTextNodeCheckerRegularExpression = '/
-               ^                 # Start with first input symbol
-               (?:               # start repeat
-                       COMPARATORS   # We allow all comparators
-                       |\s*          # Arbitary spaces
-                       |-?           # Numbers, possibly with the "minus" symbol in front.
-                               [0-9]+    # some digits
-                               (?:       # and optionally a dot, followed by some more digits
-                                       \\.
-                                       [0-9]+
-                               )?
-                       |\'[^\'\\\\]* # single quoted string literals with possibly escaped single quotes
-                               (?:
-                                       \\\\.      # escaped character
-                                       [^\'\\\\]* # unrolled loop following Jeffrey E.F. Friedl
-                               )*\'
-                       |"[^"\\\\]*   # double quoted string literals with possibly escaped double quotes
-                               (?:
-                                       \\\\.     # escaped character
-                                       [^"\\\\]* # unrolled loop following Jeffrey E.F. Friedl
-                               )*"
-               )*
-               $/x';
-
-    /**
-     * Left side of the comparison
-     *
-     * @var \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-     */
-    protected $leftSide;
-
-    /**
-     * Right side of the comparison
-     *
-     * @var \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-     */
-    protected $rightSide;
-
-    /**
-     * The comparator. One element of self::$comparators. If NULL,
-     * no comparator was found, and self::$syntaxTreeNode should
-     * instead be evaluated.
-     *
-     * @var string
-     */
-    protected $comparator;
-
-    /**
-     * If no comparator was found, the syntax tree node should be
-     * converted to boolean.
-     *
-     * @var \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-     */
-    protected $syntaxTreeNode;
-
-    /**
-     * Constructor. Parses the syntax tree node and fills $this->leftSide, $this->rightSide,
-     * $this->comparator and $this->syntaxTreeNode.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    public function __construct(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode)
-    {
-        $childNodes = $syntaxTreeNode->getChildNodes();
-        if (count($childNodes) > 3) {
-            throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('A boolean expression has more than tree parts.', 1244201848);
-        } elseif (count($childNodes) === 0) {
-            // In this case, we do not have child nodes; i.e. the current SyntaxTreeNode
-            // is a text node with a literal comparison like "1 == 1"
-            $childNodes = array($syntaxTreeNode);
-        }
-
-        $this->leftSide = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode();
-        $this->rightSide = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode();
-        $this->comparator = null;
-        foreach ($childNodes as $childNode) {
-            if ($childNode instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode && !preg_match(str_replace('COMPARATORS', implode('|', self::$comparators), self::$booleanExpressionTextNodeCheckerRegularExpression), $childNode->getText())) {
-                // $childNode is text node, and no comparator found.
-                $this->comparator = null;
-                // skip loop and fall back to classical to boolean conversion.
-                break;
-            }
-
-            if ($this->comparator !== null) {
-                // comparator already set, we are evaluating the right side of the comparator
-                $this->rightSide->addChildNode($childNode);
-            } elseif ($childNode instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode
-                && ($this->comparator = $this->getComparatorFromString($childNode->getText()))) {
-                // comparator in current string segment
-                $explodedString = explode($this->comparator, $childNode->getText());
-                if (isset($explodedString[0]) && trim($explodedString[0]) !== '') {
-                    $value = trim($explodedString[0]);
-                    if (is_numeric($value)) {
-                        $this->leftSide->addChildNode(new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NumericNode($value));
-                    } else {
-                        $this->leftSide->addChildNode(new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode(preg_replace('/(^[\'"]|[\'"]$)/', '', $value)));
-                    }
-                }
-                if (isset($explodedString[1]) && trim($explodedString[1]) !== '') {
-                    $value = trim($explodedString[1]);
-                    if (is_numeric($value)) {
-                        $this->rightSide->addChildNode(new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NumericNode($value));
-                    } else {
-                        $this->rightSide->addChildNode(new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode(preg_replace('/(^[\'"]|[\'"]$)/', '', $value)));
-                    }
-                }
-            } else {
-                // comparator not found yet, on the left side of the comparator
-                $this->leftSide->addChildNode($childNode);
-            }
-        }
-
-        if ($this->comparator === null) {
-            // No Comparator found, we need to evaluate the given syntax tree node manually
-            $this->syntaxTreeNode = $syntaxTreeNode;
-        }
-    }
-
-    /**
-     * @return string
-     * @internal
-     */
-    public function getComparator()
-    {
-        return $this->comparator;
-    }
-
-    /**
-     * @return \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-     * @internal
-     */
-    public function getSyntaxTreeNode()
-    {
-        return $this->syntaxTreeNode;
-    }
-
-    /**
-     * @return \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-     * @internal
-     */
-    public function getLeftSide()
-    {
-        return $this->leftSide;
-    }
-
-    /**
-     * @return \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-     * @internal
-     */
-    public function getRightSide()
-    {
-        return $this->rightSide;
-    }
-
-    /**
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return bool the boolean value
-     */
-    public function evaluate(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
-    {
-        if ($this->comparator !== null) {
-            return self::evaluateComparator($this->comparator, $this->leftSide->evaluate($renderingContext), $this->rightSide->evaluate($renderingContext));
-        } else {
-            $value = $this->syntaxTreeNode->evaluate($renderingContext);
-            return self::convertToBoolean($value);
-        }
-    }
-
-    /**
-     * Do the actual comparison. Compares $leftSide and $rightSide with $comparator and emits a boolean value.
-     *
-     * Some special rules apply:
-     * - The == and != operators are comparing the Object Identity using === and !==, when one of the two
-     *   operands are objects.
-     * - For arithmetic comparisons (%, >, >=, <, <=), some special rules apply:
-     *   - arrays are only comparable with arrays, else the comparison yields FALSE
-     *   - objects are only comparable with objects, else the comparison yields FALSE
-     *   - the comparison is FALSE when two types are not comparable according to the table
-     *     "Comparison with various types" on http://php.net/manual/en/language.operators.comparison.php
-     *
-     * This function must be static public, as it is also directly called from cached templates.
-     *
-     * @param string $comparator
-     * @param mixed $evaluatedLeftSide
-     * @param mixed $evaluatedRightSide
-     * @return bool TRUE if comparison of left and right side using the comparator emit TRUE, false otherwise
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    public static function evaluateComparator($comparator, $evaluatedLeftSide, $evaluatedRightSide)
-    {
-        switch ($comparator) {
-            case '==':
-                if (is_object($evaluatedLeftSide) || is_object($evaluatedRightSide)) {
-                    return ($evaluatedLeftSide === $evaluatedRightSide);
-                } else {
-                    return ($evaluatedLeftSide == $evaluatedRightSide);
-                }
-            case '!=':
-                if (is_object($evaluatedLeftSide) || is_object($evaluatedRightSide)) {
-                    return ($evaluatedLeftSide !== $evaluatedRightSide);
-                } else {
-                    return ($evaluatedLeftSide != $evaluatedRightSide);
-                }
-            case '%':
-                if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) {
-                    return false;
-                }
-                return (bool)((int)$evaluatedLeftSide % (int)$evaluatedRightSide);
-            case '>':
-                if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) {
-                    return false;
-                }
-                return $evaluatedLeftSide > $evaluatedRightSide;
-            case '>=':
-                if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) {
-                    return false;
-                }
-                return $evaluatedLeftSide >= $evaluatedRightSide;
-            case '<':
-                if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) {
-                    return false;
-                }
-                return $evaluatedLeftSide < $evaluatedRightSide;
-            case '<=':
-                if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) {
-                    return false;
-                }
-                return $evaluatedLeftSide <= $evaluatedRightSide;
-            default:
-                throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Comparator "' . $comparator . '" is not implemented.', 1244234398);
-        }
-    }
-
-    /**
-     * Checks whether two operands are comparable (based on their types). This implements
-     * the "Comparison with various types" table from http://php.net/manual/en/language.operators.comparison.php,
-     * only leaving out "array" with "anything" and "object" with anything; as we specify
-     * that arrays and objects are incomparable with anything else than their type.
-     *
-     * @param mixed $evaluatedLeftSide
-     * @param mixed $evaluatedRightSide
-     * @return bool TRUE if the operands can be compared using arithmetic operators, FALSE otherwise.
-     */
-    protected static function isComparable($evaluatedLeftSide, $evaluatedRightSide)
-    {
-        if ((is_null($evaluatedLeftSide) || is_string($evaluatedLeftSide))
-            && is_string($evaluatedRightSide)) {
-            return true;
-        }
-        if (is_bool($evaluatedLeftSide) || is_null($evaluatedLeftSide)) {
-            return true;
-        }
-        if (is_object($evaluatedLeftSide) && is_object($evaluatedRightSide)) {
-            return true;
-        }
-        if ((is_string($evaluatedLeftSide) || is_resource($evaluatedLeftSide) || is_numeric($evaluatedLeftSide))
-            && (is_string($evaluatedRightSide) || is_resource($evaluatedRightSide) || is_numeric($evaluatedRightSide))) {
-            return true;
-        }
-        if (is_array($evaluatedLeftSide) && is_array($evaluatedRightSide)) {
-            return true;
-        }
-        return false;
-    }
-
-    /**
-     * Determine if there is a comparator inside $string, and if yes, returns it.
-     *
-     * @param string $string string to check for a comparator inside
-     * @return string The comparator or NULL if none found.
-     */
-    protected function getComparatorFromString($string)
-    {
-        foreach (self::$comparators as $comparator) {
-            if (strpos($string, $comparator) !== false) {
-                return $comparator;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Convert argument strings to their equivalents. Needed to handle strings with a boolean meaning.
-     *
-     * Must be public and static as it is used from inside cached templates.
-     *
-     * @param mixed $value Value to be converted to boolean
-     * @return bool
-     */
-    public static function convertToBoolean($value)
-    {
-        if (is_bool($value)) {
-            return $value;
-        }
-
-        if (is_integer($value) || is_float($value)) {
-            return !empty($value);
-        }
-
-        if (is_numeric($value)) {
-            return ($value != 0);
-        }
-
-        if (is_string($value)) {
-            return (!empty($value) && strtolower($value) !== 'false');
-        }
-        if (is_array($value) || (is_object($value) && $value instanceof \Countable)) {
-            return (bool)count($value);
-        }
-        if (is_object($value)) {
-            return true;
-        }
-
-        return false;
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/Expression/LegacyNamespaceExpressionNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/Expression/LegacyNamespaceExpressionNode.php
new file mode 100644 (file)
index 0000000..67894a8
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\Expression;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\Expression\AbstractExpressionNode;
+use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\Expression\ExpressionNodeInterface;
+use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
+
+/**
+ * Class LegacyNamespaceExpressionNode
+ */
+class LegacyNamespaceExpressionNode extends AbstractExpressionNode implements ExpressionNodeInterface
+{
+    /**
+     * Pattern which detects ternary conditions written in shorthand
+     * syntax, e.g. {checkvar ? thenvar : elsevar}.
+     */
+    public static $detectionExpression = '/{namespace\\s*([a-z0-9]+)\\s*=\\s*([a-z0-9_\\\\]+)\\s*}/i';
+
+    /**
+     * @param RenderingContextInterface $renderingContext
+     * @param string $expression
+     * @param array $matches
+     * @return mixed
+     */
+    public static function evaluateExpression(RenderingContextInterface $renderingContext, $expression, array $matches)
+    {
+        $renderingContext->getViewHelperResolver()->addNamespace($matches[1], $matches[2]);
+    }
+}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NodeInterface.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NodeInterface.php
deleted file mode 100644 (file)
index 056b6d9..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * Node in the syntax tree.
- */
-interface NodeInterface
-{
-    /**
-     * Evaluate all child nodes and return the evaluated results.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return mixed Normally, an object is returned - in case it is concatenated with a string, a string is returned.
-     */
-    public function evaluateChildNodes(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext);
-
-    /**
-     * Returns all child nodes for a given node.
-     *
-     * @return array<\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface> A list of nodes
-     */
-    public function getChildNodes();
-
-    /**
-     * Appends a subnode to this node. Is used inside the parser to append children
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $childNode The subnode to add
-     * @return void
-     */
-    public function addChildNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $childNode);
-
-    /**
-     * Evaluates the node - can return not only strings, but arbitary objects.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return mixed Evaluated node
-     */
-    public function evaluate(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext);
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NumericNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NumericNode.php
deleted file mode 100644 (file)
index 07ca5f6..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
-
-/*                                                                        *
- * This script belongs to the TYPO3 Flow package "Fluid".                 *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- * of the License, or (at your option) any later version.                 *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * Numeric Syntax Tree Node - is a container for numerics.
- *
- */
-class NumericNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-{
-    /**
-     * Contents of the numeric node
-     * @var number
-     */
-    protected $value;
-
-    /**
-     * Constructor.
-     *
-     * @param string|number $value value to store in this numericNode
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    public function __construct($value)
-    {
-        if (!is_numeric($value)) {
-            throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Numeric node requires an argument of type number, "' . gettype($value) . '" given.', 1360414192);
-        }
-        $this->value = $value + 0;
-    }
-
-    /**
-     * Return the value associated to the syntax tree.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return number the value stored in this node/subtree.
-     */
-    public function evaluate(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
-    {
-        return $this->value;
-    }
-
-    /**
-     * Getter for value
-     *
-     * @return number The value of this node
-     */
-    public function getValue()
-    {
-        return $this->value;
-    }
-
-    /**
-     * NumericNode does not allow adding child nodes, so this will always throw an exception.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $childNode The subnode to add
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     * @return void
-     */
-    public function addChildNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $childNode)
-    {
-        throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Numeric nodes may not contain child nodes, tried to add "' . get_class($childNode) . '".', 1360414193);
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php
deleted file mode 100644 (file)
index d04203a..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * A node which handles object access. This means it handles structures like {object.accessor.bla}
- */
-class ObjectAccessorNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-{
-    /**
-     * Object path which will be called. Is a list like "post.name.email"
-     *
-     * @var string
-     */
-    protected $objectPath;
-
-    /**
-     * Constructor. Takes an object path as input.
-     *
-     * The first part of the object path has to be a variable in the
-     * TemplateVariableContainer.
-     *
-     * @param string $objectPath An Object Path, like object1.object2.object3
-     */
-    public function __construct($objectPath)
-    {
-        $this->objectPath = $objectPath;
-    }
-
-    /**
-     * Internally used for building up cached templates; do not use directly!
-     *
-     * @return string
-     * @internal
-     */
-    public function getObjectPath()
-    {
-        return $this->objectPath;
-    }
-
-    /**
-     * Evaluate this node and return the correct object.
-     *
-     * Handles each part (denoted by .) in $this->objectPath in the following order:
-     * - call appropriate getter
-     * - call public property, if exists
-     * - fail
-     *
-     * The first part of the object path has to be a variable in the
-     * TemplateVariableContainer.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return mixed The evaluated object, can be any object type.
-     */
-    public function evaluate(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
-    {
-        return self::getPropertyPath($renderingContext->getTemplateVariableContainer(), $this->objectPath, $renderingContext);
-    }
-
-    /**
-     * Gets a property path from a given object or array.
-     *
-     * If propertyPath is "bla.blubb", then we first call getProperty($object, 'bla'),
-     * and on the resulting object we call getProperty(..., 'blubb').
-     *
-     * For arrays the keys are checked likewise.
-     *
-     * @param mixed $subject An object or array
-     * @param string $propertyPath
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return mixed Value of the property
-     */
-    public static function getPropertyPath($subject, $propertyPath, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
-    {
-        $propertyPathSegments = explode('.', $propertyPath);
-        foreach ($propertyPathSegments as $pathSegment) {
-            if ($subject === null || is_scalar($subject)) {
-                return null;
-            }
-            $propertyExists = false;
-            $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyInternal($subject, $pathSegment, false, $propertyExists);
-            if ($propertyExists !== true && (is_array($subject) || $subject instanceof \ArrayAccess) && isset($subject[$pathSegment])) {
-                $subject = $subject[$pathSegment];
-            } else {
-                $subject = $propertyValue;
-            }
-        }
-        return $subject;
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RootNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RootNode.php
deleted file mode 100644 (file)
index d06bea6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * Root node of every syntax tree.
- */
-class RootNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-{
-    /**
-     * Evaluate the root node, by evaluating the subtree.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return mixed Evaluated subtree
-     */
-    public function evaluate(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
-    {
-        return $this->evaluateChildNodes($renderingContext);
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php
deleted file mode 100644 (file)
index d12fbe7..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * Text Syntax Tree Node - is a container for strings.
- */
-class TextNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-{
-    /**
-     * Contents of the text node
-     *
-     * @var string
-     */
-    protected $text;
-
-    /**
-     * Constructor.
-     *
-     * @param string $text text to store in this textNode
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    public function __construct($text)
-    {
-        if (!is_string($text)) {
-            throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Text node requires an argument of type string, "' . gettype($text) . '" given.');
-        }
-        $this->text = $text;
-    }
-
-    /**
-     * Return the text associated to the syntax tree. Text from child nodes is
-     * appended to the text in the node's own text.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return string the text stored in this node/subtree.
-     */
-    public function evaluate(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
-    {
-        return $this->text . $this->evaluateChildNodes($renderingContext);
-    }
-
-    /**
-     * Getter for text
-     *
-     * @return string The text of this node
-     */
-    public function getText()
-    {
-        return $this->text;
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ViewHelperNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ViewHelperNode.php
deleted file mode 100644 (file)
index 6204634..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * Node which will call a ViewHelper associated with this node.
- */
-class ViewHelperNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
-{
-    /**
-     * Class name of view helper
-     *
-     * @var string
-     */
-    protected $viewHelperClassName;
-
-    /**
-     * Arguments of view helper - References to RootNodes.
-     *
-     * @var array
-     */
-    protected $arguments = array();
-
-    /**
-     * The ViewHelper associated with this node
-     *
-     * @var \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
-     */
-    protected $uninitializedViewHelper = null;
-
-    /**
-     * A mapping RenderingContext -> ViewHelper to only re-initialize ViewHelpers
-     * when a context change occurs.
-     *
-     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage
-     */
-    protected $viewHelpersByContext = null;
-
-    /**
-     * Constructor.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper The view helper
-     * @param array $arguments Arguments of view helper - each value is a RootNode.
-     */
-    public function __construct(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper, array $arguments)
-    {
-        $this->uninitializedViewHelper = $viewHelper;
-        $this->viewHelpersByContext = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class);
-        $this->arguments = $arguments;
-        $this->viewHelperClassName = get_class($this->uninitializedViewHelper);
-    }
-
-    /**
-     * Returns the attached (but still uninitialized) ViewHelper for this ViewHelperNode.
-     * We need this method because sometimes Interceptors need to ask some information from the ViewHelper.
-     *
-     * @return \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper the attached ViewHelper, if it is initialized
-     */
-    public function getUninitializedViewHelper()
-    {
-        return $this->uninitializedViewHelper;
-    }
-
-    /**
-     * Get class name of view helper
-     *
-     * @return string Class Name of associated view helper
-     */
-    public function getViewHelperClassName()
-    {
-        return $this->viewHelperClassName;
-    }
-
-    /**
-     * INTERNAL - only needed for compiling templates
-     *
-     * @return array
-     * @internal
-     */
-    public function getArguments()
-    {
-        return $this->arguments;
-    }
-
-    /**
-     * Call the view helper associated with this object.
-     *
-     * First, it evaluates the arguments of the view helper.
-     *
-     * If the view helper implements \TYPO3\CMS\Fluid\Core\ViewHelper\Facets\ChildNodeAccessInterface,
-     * it calls setChildNodes(array childNodes) on the view helper.
-     *
-     * Afterwards, checks that the view helper did not leave a variable lying around.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-     * @return string evaluated node after the view helper has been called.
-     */
-    public function evaluate(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
-    {
-        if ($this->viewHelpersByContext->contains($renderingContext)) {
-            $viewHelper = $this->viewHelpersByContext[$renderingContext];
-            $viewHelper->resetState();
-        } else {
-            $viewHelper = clone $this->uninitializedViewHelper;
-            $this->viewHelpersByContext->attach($renderingContext, $viewHelper);
-        }
-
-        $evaluatedArguments = array();
-        if (count($viewHelper->prepareArguments())) {
-            foreach ($viewHelper->prepareArguments() as $argumentName => $argumentDefinition) {
-                if (isset($this->arguments[$argumentName])) {
-                    $argumentValue = $this->arguments[$argumentName];
-                    $evaluatedArguments[$argumentName] = $argumentValue->evaluate($renderingContext);
-                } else {
-                    $evaluatedArguments[$argumentName] = $argumentDefinition->getDefaultValue();
-                }
-            }
-        }
-
-        $viewHelper->setArguments($evaluatedArguments);
-        $viewHelper->setViewHelperNode($this);
-        $viewHelper->setRenderingContext($renderingContext);
-
-        if ($viewHelper instanceof \TYPO3\CMS\Fluid\Core\ViewHelper\Facets\ChildNodeAccessInterface) {
-            $viewHelper->setChildNodes($this->childNodes);
-        }
-
-        $output = $viewHelper->initializeArgumentsAndRender();
-
-        return $output;
-    }
-
-    /**
-     * Clean up for serializing.
-     *
-     * @return array
-     */
-    public function __sleep()
-    {
-        return array('viewHelperClassName', 'arguments', 'childNodes');
-    }
-}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php b/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php
deleted file mode 100644 (file)
index 0308846..0000000
+++ /dev/null
@@ -1,973 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * Template parser building up an object syntax tree
- */
-class TemplateParser
-{
-    public static $SCAN_PATTERN_NAMESPACEDECLARATION = '/(?<!\\\\){namespace\\s*(?P<identifier>[a-zA-Z]+[a-zA-Z0-9]*)\\s*=\\s*(?P<phpNamespace>(?:[A-Za-z0-9\.]+|Tx)(?:LEGACY_NAMESPACE_SEPARATOR\\w+|FLUID_NAMESPACE_SEPARATOR\\w+)+)\\s*}/m';
-    public static $SCAN_PATTERN_XMLNSDECLARATION = '/\sxmlns:(?P<identifier>.*?)="(?P<xmlNamespace>.*?)"/m';
-
-    /**
-     * The following two constants are used for tracking whether we are currently
-     * parsing ViewHelper arguments or not. This is used to parse arrays only as
-     * ViewHelper argument.
-     */
-    const CONTEXT_INSIDE_VIEWHELPER_ARGUMENTS = 1;
-    const CONTEXT_OUTSIDE_VIEWHELPER_ARGUMENTS = 2;
-
-    /**
-     * This regular expression splits the input string at all dynamic tags, AND
-     * on all <![CDATA[...]]> sections.
-     */
-    public static $SPLIT_PATTERN_TEMPLATE_DYNAMICTAGS = '/
-               (
-                       (?: <\\/?                                      # Start dynamic tags
-                                       (?:(?:NAMESPACE):[a-zA-Z0-9\\.]+)     # A tag consists of the namespace prefix and word characters
-                                       (?:                                   # Begin tag arguments
-                                               \\s*[a-zA-Z0-9:-]+                  # Argument Keys
-                                               =                                 # =
-                                               (?>                               # either... If we have found an argument, we will not back-track (That does the Atomic Bracket)
-                                                       "(?:\\\\"|[^"])*"              # a double-quoted string
-                                                       |\'(?:\\\\\'|[^\'])*\'        # or a single quoted string
-                                               )\\s*                              #
-                                       )*                                    # Tag arguments can be replaced many times.
-                               \\s*
-                               \\/?>                                      # Closing tag
-                       )
-                       |(?:                                          # Start match CDATA section
-                               <!\\[CDATA\\[.*?\\]\\]>
-                       )
-               )/xs';
-
-    /**
-     * This regular expression scans if the input string is a ViewHelper tag
-     */
-    public static $SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG = '/
-               ^<                                                # A Tag begins with <
-               (?P<NamespaceIdentifier>NAMESPACE):               # Then comes the Namespace prefix followed by a :
-               (?P<MethodIdentifier>                             # Now comes the Name of the ViewHelper
-                       [a-zA-Z0-9\\.]+
-               )
-               (?P<Attributes>                                   # Begin Tag Attributes
-                       (?:                                           # A tag might have multiple attributes
-                               \\s*
-                               [a-zA-Z0-9:-]+                             # The attribute name
-                               =                                         # =
-                               (?>                                       # either... # If we have found an argument, we will not back-track (That does the Atomic Bracket)
-                                       "(?:\\\\"|[^"])*"                      # a double-quoted string
-                                       |\'(?:\\\\\'|[^\'])*\'                # or a single quoted string
-                               )                                         #
-                               \\s*
-                       )*                                            # A tag might have multiple attributes
-               )                                                 # End Tag Attributes
-               \\s*
-               (?P<Selfclosing>\\/?)                              # A tag might be selfclosing
-               >$/x';
-
-    /**
-     * This regular expression scans if the input string is a closing ViewHelper
-     * tag.
-     */
-    public static $SCAN_PATTERN_TEMPLATE_CLOSINGVIEWHELPERTAG = '/^<\\/(?P<NamespaceIdentifier>NAMESPACE):(?P<MethodIdentifier>[a-zA-Z0-9\\.]+)\\s*>$/';
-
-    /**
-     * This regular expression scans for HTML tags that have the attribute
-     * data-namespace-typo3-fluid="true".
-     * If this attribute is added to the HTML tag, the HTML tag will be removed
-     * from the rendered output.
-     */
-    public static $SCAN_PATTERN_NAMESPACE_FLUID_HTML_TAG = '/<html\\s++[^>]*data-namespace-typo3-fluid="true"[^>]*>/m';
-
-    /**
-     * This regular expression is used to remove xmlns attributes that are used
-     * to register ViewHelper namespaces.
-     *
-     * Replaces trailing empty spaces to avoid additional new lines that might be in the the tag.
-     * It is therefore necessary to replace the pattern with space instead of empty string.
-     *
-     * Searches for multiple xmlns declarations after one another to only replace them with one space,
-     * instead of one per xmlns definition.
-     */
-    public static $SCAN_PATTERN_REMOVE_VIEWHELPERS_XMLNSDECLARATIONS = '/(?:\\s*+xmlns:(?:%1$s)="[^"]*"\\s*+)++/m';
-
-    /**
-     * This regular expression splits the tag arguments into its parts
-     */
-    public static $SPLIT_PATTERN_TAGARGUMENTS = '/
-               (?:                                              #
-                       \\s*                                          #
-                       (?P<Argument>                                # The attribute name
-                               [a-zA-Z0-9:-]+                            #
-                       )                                            #
-                       =                                            # =
-                       (?>                                          # If we have found an argument, we will not back-track (That does the Atomic Bracket)
-                               (?P<ValueQuoted>                         # either...
-                                       (?:"(?:\\\\"|[^"])*")                 # a double-quoted string
-                                       |(?:\'(?:\\\\\'|[^\'])*\')           # or a single quoted string
-                               )
-                       )\\s*
-               )
-               /xs';
-
-    /**
-     * This pattern detects CDATA sections and outputs the text between opening
-     * and closing CDATA.
-     */
-    public static $SCAN_PATTERN_CDATA = '/^<!\\[CDATA\\[(.*?)\\]\\]>$/s';
-
-    /**
-     * Pattern which splits the shorthand syntax into different tokens. The
-     * "shorthand syntax" is everything like {...}
-     */
-    public static $SPLIT_PATTERN_SHORTHANDSYNTAX = '/
-               (
-                       {                                # Start of shorthand syntax
-                               (?:                          # Shorthand syntax is either composed of...
-                                       [a-zA-Z0-9\\->_:,.()]     # Various characters
-                                       |"(?:\\\\"|[^"])*"        # Double-quoted strings
-                                       |\'(?:\\\\\'|[^\'])*\'   # Single-quoted strings
-                                       |(?R)                    # Other shorthand syntaxes inside, albeit not in a quoted string
-                                       |\\s+                     # Spaces
-                               )+
-                       }                                # End of shorthand syntax
-               )/x';
-
-    /**
-     * Pattern which detects the object accessor syntax:
-     * {object.some.value}, additionally it detects ViewHelpers like
-     * {f:for(param1:bla)} and chaining like
-     * {object.some.value->f:bla.blubb()->f:bla.blubb2()}
-     *
-     * THIS IS ALMOST THE SAME AS IN $SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS
-     */
-    public static $SCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS = '/
-               ^{                                                      # Start of shorthand syntax
-                                                                       # A shorthand syntax is either...
-                       (?P<Object>[a-zA-Z0-9\\-_.]*)                                     # ... an object accessor
-                       \\s*(?P<Delimiter>(?:->)?)\\s*
-
-                       (?P<ViewHelper>                                 # ... a ViewHelper
-                               [a-zA-Z0-9]+                                # Namespace prefix of ViewHelper (as in $SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG)
-                               :
-                               [a-zA-Z0-9\\.]+                             # Method Identifier (as in $SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG)
-                               \\(                                          # Opening parameter brackets of ViewHelper
-                                       (?P<ViewHelperArguments>                # Start submatch for ViewHelper arguments. This is taken from $SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS
-                                               (?:
-                                                       \\s*[a-zA-Z0-9\\-_]+                  # The keys of the array
-                                                       \\s*:\\s*                             # Key|Value delimiter :
-                                                       (?:                                 # Possible value options:
-                                                               "(?:\\\\"|[^"])*"                # Double qouoted string
-                                                               |\'(?:\\\\\'|[^\'])*\'          # Single quoted string
-                                                               |[a-zA-Z0-9\\-_.]+               # variable identifiers
-                                                               |{(?P>ViewHelperArguments)}     # Another sub-array
-                                                       )                                   # END possible value options
-                                                       \\s*,?                               # There might be a , to separate different parts of the array
-                                               )*                                  # The above cycle is repeated for all array elements
-                                       )                                       # End ViewHelper Arguments submatch
-                               \\)                                          # Closing parameter brackets of ViewHelper
-                       )?
-                       (?P<AdditionalViewHelpers>                      # There can be more than one ViewHelper chained, by adding more -> and the ViewHelper (recursively)
-                               (?:
-                                       \\s*->\\s*
-                                       (?P>ViewHelper)
-                               )*
-                       )
-               }$/x';
-
-    /**
-     * THIS IS ALMOST THE SAME AS $SCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS
-     */
-    public static $SPLIT_PATTERN_SHORTHANDSYNTAX_VIEWHELPER = '/
-
-               (?P<NamespaceIdentifier>[a-zA-Z0-9]+)       # Namespace prefix of ViewHelper (as in $SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG)
-               :
-               (?P<MethodIdentifier>[a-zA-Z0-9\\.]+)
-               \\(                                          # Opening parameter brackets of ViewHelper
-                       (?P<ViewHelperArguments>                # Start submatch for ViewHelper arguments. This is taken from $SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS
-                               (?:
-                                       \\s*[a-zA-Z0-9\\-_]+                  # The keys of the array
-                                       \\s*:\\s*                             # Key|Value delimiter :
-                                       (?:                                 # Possible value options:
-                                               "(?:\\\\"|[^"])*"                # Double qouoted string
-                                               |\'(?:\\\\\'|[^\'])*\'          # Single quoted string
-                                               |[a-zA-Z0-9\\-_.]+               # variable identifiers
-                                               |{(?P>ViewHelperArguments)}     # Another sub-array
-                                       )                                   # END possible value options
-                                       \\s*,?                               # There might be a , to separate different parts of the array
-                               )*                                  # The above cycle is repeated for all array elements
-                       )                                       # End ViewHelper Arguments submatch
-               \\)                                          # Closing parameter brackets of ViewHelper
-               /x';
-
-    /**
-     * Pattern which detects the array/object syntax like in JavaScript, so it
-     * detects strings like:
-     * {object: value, object2: {nested: array}, object3: "Some string"}
-     *
-     * THIS IS ALMOST THE SAME AS IN SCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS
-     */
-    public static $SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS = '/^
-               (?P<Recursion>                                  # Start the recursive part of the regular expression - describing the array syntax
-                       {                                           # Each array needs to start with {
-                               (?P<Array>                              # Start submatch
-                                       (?:
-                                               \\s*[a-zA-Z0-9\\-_]+              # The keys of the array
-                                               \\s*:\\s*                         # Key|Value delimiter :
-                                               (?:                             # Possible value options:
-                                                       "(?:\\\\"|[^"])*"            # Double qouoted string
-                                                       |\'(?:\\\\\'|[^\'])*\'      # Single quoted string
-                                                       |[a-zA-Z0-9\\-_.]+           # variable identifiers
-                                                       |(?P>Recursion)             # Another sub-array
-                                               )                               # END possible value options
-                                               \\s*,?                           # There might be a , to separate different parts of the array
-                                       )*                                  # The above cycle is repeated for all array elements
-                               )                                       # End array submatch
-                       }                                           # Each array ends with }
-               )$/x';
-
-    /**
-     * This pattern splits an array into its parts. It is quite similar to the
-     * pattern above.
-     */
-    public static $SPLIT_PATTERN_SHORTHANDSYNTAX_ARRAY_PARTS = '/
-               (?P<ArrayPart>                                             # Start submatch
-                       (?P<Key>[a-zA-Z0-9\\-_]+)                               # The keys of the array
-                       \\s*:\\s*                                                   # Key|Value delimiter :
-                       (?:                                                       # Possible value options:
-                               (?P<QuotedString>                                     # Quoted string
-                                       (?:"(?:\\\\"|[^"])*")
-                                       |(?:\'(?:\\\\\'|[^\'])*\')
-                               )
-                               |(?P<VariableIdentifier>[a-zA-Z][a-zA-Z0-9\\-_.]*)    # variable identifiers have to start with a letter
-                               |(?P<Number>[0-9.]+)                                  # Number
-                               |{\\s*(?P<Subarray>(?:(?P>ArrayPart)\\s*,?\\s*)+)\\s*}              # Another sub-array
-                       )                                                         # END possible value options
-               )                                                          # End array part submatch
-       /x';
-
-    /**
-     * This pattern detects the default xml namespace
-     *
-     */
-    public static $SCAN_PATTERN_DEFAULT_XML_NAMESPACE = '/^http\:\/\/typo3\.org\/ns\/(?P<PhpNamespace>.+)$/s';
-
-    /**
-     * Namespace identifiers and their component name prefix (Associative array).
-     * @var array
-     */
-    protected $namespaces = array(
-        'f' => 'TYPO3\\CMS\\Fluid\\ViewHelpers'
-    );
-
-    /**
-     * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-     * @inject
-     */
-    protected $objectManager;
-
-    /**
-     * @var \TYPO3\CMS\Fluid\Core\Parser\Configuration
-     */
-    protected $configuration;
-
-    /**
-     * @var array
-     */
-    protected $settings;
-
-    /**
-     * @var array
-     */
-    protected $viewHelperNameToImplementationClassNameRuntimeCache = array();
-
-    /**
-     * Constructor. Preprocesses the $SCAN_PATTERN_NAMESPACEDECLARATION by
-     * inserting the correct namespace separator.
-     */
-    public function __construct()
-    {
-        self::$SCAN_PATTERN_NAMESPACEDECLARATION = str_replace(
-            array(
-                'LEGACY_NAMESPACE_SEPARATOR',
-                'FLUID_NAMESPACE_SEPARATOR'
-            ),
-            array(
-                preg_quote(\TYPO3\CMS\Fluid\Fluid::LEGACY_NAMESPACE_SEPARATOR),
-                preg_quote(\TYPO3\CMS\Fluid\Fluid::NAMESPACE_SEPARATOR)
-            ),
-            self::$SCAN_PATTERN_NAMESPACEDECLARATION
-        );
-    }
-
-    /**
-     * Injects Fluid settings
-     *
-     * @param array $settings
-     */
-    public function injectSettings(array $settings)
-    {
-        $this->settings = $settings;
-    }
-
-    /**
-     * Set the configuration for the parser.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\Configuration $configuration
-     * @return void
-     */
-    public function setConfiguration(\TYPO3\CMS\Fluid\Core\Parser\Configuration $configuration = null)
-    {
-        $this->configuration = $configuration;
-    }
-
-    /**
-     * Parses a given template string and returns a parsed template object.
-     *
-     * The resulting ParsedTemplate can then be rendered by calling evaluate() on it.
-     *
-     * Normally, you should use a subclass of AbstractTemplateView instead of calling the
-     * TemplateParser directly.
-     *
-     * @param string $templateString The template to parse as a string
-     * @return \TYPO3\CMS\Fluid\Core\Parser\ParsedTemplateInterface Parsed template
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    public function parse($templateString)
-    {
-        if (!is_string($templateString)) {
-            throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Parse requires a template string as argument, ' . gettype($templateString) . ' given.', 1224237899);
-        }
-        $this->reset();
-
-        $templateString = $this->extractNamespaceDefinitions($templateString);
-        $splitTemplate = $this->splitTemplateAtDynamicTags($templateString);
-
-        $parsingState = $this->buildObjectTree($splitTemplate, self::CONTEXT_OUTSIDE_VIEWHELPER_ARGUMENTS);
-
-        $variableContainer = $parsingState->getVariableContainer();
-        if ($variableContainer !== null && $variableContainer->exists('layoutName')) {
-            $parsingState->setLayoutNameNode($variableContainer->get('layoutName'));
-        }
-
-        return $parsingState;
-    }
-
-    /**
-     * Gets the namespace definitions found.
-     *
-     * @return array Namespace identifiers and their component name prefix
-     */
-    public function getNamespaces()
-    {
-        return $this->namespaces;
-    }
-
-    /**
-     * Resets the parser to its default values.
-     *
-     * @return void
-     */
-    protected function reset()
-    {
-        $this->namespaces = array(
-            'f' => 'TYPO3\\CMS\\Fluid\\ViewHelpers'
-        );
-    }
-
-    /**
-     * Extracts namespace definitions out of the given template string and sets
-     * $this->namespaces.
-     *
-     * @param string $templateString Template string to extract the namespaces from
-     * @return string The updated template string without namespace declarations inside
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception if a namespace can't be resolved or has been declared already
-     */
-    protected function extractNamespaceDefinitions($templateString)
-    {
-        $matches = array();
-        $foundIdentifiers = array();
-        preg_match_all(self::$SCAN_PATTERN_XMLNSDECLARATION, $templateString, $matches, PREG_SET_ORDER);
-        foreach ($matches as $match) {
-            // skip reserved "f" namespace identifier
-            if ($match['identifier'] === 'f') {
-                $foundIdentifiers[] = 'f';
-                continue;
-            }
-            if (array_key_exists($match['identifier'], $this->namespaces)) {
-                throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(sprintf('Namespace identifier "%s" is already registered. Do not re-declare namespaces!', $match['identifier']), 1331135889);
-            }
-            if (isset($this->settings['namespaces'][$match['xmlNamespace']])) {
-                $phpNamespace = $this->settings['namespaces'][$match['xmlNamespace']];
-            } else {
-                $matchedPhpNamespace = array();
-                if (preg_match(self::$SCAN_PATTERN_DEFAULT_XML_NAMESPACE, $match['xmlNamespace'], $matchedPhpNamespace) === 0) {
-                    continue;
-                }
-                $phpNamespace = str_replace('/', '\\', $matchedPhpNamespace['PhpNamespace']);
-            }
-            $foundIdentifiers[] = $match['identifier'];
-            $this->namespaces[$match['identifier']] = $phpNamespace;
-        }
-
-        $templateString = $this->removeXmlnsViewHelperNamespaceDeclarations($templateString, $foundIdentifiers);
-
-        $matches = array();
-        preg_match_all(self::$SCAN_PATTERN_NAMESPACEDECLARATION, $templateString, $matches, PREG_SET_ORDER);
-        foreach ($matches as $match) {
-            if (array_key_exists($match['identifier'], $this->namespaces)) {
-                throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(sprintf('Namespace identifier "%s" is already registered. Do not re-declare namespaces!', $match['identifier']), 1224241246);
-            }
-            $this->namespaces[$match['identifier']] = $match['phpNamespace'];
-        }
-        if ($matches !== array()) {
-            $templateString = preg_replace(self::$SCAN_PATTERN_NAMESPACEDECLARATION, '', $templateString);
-        }
-
-        return $templateString;
-    }
-
-    /**
-     * Removes html-tag (opening & closing) that is only used for xmlns definition
-     * and xmlns attributes that register ViewHelpers on any tags
-     *
-     * @param string $templateString
-     * @param array $foundIdentifiers
-     * @return string
-     */
-    protected function removeXmlnsViewHelperNamespaceDeclarations($templateString, array $foundIdentifiers)
-    {
-        $foundHtmlTags = 0;
-        $templateString = preg_replace(self::$SCAN_PATTERN_NAMESPACE_FLUID_HTML_TAG, '', $templateString, 1, $foundHtmlTags);
-        if ($foundHtmlTags > 0) {
-            $templateString = str_replace('</html>', '', $templateString);
-        }
-
-        if (!empty($foundIdentifiers)) {
-            $foundIdentifiers = array_map(function ($foundIdentifier) {
-                return preg_quote($foundIdentifier, '/');
-            }, $foundIdentifiers);
-            $foundIdentifiers = implode('|', $foundIdentifiers);
-
-            // replaces the pattern with space because the pattern includes trailing spaces and consecutive xmlns ViewHelper defintions
-            $templateString = preg_replace(
-                sprintf(self::$SCAN_PATTERN_REMOVE_VIEWHELPERS_XMLNSDECLARATIONS, $foundIdentifiers),
-                ' ',
-                $templateString
-            );
-        }
-
-        return $templateString;
-    }
-
-    /**
-     * Splits the template string on all dynamic tags found.
-     *
-     * @param string $templateString Template string to split.
-     * @return array Splitted template
-     */
-    protected function splitTemplateAtDynamicTags($templateString)
-    {
-        $regularExpression = $this->prepareTemplateRegularExpression(self::$SPLIT_PATTERN_TEMPLATE_DYNAMICTAGS);
-        return preg_split($regularExpression, $templateString, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
-    }
-
-    /**
-     * Build object tree from the split template
-     *
-     * @param array $splitTemplate The split template, so that every tag with a namespace declaration is already a separate array element.
-     * @param int $context one of the CONTEXT_* constants, defining whether we are inside or outside of ViewHelper arguments currently.
-     * @return \TYPO3\CMS\Fluid\Core\Parser\ParsingState
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    protected function buildObjectTree($splitTemplate, $context)
-    {
-        $regularExpression_openingViewHelperTag = $this->prepareTemplateRegularExpression(self::$SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG);
-        $regularExpression_closingViewHelperTag = $this->prepareTemplateRegularExpression(self::$SCAN_PATTERN_TEMPLATE_CLOSINGVIEWHELPERTAG);
-
-        $state = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\ParsingState::class);
-        $rootNode = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class);
-        $state->setRootNode($rootNode);
-        $state->pushNodeToStack($rootNode);
-
-        foreach ($splitTemplate as $templateElement) {
-            $matchedVariables = array();
-            if (preg_match(self::$SCAN_PATTERN_CDATA, $templateElement, $matchedVariables) > 0) {
-                $this->textHandler($state, $matchedVariables[1]);
-            } elseif (preg_match($regularExpression_openingViewHelperTag, $templateElement, $matchedVariables) > 0) {
-                $this->openingViewHelperTagHandler($state, $matchedVariables['NamespaceIdentifier'], $matchedVariables['MethodIdentifier'], $matchedVariables['Attributes'], ($matchedVariables['Selfclosing'] !== ''));
-            } elseif (preg_match($regularExpression_closingViewHelperTag, $templateElement, $matchedVariables) > 0) {
-                $this->closingViewHelperTagHandler($state, $matchedVariables['NamespaceIdentifier'], $matchedVariables['MethodIdentifier']);
-            } else {
-                $this->textAndShorthandSyntaxHandler($state, $templateElement, $context);
-            }
-        }
-
-        if ($state->countNodeStack() !== 1) {
-            throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Not all tags were closed!', 1238169398);
-        }
-        return $state;
-    }
-
-    /**
-     * Handles an opening or self-closing view helper tag.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\ParsingState $state Current parsing state
-     * @param string $namespaceIdentifier Namespace identifier - being looked up in $this->namespaces
-     * @param string $methodIdentifier Method identifier
-     * @param string $arguments Arguments string, not yet parsed
-     * @param bool $selfclosing true, if the tag is a self-closing tag.
-     * @return void
-     */
-    protected function openingViewHelperTagHandler(\TYPO3\CMS\Fluid\Core\Parser\ParsingState $state, $namespaceIdentifier, $methodIdentifier, $arguments, $selfclosing)
-    {
-        $argumentsObjectTree = $this->parseArguments($arguments);
-        $this->initializeViewHelperAndAddItToStack($state, $namespaceIdentifier, $methodIdentifier, $argumentsObjectTree);
-
-        if ($selfclosing) {
-            $node = $state->popNodeFromStack();
-            $this->callInterceptor($node, \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER, $state);
-        }
-    }
-
-    /**
-     * Initialize the given ViewHelper and adds it to the current node and to
-     * the stack.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\ParsingState $state Current parsing state
-     * @param string $namespaceIdentifier Namespace identifier - being looked up in $this->namespaces
-     * @param string $methodIdentifier Method identifier
-     * @param array $argumentsObjectTree Arguments object tree
-     * @return void
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    protected function initializeViewHelperAndAddItToStack(\TYPO3\CMS\Fluid\Core\Parser\ParsingState $state, $namespaceIdentifier, $methodIdentifier, $argumentsObjectTree)
-    {
-        if (!array_key_exists($namespaceIdentifier, $this->namespaces)) {
-            throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Namespace could not be resolved. This exception should never be thrown!', 1224254792);
-        }
-        $viewHelper = $this->objectManager->get($this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier));
-        $this->viewHelperNameToImplementationClassNameRuntimeCache[$namespaceIdentifier][$methodIdentifier] = get_class($viewHelper);
-
-        // The following three checks are only done *in an uncached template*, and not needed anymore in the cached version
-        $expectedViewHelperArguments = $viewHelper->prepareArguments();
-        $this->abortIfUnregisteredArgumentsExist($expectedViewHelperArguments, $argumentsObjectTree);
-        $this->abortIfRequiredArgumentsAreMissing($expectedViewHelperArguments, $argumentsObjectTree);
-        $this->rewriteBooleanNodesInArgumentsObjectTree($expectedViewHelperArguments, $argumentsObjectTree);
-
-        $currentViewHelperNode = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, $viewHelper, $argumentsObjectTree);
-
-        $state->getNodeFromStack()->addChildNode($currentViewHelperNode);
-
-        if ($viewHelper instanceof \TYPO3\CMS\Fluid\Core\ViewHelper\Facets\ChildNodeAccessInterface && !($viewHelper instanceof \TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface)) {
-            $state->setCompilable(false);
-        }
-
-        // PostParse Facet
-        if ($viewHelper instanceof \TYPO3\CMS\Fluid\Core\ViewHelper\Facets\PostParseInterface) {
-            $viewHelper::postParseEvent($currentViewHelperNode, $argumentsObjectTree, $state->getVariableContainer());
-        }
-
-        $this->callInterceptor($currentViewHelperNode, \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_OPENING_VIEWHELPER, $state);
-
-        $state->pushNodeToStack($currentViewHelperNode);
-    }
-
-    /**
-     * Throw an exception if there are arguments which were not registered
-     * before.
-     *
-     * @param array $expectedArguments Array of \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition of all expected arguments
-     * @param array $actualArguments Actual arguments
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    protected function abortIfUnregisteredArgumentsExist($expectedArguments, $actualArguments)
-    {
-        $expectedArgumentNames = array();
-        foreach ($expectedArguments as $expectedArgument) {
-            $expectedArgumentNames[] = $expectedArgument->getName();
-        }
-
-        foreach ($actualArguments as $argumentName => $_) {
-            if (!in_array($argumentName, $expectedArgumentNames)) {
-                throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Argument "' . $argumentName . '" was not registered.', 1237823695);
-            }
-        }
-    }
-
-    /**
-     * Throw an exception if required arguments are missing
-     *
-     * @param array $expectedArguments Array of \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition of all expected arguments
-     * @param array $actualArguments Actual arguments
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    protected function abortIfRequiredArgumentsAreMissing($expectedArguments, $actualArguments)
-    {
-        $actualArgumentNames = array_keys($actualArguments);
-        foreach ($expectedArguments as $expectedArgument) {
-            if ($expectedArgument->isRequired() && !in_array($expectedArgument->getName(), $actualArgumentNames)) {
-                throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Required argument "' . $expectedArgument->getName() . '" was not supplied.', 1237823699);
-            }
-        }
-    }
-
-    /**
-     * Wraps the argument tree, if a node is boolean, into a Boolean syntax tree node
-     *
-     * @param array $argumentDefinitions the argument definitions, key is the argument name, value is the ArgumentDefinition object
-     * @param array $argumentsObjectTree the arguments syntax tree, key is the argument name, value is an AbstractNode
-     * @return void
-     */
-    protected function rewriteBooleanNodesInArgumentsObjectTree($argumentDefinitions, &$argumentsObjectTree)
-    {
-        foreach ($argumentDefinitions as $argumentName => $argumentDefinition) {
-            if ($argumentDefinition->getType() === 'boolean' && isset($argumentsObjectTree[$argumentName])) {
-                $argumentsObjectTree[$argumentName] = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\BooleanNode($argumentsObjectTree[$argumentName]);
-            }
-        }
-    }
-
-    /**
-     * Resolve a viewhelper name.
-     *
-     * @param string $namespaceIdentifier Namespace identifier for the view helper.
-     * @param string $methodIdentifier Method identifier, might be hierarchical like "link.url"
-     * @return string The fully qualified class name of the viewhelper
-     */
-    protected function resolveViewHelperName($namespaceIdentifier, $methodIdentifier)
-    {
-        if (isset($this->viewHelperNameToImplementationClassNameRuntimeCache[$namespaceIdentifier][$methodIdentifier])) {
-            $name = $this->viewHelperNameToImplementationClassNameRuntimeCache[$namespaceIdentifier][$methodIdentifier];
-        } else {
-            $explodedViewHelperName = explode('.', $methodIdentifier);
-            $namespaceSeparator = strpos($this->namespaces[$namespaceIdentifier], \TYPO3\CMS\Fluid\Fluid::NAMESPACE_SEPARATOR) !== false ? \TYPO3\CMS\Fluid\Fluid::NAMESPACE_SEPARATOR : \TYPO3\CMS\Fluid\Fluid::LEGACY_NAMESPACE_SEPARATOR;
-            if (count($explodedViewHelperName) > 1) {
-                $className = implode($namespaceSeparator, array_map('ucfirst', $explodedViewHelperName));
-            } else {
-                $className = ucfirst($explodedViewHelperName[0]);
-            }
-            $className .= 'ViewHelper';
-            $name = $this->namespaces[$namespaceIdentifier] . $namespaceSeparator . $className;
-            $name = \TYPO3\CMS\Core\Core\ClassLoadingInformation::getClassNameForAlias($name);
-            // The name isn't cached in viewHelperNameToImplementationClassNameRuntimeCache here because the
-            // class could be overloaded by extbase object manager. Thus the cache is filled in
-            // initializeViewHelperAndAddItToStack after getting the real object from the object manager.
-        }
-        return $name;
-    }
-
-    /**
-     * Handles a closing view helper tag
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\ParsingState $state The current parsing state
-     * @param string $namespaceIdentifier Namespace identifier for the closing tag.
-     * @param string $methodIdentifier Method identifier.
-     * @return void
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    protected function closingViewHelperTagHandler(\TYPO3\CMS\Fluid\Core\Parser\ParsingState $state, $namespaceIdentifier, $methodIdentifier)
-    {
-        if (!array_key_exists($namespaceIdentifier, $this->namespaces)) {
-            throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Namespace could not be resolved. This exception should never be thrown!', 1224256186);
-        }
-        $lastStackElement = $state->popNodeFromStack();
-        if (!($lastStackElement instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode)) {
-            throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('You closed a templating tag which you never opened!', 1224485838);
-        }
-        if ($lastStackElement->getViewHelperClassName() != $this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier)) {
-            throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Templating tags not properly nested. Expected: ' . $lastStackElement->getViewHelperClassName() . '; Actual: ' . $this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier), 1224485398);
-        }
-        $this->callInterceptor($lastStackElement, \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER, $state);
-    }
-
-    /**
-     * Handles the appearance of an object accessor (like {posts.author.email}).
-     * Creates a new instance of \TYPO3\CMS\Fluid\ObjectAccessorNode.
-     *
-     * Handles ViewHelpers as well which are in the shorthand syntax.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\ParsingState $state The current parsing state
-     * @param string $objectAccessorString String which identifies which objects to fetch
-     * @param string $delimiter
-     * @param string $viewHelperString
-     * @param string $additionalViewHelpersString
-     * @return void
-     */
-    protected function objectAccessorHandler(\TYPO3\CMS\Fluid\Core\Parser\ParsingState $state, $objectAccessorString, $delimiter, $viewHelperString, $additionalViewHelpersString)
-    {
-        $viewHelperString .= $additionalViewHelpersString;
-        $numberOfViewHelpers = 0;
-
-        // The following post-processing handles a case when there is only a ViewHelper, and no Object Accessor.
-        // Resolves bug #5107.
-        if ($delimiter === '' && $viewHelperString !== '') {
-            $viewHelperString = $objectAccessorString . $viewHelperString;
-            $objectAccessorString = '';
-        }
-
-        // ViewHelpers
-        $matches = array();
-        if ($viewHelperString !== '' && preg_match_all(self::$SPLIT_PATTERN_SHORTHANDSYNTAX_VIEWHELPER, $viewHelperString, $matches, PREG_SET_ORDER) > 0) {
-            // The last ViewHelper has to be added first for correct chaining.
-            foreach (array_reverse($matches) as $singleMatch) {
-                if ($singleMatch['ViewHelperArguments'] !== '') {
-                    $arguments = $this->postProcessArgumentsForObjectAccessor(
-                        $this->recursiveArrayHandler($singleMatch['ViewHelperArguments'])
-                    );
-                } else {
-                    $arguments = array();
-                }
-                $this->initializeViewHelperAndAddItToStack($state, $singleMatch['NamespaceIdentifier'], $singleMatch['MethodIdentifier'], $arguments);
-                $numberOfViewHelpers++;
-            }
-        }
-
-        // Object Accessor
-        if ($objectAccessorString !== '') {
-            $node = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class, $objectAccessorString);
-            $this->callInterceptor($node, \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_OBJECTACCESSOR, $state);
-
-            $state->getNodeFromStack()->addChildNode($node);
-        }
-
-        // Close ViewHelper Tags if needed.
-        for ($i=0; $i<$numberOfViewHelpers; $i++) {
-            $node = $state->popNodeFromStack();
-            $this->callInterceptor($node, \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER, $state);
-        }
-    }
-
-    /**
-     * Call all interceptors registered for a given interception point.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $node The syntax tree node which can be modified by the interceptors.
-     * @param int $interceptionPoint the interception point. One of the \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_* constants.
-     * @param \TYPO3\CMS\Fluid\Core\Parser\ParsingState $state the parsing state
-     * @return void
-     */
-    protected function callInterceptor(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface &$node, $interceptionPoint, \TYPO3\CMS\Fluid\Core\Parser\ParsingState $state)
-    {
-        if ($this->configuration !== null) {
-            // $this->configuration is UNSET inside the arguments of a ViewHelper.
-            // That's why the interceptors are only called if the object accessor is not inside a ViewHelper Argument
-            // This could be a problem if We have a ViewHelper as an argument to another ViewHelper, and an ObjectAccessor nested inside there.
-            // @todo Clean up this.
-            $interceptors = $this->configuration->getInterceptors($interceptionPoint);
-            if (count($interceptors) > 0) {
-                foreach ($interceptors as $interceptor) {
-                    $node = $interceptor->process($node, $interceptionPoint, $state);
-                }
-            }
-        }
-    }
-
-    /**
-     * Post process the arguments for the ViewHelpers in the object accessor
-     * syntax. We need to convert an array into an array of (only) nodes
-     *
-     * @param array $arguments The arguments to be processed
-     * @return array the processed array
-     * @todo This method should become superflous once the rest has been refactored, so that this code is not needed.
-     */
-    protected function postProcessArgumentsForObjectAccessor(array $arguments)
-    {
-        foreach ($arguments as $argumentName => $argumentValue) {
-            if (!($argumentValue instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode)) {
-                $arguments[$argumentName] = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode::class, (string)$argumentValue);
-            }
-        }
-        return $arguments;
-    }
-
-    /**
-     * Parse arguments of a given tag, and build up the Arguments Object Tree
-     * for each argument.
-     * Returns an associative array, where the key is the name of the argument,
-     * and the value is a single Argument Object Tree.
-     *
-     * @param string $argumentsString All arguments as string
-     * @return array An associative array of objects, where the key is the argument name.
-     */
-    protected function parseArguments($argumentsString)
-    {
-        $argumentsObjectTree = array();
-        $matches = array();
-        if (preg_match_all(self::$SPLIT_PATTERN_TAGARGUMENTS, $argumentsString, $matches, PREG_SET_ORDER) > 0) {
-            $configurationBackup = $this->configuration;
-            $this->configuration = null;
-            foreach ($matches as $singleMatch) {
-                $argument = $singleMatch['Argument'];
-                $value = $this->unquoteString($singleMatch['ValueQuoted']);
-                $argumentsObjectTree[$argument] = $this->buildArgumentObjectTree($value);
-            }
-            $this->configuration = $configurationBackup;
-        }
-        return $argumentsObjectTree;
-    }
-
-    /**
-     * Build up an argument object tree for the string in $argumentString.
-     * This builds up the tree for a single argument value.
-     *
-     * This method also does some performance optimizations, so in case
-     * no { or < is found, then we just return a TextNode.
-     *
-     * @param string $argumentString
-     * @return SyntaxTree\AbstractNode the corresponding argument object tree.
-     */
-    protected function buildArgumentObjectTree($argumentString)
-    {
-        if (strpos($argumentString, '{') === false && strpos($argumentString, '<') === false) {
-            return $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode::class, $argumentString);
-        }
-        $splitArgument = $this->splitTemplateAtDynamicTags($argumentString);
-        $rootNode = $this->buildObjectTree($splitArgument, self::CONTEXT_INSIDE_VIEWHELPER_ARGUMENTS)->getRootNode();
-        return $rootNode;
-    }
-
-    /**
-     * Removes escapings from a given argument string and trims the outermost
-     * quotes.
-     *
-     * This method is meant as a helper for regular expression results.
-     *
-     * @param string $quotedValue Value to unquote
-     * @return string Unquoted value
-     */
-    protected function unquoteString($quotedValue)
-    {
-        switch ($quotedValue[0]) {
-            case '"':
-                $value = str_replace('\\"', '"', preg_replace('/(^"|"$)/', '', $quotedValue));
-            break;
-            case "'":
-                $value = str_replace("\\'", "'", preg_replace('/(^\'|\'$)/', '', $quotedValue));
-            break;
-            default:
-                $value = $quotedValue;
-        }
-        return str_replace('\\\\', '\\', $value);
-    }
-
-    /**
-     * Takes a regular expression template and replaces "NAMESPACE" with the
-     * currently registered namespace identifiers. Returns a regular expression
-     * which is ready to use.
-     *
-     * @param string $regularExpression Regular expression template
-     * @return string Regular expression ready to be used
-     */
-    protected function prepareTemplateRegularExpression($regularExpression)
-    {
-        return str_replace('NAMESPACE', implode('|', array_keys($this->namespaces)), $regularExpression);
-    }
-
-    /**
-     * Handler for everything which is not a ViewHelperNode.
-     *
-     * This includes Text, array syntax, and object accessor syntax.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\ParsingState $state Current parsing state
-     * @param string $text Text to process
-     * @param int $context one of the CONTEXT_* constants, defining whether we are inside or outside of ViewHelper arguments currently.
-     * @return void
-     */
-    protected function textAndShorthandSyntaxHandler(\TYPO3\CMS\Fluid\Core\Parser\ParsingState $state, $text, $context)
-    {
-        $sections = preg_split($this->prepareTemplateRegularExpression(self::$SPLIT_PATTERN_SHORTHANDSYNTAX), $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
-
-        foreach ($sections as $section) {
-            $matchedVariables = array();
-            if (preg_match(self::$SCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS, $section, $matchedVariables) > 0) {
-                $this->objectAccessorHandler($state, $matchedVariables['Object'], $matchedVariables['Delimiter'], isset($matchedVariables['ViewHelper']) ? $matchedVariables['ViewHelper'] : '', isset($matchedVariables['AdditionalViewHelpers']) ? $matchedVariables['AdditionalViewHelpers'] : '');
-            } elseif ($context === self::CONTEXT_INSIDE_VIEWHELPER_ARGUMENTS && preg_match(self::$SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS, $section, $matchedVariables) > 0) {
-                // We only match arrays if we are INSIDE viewhelper arguments
-                $this->arrayHandler($state, $matchedVariables['Array']);
-            } else {
-                $this->textHandler($state, $section);
-            }
-        }
-    }
-
-    /**
-     * Handler for array syntax. This creates the array object recursively and
-     * adds it to the current node.
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\ParsingState $state The current parsing state
-     * @param string $arrayText The array as string.
-     * @return void
-     */
-    protected function arrayHandler(\TYPO3\CMS\Fluid\Core\Parser\ParsingState $state, $arrayText)
-    {
-        $state->getNodeFromStack()->addChildNode(
-            $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ArrayNode::class, $this->recursiveArrayHandler($arrayText))
-        );
-    }
-
-    /**
-     * Recursive function which takes the string representation of an array and
-     * builds an object tree from it.
-     *
-     * Deals with the following value types:
-     * - Numbers (Integers and Floats)
-     * - Strings
-     * - Variables
-     * - sub-arrays
-     *
-     * @param string $arrayText Array text
-     * @return SyntaxTree\ArrayNode the array node built up
-     * @throws \TYPO3\CMS\Fluid\Core\Parser\Exception
-     */
-    protected function recursiveArrayHandler($arrayText)
-    {
-        $matches = array();
-        if (preg_match_all(self::$SPLIT_PATTERN_SHORTHANDSYNTAX_ARRAY_PARTS, $arrayText, $matches, PREG_SET_ORDER) > 0) {
-            $arrayToBuild = array();
-            foreach ($matches as $singleMatch) {
-                $arrayKey = $singleMatch['Key'];
-                if (!empty($singleMatch['VariableIdentifier'])) {
-                    $arrayToBuild[$arrayKey] = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class, $singleMatch['VariableIdentifier']);
-                } elseif (array_key_exists('Number', $singleMatch) && (!empty($singleMatch['Number']) || $singleMatch['Number'] === '0')) {
-                    $arrayToBuild[$arrayKey] = floatval($singleMatch['Number']);
-                } elseif ((array_key_exists('QuotedString', $singleMatch) && !empty($singleMatch['QuotedString']))) {
-                    $argumentString = $this->unquoteString($singleMatch['QuotedString']);
-                    $arrayToBuild[$arrayKey] = $this->buildArgumentObjectTree($argumentString);
-                } elseif (array_key_exists('Subarray', $singleMatch) && !empty($singleMatch['Subarray'])) {
-                    $arrayToBuild[$arrayKey] = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ArrayNode::class, $this->recursiveArrayHandler($singleMatch['Subarray']));
-                } else {
-                    throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('This exception should never be thrown, as the array value has to be of some type (Value given: "' . var_export($singleMatch, true) . '"). Please post your template to the bugtracker at forge.typo3.org.', 1225136013);
-                }
-            }
-            return $arrayToBuild;
-        } else {
-            throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('This exception should never be thrown, there is most likely some error in the regular expressions. Please post your template to the bugtracker at forge.typo3.org.', 1225136014);
-        }
-    }
-
-    /**
-     * Text node handler
-     *
-     * @param \TYPO3\CMS\Fluid\Core\Parser\ParsingState $state
-     * @param string $text
-     * @return void
-     */
-    protected function textHandler(\TYPO3\CMS\Fluid\Core\Parser\ParsingState $state, $text)
-    {
-        $node = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode::class, $text);
-        $this->callInterceptor($node, \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_TEXT, $state);
-
-        $state->getNodeFromStack()->addChildNode($node);
-    }
-}
index 3802a68..5de3718 100644 (file)
@@ -1,17 +1,41 @@
 <?php
 namespace TYPO3\CMS\Fluid\Core\Rendering;
 
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-class RenderingContext implements \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Cache\CacheManager;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Object\ObjectManager;
+use TYPO3\CMS\Fluid\Core\Cache\FluidTemplateCache;
+use TYPO3\CMS\Fluid\Core\Parser\PreProcessor\XmlnsNamespaceTemplatePreProcessor;
+use TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\Expression\LegacyNamespaceExpressionNode;
+use TYPO3\CMS\Fluid\Core\Variables\CmsVariableProvider;