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

Test composer install with lock file #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nlisgo
Copy link

@nlisgo nlisgo commented Jul 12, 2016

I'm not certain this is a bug but when running composer install for the first time on a project that has drupal-scaffold as a dependency then I would expect that drupal-scaffold by triggered. PluginTest::testComposerInstallAndUpdate confirms that having a composer.json file on it's on and running composer install will result in drupal-scaffold automatically being triggered. If, however, you have a composer.lock file present then composer install isn't sufficient to trigger drupal-scaffold.

I have added a test to prove this. But, it may be the expected behaviour, I'm not sure. If I run composer drupal-scaffold after composer install then my code is as I would expect it to be after running composer install for the first time.

@webflo
Copy link
Member

webflo commented Jul 13, 2016

Hi, would say it is the expected behaviour because we recommend that people commit the scaffold to their repository. The goal is to avoid any magic in CI environments which have a lock file but not vendor folder in most cases. drupal-scaffold updates the scaffold files if you update drupal core. You can change the behaviour by simply adding composer drupal-scaffold to the post install command in your own composer.json

@nlisgo
Copy link
Author

nlisgo commented Jul 13, 2016

In your README it is a bit unclear for me. You seem to only be recommending committing the scaffold to the repository when using a dev branch of drupal core but we are using a tagged release. We would prefer not to commit any code to our repo that is available from another source.

If you want I could extend this test to cover the expected behaviour and follow up composer install with composer drupal-scaffold otherwise feel free to close. I just thought it would be easier to explain my issue with a failing test.

Great work on this project.

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

Successfully merging this pull request may close these issues.

2 participants