When trying to install the module in a D7 site with composer workflow and xautoload installed, we're getting errors about the sendgrid_integration/vendor/composer directory not existing because it's located in the vendor directory at the root of our project. This is preventing us from being able to install the module. The following patch checks whether the directory exists in Sendgrid first.

Comments

micnap created an issue. See original summary.

micnap’s picture

perignon’s picture

So you must have the X-Autoload module installed to run this hook. Interesting edge case

  • Perignon committed 4548b5b on 7.x-1.x authored by micnap
    Issue #3119276 by micnap: Composer workflow with xautoload installed...
micnap’s picture

Issue summary: View changes
generalredneck’s picture

Status: Active » Fixed

Yeah... to kinda throw this out there...

If you already have Xautoload installed AND you try to install sendgrid_integration using a composer workflow (such as drupal project https://github.com/drupal-composer/drupal-project/tree/7.x which uses composer_autoload), then xautoload runs the init hook on install. Since xautoload can't find the sites/all/contrib/sendgrid_integration/vendor/composer folder it throws an exception which causes the install to fail even though the requirements hooks during the install portion passes. Therefore you got to make the check. We use Xautoload for our custom module development and allows us to namespace...

Hope that all helps it all make sense.

THanks for commiting the change!

perignon’s picture

No problem!

Status: Fixed » Closed (fixed)

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