User tests: Successful: Unsuccessful:
Adds the AllowDynamicProperties
attribute to the core classes Table
, MenuItem
and CMSObject
to mark them as classes which do use dynamic properties.
Open the back end with PHP 8.2.
Tons of deprecated warnings like:
Deprecated: Creation of dynamic property ...... is deprecated in
No warning in the mentioned classes.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
Labels |
Added:
PHP 8.x
?
|
Title |
|
I wanted to make it explicit for better understanding.
Table/CMSObject obviously fine (I mean Hannes is right but I have no problem with it being explicit). In theory MenuItem shouldn't have needed this. Is there a public property missing from the class or something?
In theory MenuItem shouldn't have needed this. Is there a public property missing from the class or something?
I thought the same till I saw this code
https://github.com/joomla/joomla-cms/blob/4.2-dev/libraries/src/Menu/MenuItem.php#L208
I am also unsure about MenuItem
class. It does not need AllowDynamicProperties
attribute. It should be added to AdministratorMenuItem
class instead, at least from what I see in core usages.
I have tested this item
Change my mind. Dynamic properties for MenuItem class are added MenuHelper class of mod_menu frontend.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-01-12 15:34:39 |
Closed_By | ⇒ | HLeithner | |
Labels |
Added:
?
|
At some point we should get rid of all dynamic properties but for now I think being explicit makes it better to identify problems
thanks
Do we need this for the Table class? Doesn't it inherit that behavior from the CMSObject class?