Laravel 5.0.32 & PHP7.2.10 mcrypt errors

Error – mcrypt is not installed/deprecated (it was removed from php7, need to add it back in to your env), see my other post:
http://alexyz.com/code/troubleshooting-various-things-on-a-mac-find-active-php-ini-laravel-add-mcrypt-extension-to-php7-2-10-and-verify-it/

Error – Function mcrypt_get_iv_size() is deprecated
Upgrade to Laravel 5.1
Credit: https://github.com/AsgardCms/Platform/issues/271
steps:

edit composer.json to:
“laravel/framework”: “~5.1”,

Remove the two service providers from config/app.php:
Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
Illuminate\Routing\ControllerServiceProvider::class,

Illuminate\Bus\BusServiceProvider,
\Providers\ConfigServiceProvider,


Update (don’t update equivalents in vendor folder!):
App\Providers\RouteServiceProvider
App\Providers\EventServiceProvider
App\Providers\AuthServiceProvider
from:
public function boot(DispatcherContract $events){parent::boot($events);…
to:
public function boot( { parent::boot();
Credit: https://laracasts.com/discuss/channels/forge/laravel-53-update-causing-error-on-forge-only

app/HTTP/Controllers/Controller.php
replace:
use Illuminate\Foundation\Bus\DispatchesCommands;
with:
use Illuminate\Foundation\Bus\DispatchesJobs;
https://stackoverflow.com/questions/34589987/trait-illuminate-foundation-bus-dispatchescommands-not-found-error-while-larav

Error: Auth guard[] is not defined:
replace config/auth.php with this:
https://github.com/laravel/laravel/blob/v5.2.0/config/auth.php

run composer update or php composer.phar update
or php composer.phar update –no-scripts
possibly this prior as well: php composer.phar dump-autoload

and then troubleshoot resulting errors of that, most likely:
– create /Applications/MAMP/htdocs/{siteName}/bootstrap/cache directory, and make it writable
– add line to app.php: ‘Illuminate\Routing\ControllerServiceProvider’
– change app.php ‘cipher’ => ‘MCRYPT_MODE_CBC’ to ‘cipher’ => ‘AES-256-CBC’,

php artisan key:generate
copy into .env & config/app.php

Some laravel, artisan, composer commands, check version:
php artisan list
php artisan –version

Leave a Reply

You must be logged in to post a comment.