Last week I ran into the problem of having used pm-updatecode to update modules and then discovering that updating to Drupal 8.3.0 would result in there being an error about dependencies in Address. https://www.drupal.org/node/2679158

So I reinstalled Drupal using Composer and carefully placed my old docroot into the web directory that was created by Composer. That seems to work, except that I now have two vendor directories. One is in the parent directory of web and another is the old one that was in docroot, now in the web directory.

That causes the following error: When I enable Address from Admin/modules, I get the following error:

Address requires the commerceguys/addressing library.
Address requires the commerceguys/zone library.

If I remove the web/vendor directory then run Drush cache-rebuild I get:
Error: require(): Failed opening required '/Users/mark/Sites/uums1/web/vendor/autoload.php'

I know this is not your problem. But I would appreciate any help you can provide in assisting me to fix the problem. What is it that tells the Drupal install to look for the vendor directory in the parent, not in the web (docroot) directory?

CommentFileSizeAuthor
composer.json_.zip965 bytesgippy

Comments

gippy created an issue. See original summary.

gippy’s picture

Issue summary: View changes
gippy’s picture

Category: Bug report » Support request
gippy’s picture

I found the answer: web/autoload.php is changed to return require __DIR__ . '/../vendor/autoload.php';

I apologize for posting such a simple question here. I at least hope it offers help to others who went down the drush pm-updatecode path and then wanted to pivot to the composer way of maintaining modules and dependencies. We need to document the process for switching at https://www.drupal.org/docs/8/update/update-procedure-in-drupal-8

gippy’s picture

Status: Active » Closed (works as designed)