? PHP 8.x ? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
22 Jan 2023

Pull Request for Issue # .

Summary of Changes

This simple PR adds missing properties to various classes in our libraries to avoid deprecated warning missing properties in PHP 8.2. These missing properties are detected automatically by rector CompleteDynamicPropertiesRector rule.

Testing Instructions

  1. Code review should be enough
  2. Or apply patch, installing extension and make sure it is still working OK.

Actual result BEFORE applying this Pull Request

Deprecated warnings when installing package extensions on PHP 8.2 and in some other places.

Expected result AFTER applying this Pull Request

No warnings anymore.

Link to documentations

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jan 2023
Category Libraries
avatar joomdonation joomdonation - open - 22 Jan 2023
avatar joomdonation joomdonation - change - 22 Jan 2023
Status New Pending
avatar richard67
richard67 - comment - 22 Jan 2023

@joomdonation PHPCS complains about the new variable with the name beginning with an underscore here:

FILE: /********/src/libraries/src/Installer/Manifest.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 31 | WARNING | Property name "$_errors" should not be prefixed with
    |         | an underscore to indicate visibility
----------------------------------------------------------------------

You can solve that by adding file "libraries/src/Installer/Manifest.php" to the list of allowed exceptions in the ruleset in this section: https://github.com/joomla/joomla-cms/blob/4.2-dev/ruleset.xml#L32 like it has been already done for file "libraries/src/Client/FtpClient.php", which is full of such variable names.

b3a45d1 23 Jan 2023 avatar joomdonation CS
avatar joomdonation joomdonation - change - 23 Jan 2023
Labels Added: PHP 8.x ?
avatar carlitorweb carlitorweb - test_item - 25 Jan 2023 - Tested successfully
avatar carlitorweb
carlitorweb - comment - 25 Jan 2023

I have tested this item successfully on f1c41ff


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39691.

avatar viocassel viocassel - test_item - 26 Jan 2023 - Tested successfully
avatar viocassel
viocassel - comment - 26 Jan 2023

I have tested this item successfully on f1c41ff


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39691.

avatar Quy Quy - change - 26 Jan 2023
Status Pending Ready to Commit
avatar Quy
Quy - comment - 26 Jan 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39691.

avatar laoneo
laoneo - comment - 26 Jan 2023

The error variable needs to be deprecated then in 4.3 as it is probably a leftover in conjunction with CMSObject and not used anymore.

avatar fancyFranci fancyFranci - change - 11 Feb 2023
Labels Added: ? ?
avatar fancyFranci fancyFranci - change - 11 Feb 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-02-11 13:14:39
Closed_By fancyFranci
avatar fancyFranci fancyFranci - close - 11 Feb 2023
avatar fancyFranci fancyFranci - merge - 11 Feb 2023
avatar fancyFranci
fancyFranci - comment - 11 Feb 2023

Thanks for fixing the warnings!

Add a Comment

Login with GitHub to post a comment