? ? ? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
28 Aug 2017

Summary of Changes

  • Updates the new error handling library to use PHP 7 typing features (typehint Throwable, scalar typehints, return types)
  • Removes the protected doRender method in the error handling library, only existed to allow the interface's render() method handle type checking that we can now handle with the method signature alone
  • Adds the Throwable typehint to methods we register as a global Exception handler via set_exception_handler() and removes the internal type checking
  • Removes checks for the base Exception class when also checking for the Throwable interface, we only need to check the interface in these locations

Testing Instructions

  • Error handling code still processes correctly

Documentation Changes Required

The Joomla\CMS\Exception\ExceptionHandler::render() signature is changed to include the Throwable typehint. Before 3.5 when PHP 7 support was added this was typehinted as Exception. As this method normally shouldn't be directly called except for code which is already handling a Throwable object, this should be a minimal impact change.

avatar joomla-cms-bot joomla-cms-bot - change - 28 Aug 2017
Category Installation Libraries Front End Plugins Unit Tests
avatar mbabker mbabker - open - 28 Aug 2017
avatar mbabker mbabker - change - 28 Aug 2017
Status New Pending
avatar wilsonge wilsonge - change - 29 Aug 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-08-29 10:25:18
Closed_By wilsonge
Labels Added: ? ? ?
avatar wilsonge wilsonge - close - 29 Aug 2017
avatar wilsonge wilsonge - merge - 29 Aug 2017

Add a Comment

Login with GitHub to post a comment