2014-09-17 24 views
8

Recentemente ho cambiato 2 righe in una vista e ho spinto il codice in github. Quando ho schierato sulla laravel Forge (Dopo circa 2 settimane di aggiornamenti) & ho ottenuto il seguente errore:Laravel Composer non aggiornerà/installerà

"error":{ 
    "type":"ErrorException", 
    "message":"Declaration of Illuminate\\View\\Engines\\CompilerEngine::handleViewException() should be compatible with Illuminate\\View\\Engines\\PhpEngine::handleViewException($e)", 
    "file":"\/home\/forge\/default\/vendor\/laravel\/framework\/src\/Illuminate\/View\/Engines\/CompilerEngine.php", 
    "line":100 
} 

che non si può nemmeno fare php artisan -v senza ottenere quell'errore. Allora ho fatto funzionare composer diagnosis ed ho ottenuto:

Checking composer.json: FAIL 
require.damianromanowski/simplecdn : unbound version constraints (dev-master) should be avoided 
require.roumen/feed : unbound version constraints (dev-master) should be avoided 
require.themonkeys/error-emailer : unbound version constraints (dev-master) should be avoided 
require.abodeo/laravel-stripe : unbound version constraints (dev-master) should be avoided 
require.mattbrown/laracurl : unbound version constraints (dev-master) should be avoided 
require.themonkeys/cachebuster : unbound version constraints (dev-master) should be avoided 
Checking platform settings: FAIL 
The xdebug extension is loaded, this can slow down Composer a little. 
Disabling it when using Composer is recommended, but should not cause issues beyond slowness. 
Checking git settings: OK 
Checking http connectivity: OK 
Checking disk free space: OK 
Checking composer version: OK 

Come dovrei fare questo errore andare via? Mai visto prima e non esattamente sicuro di cosa c'è che non va.

risposta

23

Per gentile concessione di AndreasLutro in #laravel:

tenta di rimuovere bootstrap/compiled.php.

Questo lo ha risolto per me.

3

Il modo corretto per risolvere questo problema è quello di eseguire php artisan clear-compiled prima di eseguire composer install o composer update

È possibile aggiungere il seguente al vostro composer.json nella sezione "script", se si vuole, per rendere più automatica:

"pre-install-cmd" :[ 
    "php artisan clear-compiled" 
], 
"pre-update-cmd": [ 
    "php artisan clear-compiled" 
], 
Problemi correlati