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

Feature: Fix composer version between deploys #2012

Closed
downace opened this issue Mar 11, 2020 · 3 comments
Closed

Feature: Fix composer version between deploys #2012

downace opened this issue Mar 11, 2020 · 3 comments
Milestone

Comments

@downace
Copy link

downace commented Mar 11, 2020

Currently deploy:vendors uses bin/composer option which downloads the latest Composer binary on every deploy. This can lead to unexpected breaking changes. For example, 1.10.0 started to output a lot of deprecation warnings in my case

There are lots of easy workarounds (override bin/composer option, use pre-installed Composer, etc.). But it would be nice to just add something like set('composer_version', '1.9.3'). Or just save composer binary somewhere between deploys (maybe in .dep dir)

@asafov
Copy link
Contributor

asafov commented Jun 24, 2020

As i see - master branch first try to find composer binary.

set('bin/composer', function () {
    if (commandExist('composer')) {
        $composer = '{{bin/php}} ' . locateBinaryPath('composer');
    }

    if (empty($composer)) {
        run("cd {{release_path}} && curl -sS https://getcomposer.org/installer | {{bin/php}}");
        $composer = '{{bin/php}} {{release_path}}/composer.phar';
    }

    return $composer;
});

Try to set it:
set('bin/composer', 'your_composer_path');

@asafov
Copy link
Contributor

asafov commented Jun 24, 2020

PR #2110 ready

@antonmedv
Copy link
Member

Fixed! Now composer will be saved!

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

No branches or pull requests

3 participants