.. include:: /Includes.rst.txt

.. _changelog-4.x:

=============
Changelog 4.x
=============

4.5
---

* Deprecation: Using the `xmlns` namespace syntax with a PHP namespace instead of an url is deprecated
  and will no longer work in Fluid v5.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper::validateArguments()`
  has been marked as deprecated and will be removed in Fluid v5.
* Deprecation: Custom implementations of the `validateArguments()` methods in ViewHelpers will no longer
  be called in Fluid v5. Use :php:`TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperArgumentsValidatedEventInterface`
  instead.
* Deprecation: Classes, interfaces, methods and constants related to cache warmup are deprecated and will be removed in Fluid v5:
    * :php:`TYPO3Fluid\Fluid\Core\Cache\FluidCacheInterface::getCacheWarmer()`
    * :php: `TYPO3Fluid\Fluid\Core\Cache\SimpleFileCache::getCacheWarmer()`
    * :php:`TYPO3Fluid\Fluid\Core\Cache\FluidCacheWarmerInterface`
    * :php:`TYPO3Fluid\Fluid\Core\Cache\StandardCacheWarmer`
    * :php:`TYPO3Fluid\Fluid\Core\Cache\FluidCacheWarmupResult`
    * :php:`TYPO3Fluid\Fluid\Core\Compiler\FailedCompilingState`
    * :php:`TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler::MODE_NORMAL`
    * :php:`TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler::MODE_WARMUP`
    * :php:`TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler::$mode`
    * :php:`TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler::enterWarmupMode()`
    * :php:`TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler::isWarmupMode()`
* Deprecation: The `<f:cache.warmup>` ViewHelper is deprecated and will be removed in Fluid v5.
* Deprecation: Fluid variable names can no longer start with an underscore character (`_`). Adding such a variable to a template
  now emits a E_USER_DEPRECATED level error and will result in an exception in Fluid v5. Note that this doesn't affect array
  keys or object property names, only the name of the variable itself.
* Deprecation: Replacing `<![CDATA[]]>` sections by empty lines is deprecated and will be removed in Fluid v5.
  Method :php:`TYPO3Fluid\Fluid\Core\Parser\TemplateProcessor\NamespaceDetectionTemplateProcessor.php::replaceCdataSectionsByEmptyLines()` now emits a E_USER_DEPRECATED level error.

4.4
---

* Deprecation: Setting a template's layout with the variable `layoutName` is deprecated and will no longer work in Fluid v5.
  Use :php:`TYPO3Fluid\Fluid\Core\Parser\ParsingState->setLayoutName()` instead.
* Deprecation: Constant :php:`TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler::LAYOUT_VARIABLE`
  has been marked as deprecated and will be removed in Fluid v5.

4.3
---

* Deprecation: Property :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper::$childNodes`
  has been marked as deprecated and will be removed in Fluid v5. Use `$viewHelperNode->getChildNodes()`
  instead.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper::setChildNodes()`
  has been marked as deprecated and will be removed in Fluid v5.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInterface::setChildNodes()`
  has been marked as deprecated and will be removed in Fluid v5.

4.2
---

