No Code Attached Yet
avatar liuvz
liuvz
22 Nov 2023

Steps to reproduce the issue

  1. Joomla 4.4 or Joomla 5 on PHP 8.2 or PHP 9
  2. create an own field type "myfield" on some component "mycomponent"
  3. in the custom field xml defination there is a custom property "my_property"
  4. the field looks like: <field name="some_name" type="myfield" my_property="some_value" ... />

Expected result

It works as it usually did on PHP 5.6 / 7 / 8.1

Actual result

Warnings "Dynamic Properties are deprecated" on PHP 8.2
Fatal Error on PHP 9

System information (as much as possible)

Joomla 4.4 or Joomla 5 on PHP 8.2 or PHP 9

Additional comments

https://php.watch/versions/8.2/dynamic-properties-deprecated
Note that setting a dynamic property from within the __set method is still deprecated.

Unfortunately in the file /libraries/src/Form/FormField.php the dynamic property could exist in the case, which I described before.

avatar liuvz liuvz - open - 22 Nov 2023
avatar liuvz liuvz - change - 22 Nov 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 22 Nov 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Nov 2023
avatar joomdonation
joomdonation - comment - 24 Feb 2024

@liuvz Shouldn't you add the missing properties to your custom field class to prevent these warning? The fields from core should work fine. If you see any fields from Joomla core having this issue, please report it back so that It could be fixed

Otherwise, this issue should be closed.

avatar liuvz
liuvz - comment - 24 Feb 2024

@joomdonation Thank you for your reply. You are right, indeed the properties were not defined in the class of custom field type. I was using the tool component-creator.com, in their program some properties are missing in some of their custom field type classes, I will report the issues to them.
This issue can be closed.


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

avatar joomdonation joomdonation - change - 24 Feb 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-02-24 11:21:20
Closed_By joomdonation
avatar joomdonation joomdonation - close - 24 Feb 2024
avatar joomdonation
joomdonation - comment - 24 Feb 2024

Thanks @liuvz. Closing this issue.

Add a Comment

Login with GitHub to post a comment