Closed (fixed)
Project:
Provision
Version:
6.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2011 at 09:40 UTC
Updated:
12 Jun 2014 at 08:41 UTC
Jump to comment: Most recent
We should support autoloading classes, and not hardcoding the paths to service classes so that they can live in contrib drush commands. This will require a fair bit of refactoring, and some work on: #1316322: Add PSR-0 autoloader to drush. We could re-factor to a PECL style naming of classes, or use PHP 5.3 and start using namespaces, or do the first, and then move to namespaced code later.
Thoughts?
Comments
Comment #1
steven jones commentedComment #2
anarcat commentedGood idea.
Comment #3
steven jones commentedBasically spent the day moving and renaming classes in the following branch:
dev/1318374-autoloader
Seems to be working, and supports extending provision services without putting your code in amongst provision code, hurrah!
This uses a slightly modified version of the Symfony2 autoloader, with the PHP 5.3 bits removed (one line) and I've renamed our classes to use a more PEAR like syntax where possible.
Comment #4
steven jones commentedI've pulled this into the 6.x-2.x branch, and will now document this as fully as possible.
Comment #5
omega8cc commentedThere are major bugs introduced in the SSL templates, where you still have old, no longer existing paths like
include('http/apache/vhost.tpl.php');Comment #6
steven jones commentedSpun that out here:
#1329000: SSL Templates are broken