User tests: Successful: Unsuccessful:
Create a new JComponentRecord
value object representing the object loaded by JComponentHelper::load()
for a component. Shift the logic for converting the record's parameters to a Registry
object to the point where the parameters are first accessed (this removes a needless conversion if calling JComponentHelper::isEnabled()
and that is the only interaction with a component's record).
The value object extends JObject
as a bridge to help with the transition. At 4.0, this class extension should be dropped as well as the magic getter/setter methods.
The CMS still functions as intended. Component parameters are lazy loaded when needed.
Document the new class and scheduled deprecations.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
Category | Libraries | ⇒ | Libraries Unit Tests |
Labels |
Added:
?
|
I have tested this item
1. Access to some pages in frontend, backend, creating new articles and all still working as expected
I have tested this item
Click on different Menues in Frontend, append Menu and Modules.
Don't tested lazy load cause don't know how.
RTC as there are 2 successfully Tests?
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Labels |
RTC
Agreed on the concept, but because JObject is deprecated in 4.0, why we are doing it? Or will you remove the extension of JObject in 4.0 and keep the value object?
The extension of JObject is just to be extremely safe about it (we're converting from a stdClass
to the value object). The extension goes away in 4.0 and the object stays.
ok, so I got the idea
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-02-24 19:11:57 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
FWIW I think we should make more liberal use of value objects versus untyped
stdClass
objects as stated in #13922 and not just for the lazy loading behaviors that have conveniently come here and the menu item's object. It also helps to make it clear exactly what properties you're getting on an object versus having to reverse engineer the code to find what is actually being loaded into memory and made available, so it makes it a little easier to jump into the code too. Developer Experience improvements FTW.