Commit 031c2389 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Deprecate extbase EmptyView

Extbase EmptyView is unused since its introduction in
4.5. Calling render() returns a html comment. It has
been substituted by NotFoundView within 4.5 development
already. NotFoundView is removed with a different
patch, too.

Resolves: #95005
Related: #95003
Releases: master
Change-Id: I8bbb4a641fa05fe34e2f7eabd7621ec3c0fe7bdd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70769

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 6b153368
.. include:: ../../Includes.txt
=======================================
Deprecation: #95005 - Extbase EmptyView
=======================================
See :issue:`95005`
Description
===========
To further clean up and streamline fluid view related functionality,
extbase related view class :php:`TYPO3\CMS\Extbase\Mvc\View\EmptyView`
has been deprecated.
Impact
======
Using :php:`EmptyView` has been deprecated and logs a deprecation
level error upon use.
Affected Installations
======================
The class has been unused within TYPO3 core since its introduction in 4.5.
It is rather unlikely instances have extensions using the class. The extension
scanner finds usages with a strong match.
Migration
=========
If rendering "nothing" by a view instance is needed for whatever reason, the
same result can be achieved with a :php:`TYPO3\CMS\Fluid\View\StandaloneView`
view instance by setting :php:`$view->setTemplateSource('')` and calling
:php:`$view->render()`. But it's of course quicker to simply not render
anything at all.
.. index:: PHP-API, FullyScanned, ext:extbase
......@@ -19,9 +19,16 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
/**
* An empty view - a special case.
*
* @deprecated since v11, will be removed with 12.
*/
class EmptyView implements ViewInterface
{
public function __construct()
{
trigger_error('Class ' . __CLASS__ . ' has been deprecated in v11 and will be removed with v12.');
}
/**
* Dummy method to satisfy the ViewInterface
*
......
......@@ -1779,4 +1779,9 @@ return [
'Deprecation-94991-ExtbaseAbstractView.rst',
],
],
'TYPO3\CMS\Extbase\Mvc\View\EmptyView' => [
'restFiles' => [
'Deprecation-95005-ExtbaseEmptyView.rst',
],
],
];
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment