Skip to content

Conversation

@heelc29
Copy link
Contributor

@heelc29 heelc29 commented Dec 27, 2022

Summary of Changes

The creation of dynamic properties is deprecated

https://www.php.net/manual/en/migration82.deprecated.php#migration82.deprecated.core.dynamic-properties

Testing Instructions

Open frontend where mod_articles_latest and/or mod_articles_news are displayed

Actual result BEFORE applying this Pull Request

PHP Deprecated: Creation of dynamic property Joomla\Module\ArticlesLatest\Site\Dispatcher\Dispatcher::$helper is deprecated in libraries/src/Helper/HelperFactoryAwareTrait.php on line 61
PHP Deprecated: Creation of dynamic property Joomla\Module\ArticlesNews\Site\Dispatcher\Dispatcher::$helper is deprecated in libraries/src/Helper/HelperFactoryAwareTrait.php on line 61

Expected result AFTER applying this Pull Request

No deprecated message

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

ping @laoneo who introduced helper factory aware interface in #37445
I'm not sure if this the "right" fix for b/c, also the variable names of the interface and trait do not match:

public function setHelperFactory(HelperFactory $helper);

public function setHelperFactory(HelperFactory $helperFactory)

@laoneo laoneo added the PHP 8.x PHP 8.x deprecated issues label Jan 3, 2023
@laoneo
Copy link
Member

laoneo commented Jan 11, 2023

This is ok like that. Was probably a copy paste error at that time.

@laoneo laoneo marked this pull request as ready for review January 11, 2023 12:43
@laoneo
Copy link
Member

laoneo commented Jan 11, 2023

I have tested this item ✅ successfully on 986bdb3


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

1 similar comment
@carlitorweb
Copy link
Member

I have tested this item ✅ successfully on 986bdb3


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

@Quy Quy added PHP 8 and removed PHP 8.x PHP 8.x deprecated issues labels Jan 12, 2023
@Quy
Copy link
Contributor

Quy commented Jan 12, 2023

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jan 12, 2023
@Quy Quy added PHP 8.x PHP 8.x deprecated issues and removed PHP 8 labels Jan 12, 2023
@HLeithner HLeithner merged commit d743306 into joomla:4.2-dev Jan 12, 2023
@HLeithner
Copy link
Member

thanks

@joomla-cms-bot joomla-cms-bot removed RTC This Pull Request is Ready To Commit labels Jan 12, 2023
@Quy Quy added this to the Joomla! 4.2.7 milestone Jan 13, 2023
@heelc29 heelc29 deleted the 4.2/php82/dynamic-properties/helperfactory branch January 15, 2023 11:44
@MarkRS-UK
Copy link
Contributor

MarkRS-UK commented May 18, 2023

Presumably this didn't get into 4.2.7? Still seems to be a problem on 4.3.1. I'm seeing

Deprecated: Creation of dynamic property JFormFieldMediaJce::$mediatype is deprecated in <mySite>/libraries/src/Form/FormField.php on line 591

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PHP 8.x PHP 8.x deprecated issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants