I want to create a Symfony CRUD application. These are the steps I did:
My problem was updating php version with sudo update-alternatives --config php didn't update php-cgi.
Symfony CLI was still using the old version of php-cgi:
symfony local:php:list
┌─────────┬───────────┬────────────┬─────────┬────────────────┬─────────┬─────────┐
│ Version │ Directory │ PHP CLI │ PHP FPM │ PHP CGI │ Server │ System? │
├─────────┼───────────┼────────────┼─────────┼────────────────┼─────────┼─────────┤
│ 7.2.34 │ /usr │ bin/php7.2 │ │ │ PHP CLI │ │
│ 7.3.23 │ /usr │ bin/php7.3 │ │ bin/php-cgi7.3 │ PHP CGI │ │
│ 7.4.11 │ /usr │ bin/php7.4 │ │ bin/php-cgi7.3 │ PHP CGI │ * │
└─────────┴───────────┴────────────┴─────────┴────────────────┴─────────┴─────────┘
I solved it by updating php-cgi:
sudo apt-get install -y php-cgi