Variation of patch below has been merged into the roundearth plugin as of 2019-11-12, so shouldn't need this anymore.
There's a problem that seems to have been around since about June 2019 where archive_tar is no longer able to extract the civicrm download .tar.gz file on windows so the install fails. These steps will get it installed.
composer create-project roundearth/drupal-civicrm-project:8.x-dev some-dir
- It will fail with an error about unable to extract.
- Apply hack patch to vendor/roundearth/civicrm-composer-plugin/src/Handler.php
--- Handler.php
+++ Handler.php.new
@@ -195,8 +195,10 @@
$this->filesystem->dumpFile($civicrm_archive_file, fopen($civicrm_archive
_url, 'r'));
$this->output("<info>Extracting CiviCRM {$civicrm_version} release...</in
fo>");
- $extract_successful = (new \Archive_Tar($civicrm_archive_file, "gz"))->ex
tract($civicrm_extract_path);
- if (!$extract_successful) {
+ try {
+ $phar = new \PharData($civicrm_archive_file);
+ $phar->extractTo($civicrm_extract_path);
+ } catch (Exception $e) {
throw new \RuntimeException("Unable to extract: $civicrm_archive_file")
;
}
- Delete vendor/civicrm/civicrm-core.
- This is important because otherwise it won't trigger the plugin to do its thing in the next step.
- From the root folder where you installed the project, type:
composer require civicrm/civicrm-drupal-8
- Install drupal normally, e.g. visiting http://site/install.php.
- If logged in to website, logout.
- From the root folder where you installed the project, type:
vendor\drush\drush\drush.bat en -y -l host.name.org civicrm
-
- Replace host.name.org with the correct domain name, e.g. example.org. Without the -l parameter you'll probably end up with http://DEFAULT as civi's BASEURL.
- Log back in
- The civi menus will look messed up. So as it says in the roundearth readme, update the resource url by going to
/civicrm/admin/setting/url?reset=1
and setting the value to[cms.root]/libraries/civicrm
.
after I ran composer require civicrm/civicrm-drupal-8
Potential causes:
see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
Installation failed, reverting ./composer.json to its original content.