pantheon-systems / example-drops-8-composer

Install drops-8 with Composer on Pantheon.
MIT License
90 stars 124 forks source link

Static tests fail when using drupal/core:^9 #454

Open andy-blum opened 3 years ago

andy-blum commented 3 years ago

I want to start by apologizing if this isn't the correct method for sharing this information, or if this is out-of-scope for the project, but I was unable to find any resources anywhere to help me track down why I was having this issue.

Using this project to create a Drupal 9 site is pretty straightforward - you just update a couple version constraints in the composer.json file, but one issue I ran into for a few hours was getting the static tests to work.

Turns out, Drupal 9 adds /web/core/includes/bootstrap.inc to your composer's autoload_files.php. When running the git clean -fdX web command, this file is deleted and composer freaks out when trying to autoload it.

To get around this for now, I modified /.ci/test/static/run to git clean -fdX the libraries, modules, profiles, sites, and themes directories individually and left core alone.

andy-blum commented 3 years ago

Additional note: you need to make sure to add drush_version: 10 to your pantheon.yml file so drush is compatible with Drupal 9

amouro commented 3 years ago

Thank @andy-blum, your suggestion resolved our problem.

Instead of clean the directories individually, I use this to clean all in the web/ except web/core

git clean -fdX web -e \!web/core