Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: Steven Jones commentedComment #2
anarcat CreditAttribution: anarcat commentedGood idea.
Comment #3
Steven Jones CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: Steven Jones commentedSpun that out here:
#1329000: SSL Templates are broken