#1467126: PSR-0 namespace auto registration for modules did it for modules. Do we want the same for themes? In #1467126-80: PSR-0 namespace auto registration for modules, sun says yes at least for tests, but tests might be a separate question. We're currently still working out approach to module test classes in #1477218: Convert Tracker tests to PSR-0 / PSR-0 test class discovery.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 1538478-theme-class-loading-13.patch | 1.4 KB | Niklas Fiekas |
| #13 | 1538478-theme-class-loading-13-interdiff.txt | 519 bytes | Niklas Fiekas |
| #11 | 1538478-theme-class-loading-11.patch | 1.4 KB | Niklas Fiekas |
| #7 | 1538478-theme-class-loading-7.patch | 1.3 KB | Niklas Fiekas |
Comments
Comment #1
donquixote commentedIs there any reason not to?
The argument was that most themes do not have classes (other than tests), but does it hurt to enable PSR-0 autoloading for those that do have classes?
Comment #2
Crell commentedThe theme system is scheduled to be gutted by a series of sprints starting this weekend. We may want to wait until then to spend more time on this. Certainly IF a theme is going to include classes, they should be PSR-0-loaded, no question. Whether or not it will, we don't know yet.
Comment #3
berdirIn regards to tests, the latest patch of #1477218: Convert Tracker tests to PSR-0 / PSR-0 test class discovery now registers the namespace for everything living in {system}.
Comment #4
sunI don't think this needs much discussion. Themes won't be "PHP-less" anytime soon, so it would be very strange to not support class autoloading for themes for no apparent reason.
Comment #5
Niklas Fiekas commentedIsn't this "works as designed" via #3, then?
Comment #6
sun#3 was about tests only.
However, looking at system_list(), it's possible that this already works. We should add a test to confirm that.
Comment #7
Niklas Fiekas commentedSomething like this then, probably?
Comment #8
sunYup :)
Comment #9
catch#7: 1538478-theme-class-loading-7.patch queued for re-testing.
Comment #11
Niklas Fiekas commentedReroll.
Comment #13
Niklas Fiekas commentedOh ... failed properly rerolling. It's test_theme, not theme_test.
Comment #14
aspilicious commentedThank you :)
Comment #15
webchickCommitted and pushed to 8.x. Thanks!
Comment #16.0
(not verified) commentedUpdated issue summary.