2014-09-17 32 views
8

Gần đây tôi đã thay đổi 2 dòng trong chế độ xem và đã đẩy mã này vào github. Khi tôi triển khai trên Laravel Forge (Sau khoảng 2 tuần không cập nhật) & Tôi đã nhận lỗi sau:Nhà soạn nhạc Laravel sẽ không cập nhật/cài đặt

"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 
} 

Tôi thậm chí không thể làm php artisan -v mà không nhận được lỗi đó. Sau đó, tôi chạy composer diagnosis và nhận:

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 

Làm cách nào để làm cho lỗi đó biến mất? Không bao giờ nhìn thấy nó trước và không chính xác chắc chắn những gì sai.

Trả lời

23

Courtesy of AndreasLutro trong #laravel:

Cố gắng loại bỏ bootstrap/compiled.php.

Điều đó đã khắc phục sự cố cho tôi.

3

Cách thích hợp để sửa lỗi này là chạy php artisan clear-compiled trước khi chạy composer install hoặc composer update

Bạn có thể thêm dòng sau vào composer.json của bạn trong "kịch bản" phần nếu bạn muốn, để làm cho nó tự động:

"pre-install-cmd" :[ 
    "php artisan clear-compiled" 
], 
"pre-update-cmd": [ 
    "php artisan clear-compiled" 
], 
Các vấn đề liên quan