Codementor Events

Issues during upgrade to Laravel 5.4

Published Feb 28, 2019Last updated May 17, 2019
Issues during upgrade to Laravel 5.4

New library for auto-generated files

2019/02/28 12:11:51 [error] 22687#0: *264599 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class session does not exist' in /opt/application/releases/20190228112508/client/vendor/laravel/framework/src/Illuminate/Container/Container.php:729

A new library is required for auto-generated files which are used for core laravel service providers.

  • /myapp/bootstrap/cache

Make sure the library exists and that the proper permissions are set during deployment to allow the laravel framework to write files into it.

Change of encryption algorithm

Mcrypt is no longer part of Laravel, while it has been replaced by better encryption algorithms. To make it work with the new encryption algorihm, it is necessary to do an execute of the key:generate artisan command. This updates the .env file, but not the app.php. Therefore make sure that the APP_KEY is not overwritten by the content of your old .env file during your next deploy.

The method Crypto::setKey() does no longer exist as the key is now passed to the ctor. To fix this, add a provider that instantiates an instance of the Encryption class with the key and add facade Crypto.

SELECT2 dropdowns

A newer version of HTML is required and it forces you to update to laravelcollective/html. However, the Form::select2() has slightly changed functionality.

Replace Form::select2 with Form::select and add "select2" to the class attribrute and you are back to "normal" with the previous functionality and the same styling.

Discover and read more posts from Jess Nielsen
get started
post commentsBe the first to share your opinion
Show more replies