mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
🔊 N°3731 Log calls to deprecated files / PHP methods
POC for the log API was added in #193
This commit is contained in:
@@ -111,6 +111,7 @@ class DBRestore extends DBBackup
|
||||
*/
|
||||
public function RestoreFromZip($sZipFile, $sEnvironment = 'production')
|
||||
{
|
||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod('Use RestoreFromCompressedBackup instead');
|
||||
$this->RestoreFromCompressedBackup($sZipFile, $sEnvironment);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ use cmdbAbstractObject;
|
||||
use Combodo\iTop\Portal\Brick\AbstractBrick;
|
||||
use DBObjectSearch;
|
||||
use DBObjectSet;
|
||||
use DeprecatedCallsLog;
|
||||
use Dict;
|
||||
use Exception;
|
||||
use IssueLog;
|
||||
@@ -60,6 +61,7 @@ class ApplicationHelper
|
||||
*/
|
||||
public static function LoadClasses($sScannedDir, $sFilePattern, $sType)
|
||||
{
|
||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod();
|
||||
@trigger_error(
|
||||
sprintf(
|
||||
'Usage of legacy LoadClasses is deprecated. You should rely on autoloading (and therefore follow PSR4).',
|
||||
|
||||
@@ -26,6 +26,7 @@ use CorePortalInvalidActionRuleException;
|
||||
use DBObject;
|
||||
use DBObjectSet;
|
||||
use DBSearch;
|
||||
use DeprecatedCallsLog;
|
||||
use DOMFormatException;
|
||||
use DOMNodeList;
|
||||
use Exception;
|
||||
@@ -443,15 +444,14 @@ class ContextManipulatorHelper
|
||||
*/
|
||||
public function GetCallbackUrls(array $aData, DBObject $oObject, $bModal = false)
|
||||
{
|
||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod('Use navigation rules for form callbacks');
|
||||
$aResults = array(
|
||||
'submit' => null,
|
||||
'cancel' => null,
|
||||
);
|
||||
|
||||
if (isset($aData['rules']))
|
||||
{
|
||||
foreach ($aData['rules'] as $sId)
|
||||
{
|
||||
if (isset($aData['rules'])) {
|
||||
foreach ($aData['rules'] as $sId) {
|
||||
// Retrieving current rule
|
||||
$aRule = $this->GetRule($sId);
|
||||
|
||||
|
||||
@@ -19,13 +19,14 @@
|
||||
|
||||
namespace Combodo\iTop\Portal;
|
||||
|
||||
use utils;
|
||||
use DeprecatedCallsLog;
|
||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\Config\Resource\FileResource;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||
use Symfony\Component\Routing\RouteCollectionBuilder;
|
||||
use utils;
|
||||
|
||||
/**
|
||||
* Class Kernel
|
||||
@@ -121,6 +122,7 @@ class Kernel extends BaseKernel
|
||||
*/
|
||||
public function isClassInActiveBundle($class)
|
||||
{
|
||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod();
|
||||
// TODO: Implement isClassInActiveBundle() method.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,12 +47,11 @@ class SLAComputation implements iWorkingTimeComputer
|
||||
*/
|
||||
public static function SelectModule($sClassName)
|
||||
{
|
||||
if (!class_exists($sClassName))
|
||||
{
|
||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod();
|
||||
if (!class_exists($sClassName)) {
|
||||
throw new CoreException("Could not select this module, '$sClassName' in not a valid class name");
|
||||
}
|
||||
if (($sClassName != 'SLAComputationAddOnAPI') && !is_subclass_of($sClassName, 'SLAComputationAddOnAPI'))
|
||||
{
|
||||
if (($sClassName != 'SLAComputationAddOnAPI') && !is_subclass_of($sClassName, 'SLAComputationAddOnAPI')) {
|
||||
throw new CoreException("Could not select this module, the class '$sClassName' is not derived from SLAComputationAddOnAPI (parent class:".get_parent_class($sClassName)." )");
|
||||
}
|
||||
self::$m_oAddOn = new $sClassName;
|
||||
@@ -143,6 +142,7 @@ class SLAComputationAddOnAPI
|
||||
*/
|
||||
public function Init()
|
||||
{
|
||||
DeprecatedCallsLog::NotifyDeprecatedPhpMethod();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user