? Pending

User tests: Successful: Unsuccessful:

avatar roland-d
roland-d
3 Sep 2019

Summary of Changes

Since we are supporting PHP 7.2+ in Joomla 4, we should add typehinting for more robust code. This PR adds typehinting and cleans up some code for the com_actionlog component.

There are no new features, only code cleanup.

Testing Instructions

  1. Apply this PR
  2. Check in the plugins if the actionlog plugins are enabled
  3. Check the following actions work without error and are recorded in the actionlogs:
  • Saving an article
  • Deleting an article
  • Change state of an article
  • Saving the global configuration
  • Install an extension
  • Uninstall an extension
  • Update an extension
  • Save plugin settings
  • Add a module
  • Delete a module
  • Create a user
  • Delete a user
  • Create a usergroup
  • Delete a usergroup
  • User normal login
  • User failed login
  • User logout
  • Send password reminder
  • Send username reminder
  • Check-in an article
  • Export action logs
  • Purge the action logs

Expected result

All actions are successful and recorded in the action logs

Documentation Changes Required

None as far as I am aware.

avatar roland-d roland-d - open - 3 Sep 2019
avatar roland-d roland-d - change - 3 Sep 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Sep 2019
Category Administration Front End Plugins
avatar roland-d roland-d - change - 3 Sep 2019
Labels Added: ?
avatar mbabker
mbabker - comment - 3 Sep 2019

While I realize that PHP 7.2 is a bit more forgiving with type covariance and contravariance, and that components have generally not fallen under Joomla's B/C policies, I'm just going to link to the original PHP 7 announcement where it was explicitly stated that pre-existing APIs weren't going to have their signatures changed unless the change added value or the change was in a scope that had minimal to no impact (i.e. a final class or private method).

I like strictly typed APIs, but typehinting existing APIs runs into B/C issues, and with a system like Joomla where it has relied on duck typing to a fault the types need to be reviewed very thoroughly for hidden gotcha's, which is why I took the "only typehint new things" approach myself.

avatar roland-d
roland-d - comment - 3 Sep 2019

Since this PR is primarily typehinting existing APIs I will close it.

avatar roland-d roland-d - change - 3 Sep 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-09-03 17:23:19
Closed_By roland-d
avatar roland-d roland-d - close - 3 Sep 2019

Add a Comment

Login with GitHub to post a comment