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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joelcollinsdc’s picture

joelcollinsdc’s picture

greater 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...

mikeryan’s picture

Version: 7.x-2.1-beta1 » 7.x-2.x-dev
Status: Active » Needs work

Note 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?)...

mikeryan’s picture

Oh, I get it now, hook_requirements() is called before anything is enabled at all. Damn...

mikeryan’s picture

Status: Needs work » Fixed

Ah, 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.

mikeryan’s picture

Status: Fixed » Active

Damn - 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...

mikeryan’s picture

Status: Active » Fixed

OK, re-fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.