* Deprecation: Method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperResolver::resolvePhpNamespaceFromFluidNamespace()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperResolver::isNamespaceValidOrIgnored()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Constant :php:`TYPO3Fluid\Fluid\Core\Parser\Patterns::NAMESPACESUFFIX`
  has been marked as deprecated and will be removed in Fluid v5.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper::isValidType()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper::getFirstElementOfNonEmpty()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper::postParseEvent()`
  now emits a E_USER_DEPRECATED level error. It will be removed with Fluid v5. ViewHelpers using this event
  should switch to the new :php:`TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperNodeInitializedEventInterface`
* Deprecation: Method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperResolver::addNamespaces()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Inheritance of ViewHelper namespaces is deprecated. If a ViewHelper namespace is used in a
  template that is neither defined globally nor locally directly in the template, Fluid now emits a
  E_USER_DEPRECATED level error.

4.0
---

* Breaking: Method :php:`TYPO3Fluid\Fluid\View\AbstractTemplateView::initializeRenderingContext()`
  has been removed.
* Breaking: Method :php:`TYPO3Fluid\Fluid\View\AbstractTemplateView::setCache()`
  has been removed.
* Breaking: Method :php:`TYPO3Fluid\Fluid\View\AbstractTemplateView::getTemplatePaths()`
  has been removed.
* Breaking: Method :php:`TYPO3Fluid\Fluid\View\AbstractTemplateView::getViewHelperResolver()`
  has been removed.
* Breaking: Change visibility of class constants that represent internal Fluid state. The
  following constants have been set to `protected` and can only be accessed by
  `AbstractTemplateView` and its child implementations:
  :php:`TYPO3Fluid\Fluid\View\AbstractTemplateView::RENDERING_TEMPLATE`,
  :php:`TYPO3Fluid\Fluid\View\AbstractTemplateView::RENDERING_PARTIAL`,
  :php:`TYPO3Fluid\Fluid\View\AbstractTemplateView::RENDERING_LAYOUT`
* Breaking: Careful addition of method and property type hints throughout the system.
  This should be only mildly breaking and projects should be able to adapt easily.
* Deprecation: First parameter of method :php:`TYPO3Fluid\Fluid\View\TemplatePaths->__construct()`
  is deprecated. The Constructor will be removed with Fluid v5.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\View\TemplatePaths->fillFromConfigurationArray()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\View\TemplatePaths->fillDefaultsByPackageName()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\View\TemplatePaths->ensureAbsolutePaths()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\View\TemplatePaths->extractPathArrays()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\View\TemplatePaths->getPackagePath()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\View\TemplatePaths->toArray()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Constant :php:`TYPO3Fluid\Fluid\View\TemplatePaths::DEFAULT_TEMPLATES_DIRECTORY`
  has been marked as deprecated and will be removed in Fluid v5.
* Deprecation: Constant :php:`TYPO3Fluid\Fluid\View\TemplatePaths::DEFAULT_LAYOUTS_DIRECTORY`
  has been marked as deprecated and will be removed in Fluid v5.
* Deprecation: Constant :php:`TYPO3Fluid\Fluid\View\TemplatePaths::DEFAULT_PARTIALS_DIRECTORY`
  has been marked as deprecated and will be removed in Fluid v5.
* Deprecation: Trait :php:`TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Trait :php:`TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithContentArgumentAndRenderStatic`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Static method :php:`renderStatic()` on ViewHelpers that don't use :php:`TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic`
  or :php:`TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithContentArgumentAndRenderStatic` now emits a
  E_USER_DEPRECATED level error.
* Deprecation: Method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper->overrideArgument()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Calling method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper->registerUniversalTagAttributes()`
  now emits a E_USER_DEPRECATED level error.
* Deprecation: Calling method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper->registerTagAttribute()`
  now emits a E_USER_DEPRECATED level error.
* Breaking: Method :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper->evaluateCondition()`
  and handling has been removed.
* Breaking: Method :php:`TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode->getAccessors()`
  has been removed.
* Breaking: Constant :php:`TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler::SHOULD_GENERATE_VIEWHELPER_INVOCATION`
  has been removed.
* Breaking: Constant :php:`TYPO3Fluid\Fluid\Core\Variables\StandardVariableProvider::ACCESSOR_ARRAY`
  has been removed.
* Breaking: Constant :php:`TYPO3Fluid\Fluid\Core\Variables\StandardVariableProvider::ACCESSOR_GETTER`
  has been removed.
* Breaking: Constant :php:`TYPO3Fluid\Fluid\Core\Variables\StandardVariableProvider::ACCESSOR_ASSERTER`
  has been removed.
* Breaking: Constant :php:`TYPO3Fluid\Fluid\Core\Variables\StandardVariableProvider::ACCESSOR_PUBLICPROPERTY`
  has been removed.
* Breaking: Static property :php:`TYPO3Fluid\Fluid\Core\Parser\Patterns::$SCAN_PATTERN_ESCAPINGMODIFIER`
  has been removed.
* Breaking: Trait :php:`TYPO3Fluid\Fluid\Core\ViewHelper\Traits\ParserRuntimeOnly`
  has been removed.
* Breaking: Interface :php:`TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\Expression\ParseTimeEvaluatedExpressionNodeInterface`
  and its handling has been removed.
* Breaking: Class :php:`TYPO3Fluid\Fluid\Core\Variables\VariableExtractor`
  has been removed.
* Breaking: Class :php:`TYPO3Fluid\Fluid\Core\Compiler\ViewHelperCompiler`
  has been removed.
* Breaking: Exception :php:`TYPO3Fluid\Fluid\Core\Compiler\StopCompilingChildrenException`
  and its handling has been removed.
* Breaking: Test abstracts :php:`TYPO3Fluid\Fluid\Tests\BaseTestCase` and
  :php:`TYPO3Fluid\Fluid\Tests\UnitTestCase` have been removed.
* Breaking: Using invalid namespace `https://typo3.org` instead of
  `http://typo3.org` (https vs. http) throws an exception
* Important: Minimum PHP version has been raised to ^8.2
