Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer tool minimal version requirement #72

Open
ndobromirov opened this issue Feb 19, 2018 · 8 comments
Open

Composer tool minimal version requirement #72

ndobromirov opened this issue Feb 19, 2018 · 8 comments

Comments

@ndobromirov
Copy link

Problem:
When using the module through BLT manager (step2: https://blt.readthedocs.io/en/latest/readme/creating-new-project/), the scaffold step was never executed. There were no errors or warnings in the output, just no files after project was "scafolded".

The cause:
The root cause of the issue was due to legacy install of the composer tool: Composer version 1.1.3 2016-06-26 15:42:08.

The fix:
Once updated to Composer version 1.6.3 2018-01-31 16:28:17 everything is behaving normally.

Proposed solutions:

  • Add a dependency on composer's minimal version that will always work.
  • Add a warning at least, so people can diagnose the issue faster, not like me - spending good half a day on that :(.
@grasmash
Copy link

grasmash commented May 1, 2018

Add a dependency on composer's minimal version that will always work.

Let's do this.

@danepowell
Copy link

@webflo could you speculate on what would make older Composer versions incompatible with Drupal Scaffold, and/or what minimum Composer version is required?

@webflo
Copy link
Member

webflo commented May 2, 2018

@danepowell We added a similar dependency for drupal-project in drupal-composer/drupal-project#170

But it looks like it is not sufficient and we should bump the version further up.

@webflo
Copy link
Member

webflo commented May 2, 2018

@danepowell Could you try composer 1.2.4? I think this version should work as well.

@webflo
Copy link
Member

webflo commented May 2, 2018

Ubuntu 16.04 ships with 1.0.0-beta2 :/

@danepowell
Copy link

Another user has reported to me that 1.3.2 doesn't work. I haven't personally tested/verified that any versions do or don't work, these are all second-hand reports. I'll try to test later.

@danepowell
Copy link

danepowell commented May 2, 2018

Actually I suspect that whatever is going on here is not version-related.

I tested by creating the following composer.json in an empty directory:

{
  "require": {
    "composer/installers": "~1.0",
    "drupal-composer/drupal-scaffold": "^2.1.0",
    "drupal/core": "^8.5"
  },
  "extra": {
    "installer-paths": {
      "docroot/core": [
        "type:drupal-core"
      ]
    }
  }
}

I then downloaded Composer phars as old as 1.1.3 and ran php composer.phar install.

I then found all of the non-core files (such as index.php and .htaccess) in docroot as expected. No sign of a problem with Composer or Drupal Scaffold.

Unless someone else can consistently reproduce this, this seems like a Heisenbug, possibly related to BLT rather than Drupal Scaffold.

@ndobromirov
Copy link
Author

The issue is coming from a events that composer is triggering (I do not know the version they were added). This tool depends on them to initiate the scaffolding. In the older versions the events are not there - the scaffold does not work, as the events are not triggered and thus not executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants