phpbrew icon indicating copy to clipboard operation
phpbrew copied to clipboard

`phpbrew use x.x.x` didn't work for me after source ~/.phpbrew/bashrc

Open im050 opened this issue 7 years ago • 1 comments

Output

phpbrew use 7.2.4 phpbrew switch 7.2.4

Exception: You should not see this, if you see this, it means you didn't load the ~/.phpbrew/bashrc script, please check if bashrc is sourced in your shell.
Trace:

    0) PhpBrew\Command\VirtualCommand->execute('7.2.4')
    1) call_user_func_array([PhpBrew\Command\UseCommand, 'execute'], ['7.2.4'])
    2) CLIFramework\CommandBase->executeWrapper(['7.2.4'])
    3) CLIFramework\Application->run(['/usr/local/phpbrew/phpbrew', 'use', '7.2.4'])
    4) PhpBrew\Console->runWithTry(['/usr/local/phpbrew/phpbrew', 'use', '7.2.4'])
    5) require('phar:///usr/local/phpbrew/phpbrew/scripts/phpbrew-emb.php')

I have already source the bashrc file before use. In my another PC(OSX 10.12) it has been work.

Expected Result


Command

linyulindeMacBook-Pro:~ linyulin$ source ~/.phpbrew/bashrc
linyulindeMacBook-Pro:~ linyulin$ phpbrew use 7.2.4

Platform

OS:

OSX 10.13.3

Running PHP: php 5.6.30

Installing PHP: php 7.2.4

im050 avatar Apr 05 '18 08:04 im050

linyulindeMacBook-Pro:~ linyulin$ source ~/.phpbrew/bashrc && phpbrew list
* (system)
  php-7.2.4
linyulindeMacBook-Pro:~ linyulin$ phpbrew use 7.2.4
Exception: You should not see this, if you see this, it means you didn't load the ~/.phpbrew/bashrc script, please check if bashrc is sourced in your shell.
Trace:

    0) PhpBrew\Command\VirtualCommand->execute('7.2.4')
    1) call_user_func_array([PhpBrew\Command\UseCommand, 'execute'], ['7.2.4'])
    2) CLIFramework\CommandBase->executeWrapper(['7.2.4'])
    3) CLIFramework\Application->run(['/usr/local/phpbrew/phpbrew', 'use', '7.2.4'])
    4) PhpBrew\Console->runWithTry(['/usr/local/phpbrew/phpbrew', 'use', '7.2.4'])
    5) require('phar:///usr/local/phpbrew/phpbrew/scripts/phpbrew-emb.php')

im050 avatar Apr 05 '18 18:04 im050

The issue is outdated and closed. Please use the latest stable PHPBrew version.

peter279k avatar Dec 01 '22 17:12 peter279k