Problems solved while updating from Symfony 4.4 to 5.0

Step 1

Following update information at Symfony / Sensio Labs website:

https://symfony.com/doc/current/setup/upgrade_major.html

and changed composer.json file.

But DO NOT change

"symfony/web-server-bundle": "4.4.*",

Step 2

I could not update due to error message:

The requested package nelmio/cors-bundle 
(locked at 1.5.6, required as ^2.0) is satisfiable by 
nelmio/cors-bundle[1.5.6] but these conflict with your 
requirements or minimum-stability.

I had to change the file composer.lock from

"name": "nelmio/cors-bundle",
"version": "1.5.6",

to

"name": "nelmio/cors-bundle",
"version": "2.0.1",

Step 3

Last error message was

Uncaught Error: Class 'Symfony\Component\Debug\Debug' not found

and could be fixed by information from

https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/4.4/public/index.php

changing public/index.php

from

use Symfony\Component\Debug\Debug

to

use Symfony\Component\ErrorHandler\Debug;

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.