Support the ongoing development of Laravel.io →
Installation
Last updated 2 years ago.
0

I have the exact same error :(

Last updated 2 years ago.
0

I did a test on a new VM and after running withi vagrant ssh:

    sudo composer create-project  laravel/laravel --prefer-dist

I then go the same as i did at work, see the end message of composer below for ref:

    Generating autoload files
    Generating optimized class loader
    Compiling common classes
  
    [ErrorException]
    Undefined variable: undefinedVariable

           Script php artisan optimize handling the post-install-cmd event returned with an error



     [RuntimeException]
     Error Output:


       [ErrorException]
       Undefined variable: undefinedVariable



     optimize [--force] [--psr]
Last updated 2 years ago.
0

looking further for a mo this thread can explain a little: github.com/nikic/PHP-Parser

Basically they mention disabling

 xdebug.scream
Last updated 2 years ago.
0

seems vagrant ssh and alter the following:

  /etc/php5/mods-available$ sudo vim xdebug.ini

and change

xdebug.scream = 1

to

 xdebug.scream = 0

This seemed to have fixed my issue.

Last updated 2 years ago.
0

Thanks! it fixed this issue for me too ;)

Last updated 2 years ago.
0

Thank you so much for this. Your solution worked perfectly. That error message was irking me pretty badly.

Last updated 2 years ago.
0

if anyone is interested in order to save me form waiting for the vaprobash and vagrant up to finish then ssh into the settings like above, i created a small script to add to the end of the vaprobash fiel as mentioned in the Local Script files, which simply runs the override of the xdebug code automatically once all is installed.

github.com/simondavies/xdebugscreamoverride

remember thought if your using laravel from within vaprobash then you might need to run this local script prior to the laravel install.

its my first attempt at this type of thing so hope it helps and any issue feel free to moan to me.

thanks

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.