Tags: TYPO3/Fluid
Tags
[TASK] Deprecate ViewHelper namespace inheritance (#1080) Fluid v5 will no longer support inheritance of ViewHelper namespaces from a template to its layout or partials. Namespace must either be added globally (by using the public `ViewHelperResolver` API) or by using the `{namespace x=…}` or `xmlns:x="…"` syntax in the template file that uses the ViewHelper. This patch prepares the removal of this feature by implementing separate namespace collections for global, local and inherited ViewHelper namespaces. Depending on the context, ViewHelpers will be added to the appropriate collection. When a ViewHelper is called, the different collections will be checked for a matching namespace. Also, contexts get their own `ViewHelperResolver` instances to isolate them properly. If a namespace is only defined in a parent template, but not in the template itself or in the global collection, a deprecation will be emitted, which allows to prepare existing templates before switching to Fluid v5 later on. To resolve a deprecation, all ViewHelper namespaces that are used within a template need to be either defined globally (like f:*) or directly in the template file. With Fluid v5, the backwards compatibility layer for inherited namespaces will be removed, which will be a breaking change. This change is a hard requirement for a more reasonable cache warmup feature for Fluid templates. Resolves: #985
[BUGFIX] Address regression in condition VH with else attribute (#1059) The recent changes on condition-based ViewHelpers introduced a regression if a ViewHelper specifies "else" as an attribute, while "then" is specified implicitly via the tag's content: ``` <f:if condition="{someVar}" else="{someStringVar}">It works!</f:if> ``` In that case, the "then" portion ("It works!") is ignored due to a bug in cache compilation. This has been addressed with this patch and the missing test cases have been added to the test suite. Resolves: #1058
[TASK] Adjust interface type hint to match current implementation (#1016 ) Currently, the actual View instance in fact doesn't always return a string for `render()`. We should change this in the future, but for now the interface should represent the actual implementation.
[TASK] Catch errors in schema generation and collect them (#1008) There are cases when errors occur on iterating through the installed view helpers. The generation of the XSDs then break hard with an exception. Currently, this occurs with the TYPO3 extension "schema". Now, these errors are catched and collected. A calling script can get and display these errors. This way, the generation of XSDs is not cancelled, but proceed without the erroneous view helpers. This is especially useful for the TYPO3 command "fluid:schema:generate". Related: #1005
[FEATURE] Respect ContainerInterface in StandardVariableProvider (#1002) With this change, it is possible to access properties of objects implementing `Psr\Container\ContainerInterface` from Fluid templates using the normal object accessor syntax. The interface requires two methods `has()` and `get()` which are used by Fluid to obtain the requested property from the object.
PreviousNext