Closed (fixed)
Project:
Provision tasks extra
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Aug 2013 at 12:45 UTC
Updated:
17 Sep 2013 at 08:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
m.stentaWe're experiencing the same issue in the Puppet Aegir project: #2078019: Aegir::extras does not work with Aegir::dev
Comment #2
m.stentaStarted a branch to work on it here: https://github.com/mstenta/puppet-aegir/tree/dev/2078019Sorry... wrong issue. :-/
Comment #3
ergonlogicMaybe we want something more like this:
Comment #4
m.stentaHmm this is a bit trickier. I tried the code in #3 above, but unfortunately, PHP doesn't even get to that point, because it declares a class farther down in the same file that extends the Provision_Service class, which doesn't exist.
I tried moving the code to the very top of the file (provision_tasks_extra/http_basic_auth/http_basic_auth.drush.inc), but then the drush_commandfile_list() returns an empty list, because Drush is in the process of building that list when the code gets loaded. And since provision_tasks_extra is being loaded before provision, the provision include files are not going to be there anyway.
This seems to really just be a race condition between the two extensions. Does Drush have any mechanism to control the order in which extensions are loaded?
Comment #5
m.stentaOops, meant to change the title, not the tags...
Comment #6
ergonlogicSee: http://community.aegirproject.org/upgrading/path#Class_auto-loading
Basically, in Aegir 2, we'd normally put that class in Provision/Service/http_basic_auth.php, and then register it with the autoloader. That way it isn't parsed too early.
Comment #7
m.stentaI read through some of the code in the Provision extension itself, and tried to set up this extension to autoload the Provision_Service_http_basic_auth class, but I'm still having trouble.
Attached is a patch that takes a first stab at it. Can anyone see what's wrong with it?
This is the error that I'm getting:
Comment #8
m.stentaHere's the patch (and again... it doesn't work... just a first attempt). :-)
Comment #9
m.stentaFigured it out...
Symfony's class loader function decides that the class must be located in:
"/var/aegir/.drush/provision_tasks_extra/http_basic_auth/Provision/Service/http/basic/auth.php"It puts an underscore in place of each of the underlines in http_basic_auth.
So, if we put the class in there, it works!
Attached is a patch that does that, and fixes this issue.
However, this doesn't seem like the "right" way to do it... because it sort of implies that the Provision_Service_http_basic_auth class inherits from the Provision_Service_http_basic class (which does not exist), which inherits from the Provision_Service_http class (which DOES exist). Will this cause any issues in the long run?
Comment #10
ergonlogicFixed in 3246a697150eb
Comment #12
helmo commentedI think provisionacl has a similar issue: #1984098: Aegir 2.x compatibility And so maybe other contribs...