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

Deployer 6.2.0 Crashes While Including Global Autoloader #1602

Closed
kiler129 opened this issue Apr 27, 2018 · 4 comments
Closed

Deployer 6.2.0 Crashes While Including Global Autoloader #1602

kiler129 opened this issue Apr 27, 2018 · 4 comments

Comments

@kiler129
Copy link

Q A
Issue Type Bug
Deployer Version >6.0, 6.2.0
Local Machine OS xUbuntu Linux 17.10
Remote Machine OS N/A

Description

After updating deployer from 6.0 to 6.2.0 (using self-update command) multiple of our devlopers are unable to start deployment. Running deployer in the directory where deploy.php exists gives the following error:

$ dep -v

                                                                                                                        
 [Error] Call to undefined method Symfony\Component\Console\Helper\QuestionHelper::getInputStream()                     
                                                                                                                        

 #0 phar:///usr/local/bin/dep/vendor/symfony/console/Application.php(145):                                              
 Symfony\Component\Console\Application->configureIO(Object(Symfony\Component\Console\Input\ArgvInput),                  
 Object(Symfony\Component\Console\Output\ConsoleOutput))                                                                
 #1 phar:///usr/local/bin/dep/src/Deployer.php(331):                                                                    
 Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput),                          
 Object(Symfony\Component\Console\Output\ConsoleOutput))                                                                
 #2 phar:///usr/local/bin/dep/bin/dep(119): Deployer\Deployer::run('6.2.0', '/mnt/sdb1/publi...')                       
 #3 /usr/local/bin/dep(4): require('phar:///usr/loc...')                                                                
 #4 {main}                                                                    

Steps to reproduce

  1. Install deployer to /usr/local/bin/dep
  2. Install global deps:
  • composer global require deployer/deployer
  • composer global require deployer/recipes
  1. Create deploy.php with contents presented below
  2. Try to run any dep command

Content of deploy.php

<?php
namespace Deployer;

use Symfony\Component\Process\Exception\ProcessFailedException;

$composerHome = getenv("COMPOSER_HOME") ?: getenv("HOME") . '/.config/composer/';
require_once $composerHome . '/vendor/autoload.php';

Additional configuration details

$ echo $COMPOSER_HOME
/home/greg/.composer

$ cat /home/greg/.composer/composer.json 
{
    "require": {
        "deployer/deployer": "^6.2",
        "deployer/recipes": "^6.1"
    }
}

Output log

N/A

@kiler129
Copy link
Author

I guess I found the issue: now when deployer is installed as a global dependency and it's ran from phar it conflicts with itself somehow. Executing composer global remove deployer/deployer solves the problem, however I don't know if we shouldn't qulify this is a bug still?

@antonmedv
Copy link
Member

This is a strange behavior and I think we need to find why it’s cousin problems.

@johnny-bit
Copy link
Contributor

According to symfony/console changelog @ https://github.com/symfony/console/blob/master/CHANGELOG.md getInputStream was removed in v 4.0.0

@antonmedv
Copy link
Member

Closing this issue as inactive. If you still have this problem, please open a new issue.

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

3 participants