Skip to content

Commit

Permalink
[TASK] Rename TypoScriptReferenceLoader to TypoScriptReferenceController
Browse files Browse the repository at this point in the history
Change-Id: I31fcc83c20766aacd3af7d8b68df9469d3db13dc
Resolves: #84411
Releases: master
Reviewed-on: https://review.typo3.org/56310
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
mbrodala authored and lolli42 committed Mar 17, 2018
1 parent a21470b commit 2912053
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 6 deletions.
@@ -0,0 +1,35 @@
.. include:: ../../Includes.txt

========================================================================================
Deprecation: #84411 - TypoScriptReferenceLoader renamed to TypoScriptReferenceController
========================================================================================

See :issue:`84411`

Description
===========

The PHP class :php:`TYPO3\CMS\T3editor\TypoScriptReferenceLoader` has been renamed to
:php:`TYPO3\CMS\T3editor\Controller\TypoScriptReferenceController`.


Impact
======

The old class name has been registered as class alias and will still work.
Old class name usage however is discouraged and should be avoided, the
alias will vanish with core version 10.


Affected Installations
======================

Extensions which use the old class name are affected. The extension scanner will find affected extensions using the old class name.


Migration
=========

Use new class name instead.

.. index:: Backend, PHP-API, FullyScanned, ext:t3editor
Expand Up @@ -669,4 +669,9 @@
'Deprecation-84409-ImageManipulationWizardRenamedToImageManipulationController.rst',
],
],
'TYPO3\CMS\T3editor\TypoScriptReferenceLoader' => [
'restFiles' => [
'Deprecation-84411-TypoScriptReferenceLoaderRenamedToTypoScriptReferenceController.rst',
],
],
];
@@ -1,5 +1,5 @@
<?php
namespace TYPO3\CMS\T3editor;
namespace TYPO3\CMS\T3editor\Controller;

/*
* This file is part of the TYPO3 CMS project.
Expand All @@ -21,7 +21,7 @@
/**
* Loads TSref information from a XML file an responds to an AJAX call.
*/
class TypoScriptReferenceLoader
class TypoScriptReferenceController
{
/**
* @var \DOMDocument
Expand All @@ -37,13 +37,12 @@ public function __construct()
}

/**
* General processor for AJAX requests.
* Called by AjaxRequestHandler
* Load TypoScript reference
*
* @param ServerRequestInterface $request
* @return ResponseInterface
*/
public function processAjaxRequest(ServerRequestInterface $request): ResponseInterface
public function loadReference(ServerRequestInterface $request): ResponseInterface
{
// Load the TSref XML information:
$this->loadFile(GeneralUtility::getFileAbsFileName('EXT:t3editor/Resources/Private/tsref.xml'));
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/t3editor/Configuration/Backend/AjaxRoutes.php
Expand Up @@ -7,7 +7,7 @@
// Get TSRef
't3editor_tsref' => [
'path' => '/t3editor/tsref',
'target' => \TYPO3\CMS\T3editor\TypoScriptReferenceLoader::class . '::processAjaxRequest'
'target' => \TYPO3\CMS\T3editor\Controller\TypoScriptReferenceController::class . '::loadReference'
],

// Load code completion templates
Expand Down
1 change: 1 addition & 0 deletions typo3/sysext/t3editor/Migrations/Code/ClassAliasMap.php
@@ -1,4 +1,5 @@
<?php
return [
'TYPO3\\CMS\\T3editor\\CodeCompletion' => \TYPO3\CMS\T3editor\Controller\CodeCompletionController::class,
'TYPO3\\CMS\\T3editor\\TypoScriptReferenceLoader' => \TYPO3\CMS\T3editor\Controller\TypoScriptReferenceController::class,
];
7 changes: 7 additions & 0 deletions typo3/sysext/t3editor/Migrations/Code/LegacyClassesForIde.php
Expand Up @@ -10,4 +10,11 @@
class CodeCompletion extends \TYPO3\CMS\T3editor\Controller\CodeCompletionController
{
}

/**
* @deprecated since v9, will be removed in v10
*/
class TypoScriptReferenceLoader extends \TYPO3\CMS\T3editor\Controller\TypoScriptReferenceController
{
}
}

0 comments on commit 2912053

Please sign in to comment.