Hi,

I'm trying to launch https://www.drupal.org/project/social on simplytest. We use composer and we have some core patches applied in our composer.json. However on UI installation, I get an error about some configuration property that doesn't exists. We've had this issue before ourselves, but there's a core patch for this which we've added to our composer.json (https://www.drupal.org/node/2369119). It looks like this patch is not applied, but I'm not sure, since I cannot see the composer output. I know that our ditro was set to a module in order to work with simplytest, but does this also mean that simplytest installs drupal core and adds our distro as a module, rather than install core through our composer.json?

See also: https://www.drupal.org/node/2840598

kind regards,

Jochemvn

Comments

jochemvn created an issue. See original summary.

jochemvn’s picture

patrickd’s picture

Title: Composer installation fails » Composer installation fails for Open Social

I know that our ditro was set to a module in order to work with simplytest, but does this also mean that simplytest installs drupal core and adds our distro as a module, rather than install core through our composer.json?

I had not looked into why and how Open Social works installed as module on simplytest.me because it seemed to work so far and I wanted to concentrate on the service relaunch.

Here are some logs for now

::: Sat Jan  7 05:52:16 UTC 2017 :  Building a drupal module project.
::: Sat Jan  7 05:52:16 UTC 2017 :  Prepare..
[...]
::: Sat Jan  7 05:52:16 UTC 2017 :  Downloading project..
::: Sat Jan  7 05:52:16 UTC 2017 :  Fetch drupal module project..
[...]
::: Sat Jan  7 05:52:19 UTC 2017 :  Finding out real project (file) name..
::: Sat Jan  7 05:52:19 UTC 2017 :  -> projectfile name: social
::: Sat Jan  7 05:52:19 UTC 2017 :  -> discovered info file: social.info.yml
::: Sat Jan  7 05:52:19 UTC 2017 :  Finding out needed major core version
::: Sat Jan  7 05:52:19 UTC 2017 :  -> major core version: 8
::: Sat Jan  7 05:52:19 UTC 2017 :  Fetch dependencies..
::: Sat Jan  7 05:52:19 UTC 2017 :  Fetch core..
Project drupal (8.2.5) downloaded [success]
[...]
::: Sat Jan  7 05:52:30 UTC 2017 :  Try to install composer dependencies for drupal core..
Installing dependencies (including require-dev) from lock file
Package operations: 74 installs, 0 updates, 0 removals
  - Installing composer/installers (v1.0.21) Loading from cache
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing wikimedia/composer-merge-plugin (v1.3.1) Loading from cache
[...]
::: Sat Jan  7 05:52:33 UTC 2017 :  Prepare the module project..
::: Sat Jan  7 05:53:08 UTC 2017 :  Try to install composer dependencies for the module..
Project composer_manager (8.x-1.0-rc2) downloaded                   [success]
Composer Manager has been successfully initialized.
> Drupal\composer_manager\Composer\Command::rebuild
The composer.json has been successfuly rebuilt.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 32 installs, 54 updates, 1 removal
[...]
::: Sat Jan  7 05:54:13 UTC 2017 :  Resolve dependencies
::: Sat Jan  7 05:54:14 UTC 2017 :  social_group.info.yml depends on "address"
::: Sat Jan  7 05:54:14 UTC 2017 :  social_group.info.yml depends on "block"
[...]
::: Sat Jan  7 05:54:38 UTC 2017 :  -> found makefile: build-social.make
::: Sat Jan  7 05:54:38 UTC 2017 :  Executing makefile..
Make new site in the current directory? (y/n): y
Beginning to build /home/rgrvt/social/build-social.make.                    [ok]
address-8.x-1.0-rc3 downloaded.                                             [ok]
address patched with address-2619878-29.patch.                              [ok]
Generated PATCHES.txt file for address                                      [ok]
addtoany-8.x-1.7 downloaded.                                                [ok]
[...]
social cloned from http://git.drupal.org/project/social.git.                [ok]
Checked out branch 8.x-1.x.                                                 [ok]
Found makefile: drupal-org.make                                             [ok]
::: Sat Jan  7 05:54:56 UTC 2017 :  Download additional projects..
::: Sat Jan  7 05:54:56 UTC 2017 :  Installing project..
::: Sat Jan  7 05:54:56 UTC 2017 :  Setup database..
::: Sat Jan  7 05:54:57 UTC 2017 :  Install drupal core..
::: Sat Jan  7 05:54:58 UTC 2017 :  Install the module project..
::: Sat Jan  7 05:55:02 UTC 2017 :  Finalizing..
::: Sat Jan  7 05:55:02 UTC 2017 :  Adding info snippet..

So it first clones the social project and determines it needs D8
Then fetches a clean Drupal Core and installs its composer dependencies
Moves social to modules directory
Then it installs all composer dependencies for social with composer manager
Then it tries to fetch all module dependencies from info files and gets them with drush dl if missing
Then it finds a drush makefile and executes that

So that's why it kinda works: Drupal doesn't care that there's profile in modules directory but Drupal core was installed separately and that's why the core patches are not applied.

patrickd’s picture

yanniboi might provide a patch for composer distribution support in the next few days while I'll continue working on the upcoming prototype

yanniboi’s picture

Once #2842430: Add composer support for distros is committed, you will be able to install opensocial as a distribution with composer and patches in the composer.json.

patrickd’s picture

Status: Active » Fixed

Just tested it, it works properly as distribution now!

Thanks for the patience!

jochemvn’s picture

Thanks for the great work. We've been testing it as well and seems to work perfectly! Just awesome!

Status: Fixed » Closed (fixed)

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