Preparations
- in Web Browser:
- login to Admin Console
- go to Logs & Reports → System Log section
- in IDE:
- add these lines to the beginning of the kUnitConfigReader::scanModules method:
trigger_error('regular notice', E_USER_NOTICE); kUtil::deprecatedMethod(__METHOD__, 'V1'); kUtil::deprecatedMethod(__METHOD__, 'V2', 'newMethod()'); kUtil::deprecatedArgument(__METHOD__, 'V3'); kUtil::deprecatedArgument(__METHOD__, 'V3', 'The "$cache" argument is deprecated.');
Part 1
- enable Debug Mode in /system/debug.php file
- confirm, that:
- regular notice appear in both Debugger and System Log and have these messages:
- regular notice
- notice has Notice (#...) red text displayed in front of the message in Debugger (the ... can be any number)
- deprecation notices appear in both Debugger and System Log and have these messages:
- kUnitConfigReader::scanModules is deprecated since version V1 with no alternative available.
- kUnitConfigReader::scanModules is deprecated since version V2! Use newMethod() instead.
- kUnitConfigReader::scanModules was called with an argument that is deprecated since version V3 with no alternative available.
- kUnitConfigReader::scanModules was called with an argument that is deprecated since version V3! The "$cache" argument is deprecated.
- the deprecated word in each error message is written in bold (in both Debugger and System Log)
- deprecation notices have Deprecation Notice (#...) red text displayed in front of the message in Debugger (the ... can be any number)
- regular notice appear in both Debugger and System Log and have these messages:
- set error in Show dropdown on top of the Debugger report
- confirm, that only records with Notice and Debugger Notice red prefixes are displayed
Part 2
- disable Debug Mode in /system/debug.php file
- reload the page
- confirm, that only regular notice notice is logged in into System Log
Part 3
- enable Debug Mode in /system/debug.php file
- in IDE:
- add this code to the /admin/index.php file after $application->Init(); call:
/** @var OrderHelper $order_helper */ $order_helper = $application->recallObject('OrderHelper'); $order_helper->getCreditCartType('xx');
- confirm, that in OrderHelper::getCreditCartType method:
- the version is indicated in @deprecated tag
- the @see tag is present indicating correct method name to be called
- in Web Browser:
- reload the page
- confirm, that deprecation notice with OrderHelper::getCreditCartType is deprecated since version 5.2.2-B1! Use OrderHelper::getCreditCardType instead. text appears
- confirm, that the deprecated word in each error message is written in bold (in both Debugger and System Log)
Part 4
- go to IDE
- confirm, that only silenced deprecation notices are triggered from 2 added kUtil class methods