Skip to content

Issue #127: Fix post-install script #128

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

Merged
merged 1 commit into from
Mar 19, 2016
Merged

Conversation

webflo
Copy link
Member

@webflo webflo commented Mar 18, 2016

This should fix the failing create-project command. Composer changed the behaviour in composer/composer@55b0ed8

@greg-1-anderson
Copy link
Collaborator

I'm a little bit confused about the reference to the composer commit above. I just ran composer create-project, and it still works as well as it always did. Did Composer behavior really change at all here?

In any event, Composer changing behavior or not changing behavior doesn't really matter--I am just curious for my own edification. As far as this PR is concerned, switching the post-install script from a bash script to equivalent PHP code means that we are no longer dependent on composer being available in the user's $PATH at post-install time, so this seems like a good enhancement to me.

+1.

@webflo
Copy link
Member Author

webflo commented Mar 19, 2016

@greg-1-anderson You can spot the change in create-project-command.test easily.

webflo added a commit that referenced this pull request Mar 19, 2016
Issue #127: Fix post-install script

Closes #124 
Closes #111
@webflo webflo merged commit 0594e3e into drupal-composer:8.x Mar 19, 2016
@webflo webflo deleted the issue-127 branch March 19, 2016 08:57
class ScriptHandler {

protected static function getDrupalRoot($project_root) {
return $project_root . '/web';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should get this directory(/web) form installer paths in composer.json.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah drupal-scaffold has this feature already. I think we could detect it via composer installers path or add something link "drupal-root-dir" to the composer.json. A own subclass of ScriptHandler should work as well ...

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.

3 participants