I recently changed 2 lines in a view and pushed the code to github. When I deployed on Laravel Forge (After about 2 weeks of no updates) & I got the following error:
"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
}
I can’t even do php artisan -v
without getting that error. I then ran composer diagnosis
and got:
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
How would I make that error go away? Never seen it before and not exactly sure what's wrong.
Try clearing Composer's cache by running composer clear-cache . Ensure you're installing vendors straight from your composer. json via rm -rf vendor && composer update -v when troubleshooting, excluding any possible interferences with existing vendor installations or composer.
To update Composer itself to the latest version, run the self-update command. It will replace your composer.phar with the latest version. If Composer was not installed as a PHAR, this command is not available. (This is sometimes the case when Composer was installed by an operating system package manager.)
When you run composer update command it simply process the composer. json file and install dependencies, And creates the composer. lock file with updated dependencies. It does not process the composer.
Courtesy of AndreasLutro
in #laravel:
Try to remove bootstrap/compiled.php.
That fixed it for me.
The proper way to fix this is to run php artisan clear-compiled
before running composer install
or composer update
You can add the following to your composer.json in the "scripts" section if you want, to make it automatic:
"pre-install-cmd" :[
"php artisan clear-compiled"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With