User has to specifically enable migrate before installing migrate_d2d... The requirements check seems to happen before the dependent modules get installed.
drush @cd en migrate_d2d
Module migrate_d2d doesn't meet the requirements to be enabled. [error]
Migrate 2.6 or greater is required.
drush @cd en migrate -y
The following extensions will be enabled: migrate
Do you really want to continue? (y/n): y
migrate was enabled successfully.
drush @cd en migrate_d2d -y
The following extensions will be enabled: migrate_d2d
Do you really want to continue? (y/n): y
migrate_d2d was enabled successfully.
Comment | File | Size | Author |
---|---|---|---|
#2 | migrate_d2d-install-requirements-2014619-2.patch | 2.47 KB | joelcollinsdc |
#1 | migrate_d2d-install-requirements-2014619-1.patch | 2.47 KB | joelcollinsdc |
Comments
Comment #1
joelcollinsdc CreditAttribution: joelcollinsdc commentedComment #2
joelcollinsdc CreditAttribution: joelcollinsdc commentedgreater than 2.5, not greater than 2.6...
also this only works if you have a real version of the migrate downloaded, not a git checkout...
Comment #3
mikeryanNote that you should set the status to "needs review" when submitting a patch.
As you say, using the .info dependency breaks with git checkouts, which is unbearably annoying for developers. There must be some way for hook_requirements to properly detect a sufficient version of Migrate even if it's been implicitly enabled in the same request (a registry rebuild before checking the class?)...
Comment #4
mikeryanOh, I get it now, hook_requirements() is called before anything is enabled at all. Damn...
Comment #5
mikeryanAh, got it - we can do the check in hook_install(), and throw an exception if a sufficient Migrate is not enabled. I removed the check from migrate_d2d_ui - it depends on migrate_d2d, which is already requiring a sufficient version of Migrate.
Comment #6
mikeryanDamn - this doesn't really work, hook_install() (and hook_enable(), for that matter) gets called too late - throwing an exception at this point leaves the module half-enabled. We may have to settle for the .info dependency, and suffer with it in git checkouts...
Comment #7
mikeryanOK, re-fixed.