Seldaek / php-console

PHP Debug Console
Other
529 stars 91 forks source link

Melody script fails #54

Open fosron opened 7 years ago

fosron commented 7 years ago

Running this PHP script in the console fails.

( ! ) Fatal error: Uncaught exception 'Symfony\Component\Process\Exception\ProcessFailedException' with message 'The command "'[...]/php-console/composer.phar' 'config' '--global' 'vendor-dir' in [...]/php-console/vendor/symfony/process/Process.php on line 232 ( ! ) Symfony\Component\Process\Exception\ProcessFailedException: The command "'[...]/php-console/composer.phar' 'config' '--global' 'vendor-dir'" failed. Exit Code: 1(General error) Working directory: [...]/php-console Output: ================ Error Output: ================ [RuntimeException] The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly in [...]/php-console/vendor/symfony/process/Process.php on line 232

Call Stack
#   Time    Memory  Function    Location
1   0.0005  262600  {main}( )   .../index.php:0
2   0.0050  603208  MelodyPlugin->runScript( )  .../index.php:104
3   0.0056  633112  SensioLabs\Melody\Melody->__construct( )    .../MelodyPlugin.php:42
4   0.0100  971880  SensioLabs\Melody\Composer\Composer->getVendorDir( )    .../Melody.php:47
5   0.0134  1299576 Symfony\Component\Process\Process->mustRun( )   .../Composer.php:86

Script ended unexpectedly.

Ran on

Mac OS X 10.12.4
MAMP PRO 4.1 (Apache 2.2.31, PHP 5.2.68)
fosron commented 7 years ago

Tested with php -S localhost:1337

Got this

( ! ) Notice: Undefined index: PATH in [...]/php-console/vendor/sensiolabs/melody/src/SensioLabs/Melody/Runner/Runner.php on line 50
Call Stack
#   Time    Memory  Function    Location
1   0.0014  269896  {main}( )   .../index.php:0
2   0.0108  610544  MelodyPlugin->runScript( )  .../index.php:104
3   0.3251  1407680 SensioLabs\Melody\Melody->run( )    .../MelodyPlugin.php:68
4   0.3497  2199976 SensioLabs\Melody\Runner\Runner->getProcess( )  .../Melody.php:85

Ran on PHP 5.6.28 (cli) (built: Dec 15 2016 18:02:49)

staabm commented 7 years ago

Did you follow the error msg and defined the ENV vars as suggested?

The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly in

mikeSimonson commented 7 years ago

@fosron How did you run / used / installed the melody plugin ?