[5.0] Replaces the dependency for model state with a State object#39024
[5.0] Replaces the dependency for model state with a State object#39024laoneo wants to merge 9 commits intojoomla:5.0-devfrom
Conversation
8cf197c to
e6f6399
Compare
e6f6399 to
a9aa13d
Compare
|
I have tested this item ✅ successfully on a9aa13d This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39024. |
|
Is there a reason not to use Registry? Given it has similar methods as JObject for b/c purposes but also implements arrayAccess as an interface which could be situationally useful |
|
I tried to use registry but it doesn't support field access. So it would be a hard BC break. It is also massive slower than CMSObject or this new State class. |
|
Registry have some benefits also. In future you probably will be need serialisation, cloning. Performance issue can overcome by disabling |
|
But then I would rather extend the registry class with the magic methods and not introduce a new class at all. |
This would be against the argumentation in joomla-framework/registry#58 |
|
I made an alternative which is using the registry in #39663. |
|
Closing in favor of #39663. When joomla-framework/registry#66 got merged, then we have the same speed without a new class which does more or less the same as the registry. |
* joomla/joomla-cms#39024 * Update new-features.md * Update new-features.md * Update new-features.md * registry --------- Co-authored-by: Harald Leithner <leithner@itronic.at>
* Add deprecation for joomla/joomla-cms#39024 * Update new-deprecations.md * Update new-deprecations.md * Update new-deprecations.md * Update new-deprecations.md * Better text * cs
Summary of Changes
Replaces the state holder for model with an array based class. It removes the dependency for the deprecated
CMSObjectclass.Like that he performance can be improved by a third against using the
CMSObjectclass.Testing Instructions
Actual result BEFORE applying this Pull Request
No article is shown.
Expected result AFTER applying this Pull Request
No article is shown.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org: Document the new State class Manual#78 and Add deprecation for State object in favor of Registry Manual#77
No documentation changes for manual.joomla.org needed