Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Apr 2012 at 18:31 UTC
Updated:
29 Jul 2014 at 20:36 UTC
Jump to comment: Most recent, Most recent file
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.