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

Custom bin #608

Merged
merged 5 commits into from
Apr 4, 2016
Merged

Custom bin #608

merged 5 commits into from
Apr 4, 2016

Conversation

antonmedv
Copy link
Member

Q A
Bug fix? No
New feature? Yes
BC breaks? No
Deprecations? Yes composer_command
Fixed tickets #548 #607 #586 #606

This is my version of custom bins. Here an example:

task('default', function () {
    run('{{bin/php}} -v');
    run('{{bin/git}} --version');
    run('{{bin/composer}} --version');
});

What do you think, guys?

@antonmedv antonmedv mentioned this pull request Apr 4, 2016
@nemoinho
Copy link
Contributor

nemoinho commented Apr 4, 2016

All in all it looks good to me but would you really download composer if it's missing? I think that should only rise an exception and stop deployer. And maybe deployer should test for a few common locations of composer before doing that. I really don't like the idea, that a application loads extra software without warning or at least an info.

@antonmedv
Copy link
Member Author

For now composer automatically downloaded too. If we remove this, may broke BC.

@antonmedv
Copy link
Member Author

Also it's downloaded via https, so risks a minimal. I think this behavior is good for developer experience, and we should keep it. You can always install composer manually to prevent downloading it.

@nemoinho
Copy link
Contributor

nemoinho commented Apr 4, 2016

Yep, unfortunately, but maybe we can keep this topic on the agenda for a next major release.

@antonmedv
Copy link
Member Author

antonmedv commented Apr 4, 2016 via email


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

Choose a reason for hiding this comment

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

Please replace with {{bin/php}} composer.phar

$composer = env()->parse('{{bin/php}} composer.phar');

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@oanhnn
Copy link
Contributor

oanhnn commented Apr 4, 2016

Users can void a download composer.phar by a task upload composer.phar to shared directory and:

env('bin/composer', '{{bin/php}} {{deploy_path}}/shared/composer.phar');

task('upload_composer', function() {
     upload('/path/to/your/composer.phar', '{{deploy_path}}/shared/');
});

😄

@antonmedv
Copy link
Member Author

@deployphp/maintainer merge? :)

@oanhnn
Copy link
Contributor

oanhnn commented Apr 4, 2016

I think we will merge to both 3.1.x and 4.x

@oanhnn oanhnn merged commit c0d4e34 into master Apr 4, 2016
@oanhnn
Copy link
Contributor

oanhnn commented Apr 4, 2016

@Elfet I merged branch custom_bin and master to oanhnn/4.x. Now you can merge 😄

@oanhnn oanhnn modified the milestones: v4.0, v3.1.3 Apr 4, 2016
@antonmedv
Copy link
Member Author

I think merge master to 4.x too :)

@oanhnn
Copy link
Contributor

oanhnn commented Apr 4, 2016

Yeah, I merged 😄

@rvanlaak
Copy link

rvanlaak commented Feb 4, 2020

@antonmedv would it be easy to change the php bin per host?

Our use-case: we would like to start experimenting with PHP7.4 without affecting the other applications on that host.
The vhost was changed to let Apache serve PHP7.4, but deployment fails because CLI is on PHP7.3.

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

Successfully merging this pull request may close these issues.

None yet

4 participants