N°6935 - Deprecate own router system in favor of Symfony's

This commit is contained in:
Molkobain
2023-12-14 15:03:06 +01:00
parent 1fee4372eb
commit 43d3a3bc67
8 changed files with 82 additions and 40 deletions

View File

@@ -6,6 +6,9 @@
namespace Combodo\iTop\Controller;
use DeprecatedCallsLog;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as BaseAbstractControllerAlias;
/**
* Class AbstractController
*
@@ -15,14 +18,17 @@ namespace Combodo\iTop\Controller;
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
* @package Combodo\iTop\Controller
* @since 3.1.0
* @since 3.2.0 N°6935 Controller is now based on Symfony controller
*/
abstract class AbstractController implements iController
abstract class AbstractController extends BaseAbstractControllerAlias implements iController
{
/**
* @inheritDoc
* @deprecated 3.2.0 N°6935 Use \Symfony\Component\HttpFoundation\Request::isXmlHttpRequest() instead
*/
public function IsHandlingXmlHttpRequest(): bool
{
DeprecatedCallsLog::NotifyDeprecatedPhpMethod("Use \Symfony\Component\HttpFoundation\Request::isXmlHttpRequest() instead");
return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && ($_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest');
}
}