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]
looking further for a mo this thread can explain a little: github.com/nikic/PHP-Parser
Basically they mention disabling
xdebug.scream
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.
Thank you so much for this. Your solution worked perfectly. That error message was irking me pretty badly.
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
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community