I am following the symfony fast-track book at symfony. But when I want to create an entity class with:
$ symfony console make:entity Conference
I got this error:
An exception occurred in the driver: SQLSTATE[08006] [7] SCRAM authentication requires libpq version 10 or above
The DATABASE_URL is set like this from the tutorial:
DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=15&charset=utf8"
I have tried with and without this in .zshrc
export DOCKER_DEFAULT_PLATFORM=linux/amd64
I am on MacOS with M1. I guess it is because in the tutorial Postgresql is used. I have not installed that. I have installed MariaDB. I followed the same tutorial but set MariaDB in the .env settings. There it is working.
Meanwhile I have installed libpq with brew. At the end I got this message:
libpq is keg-only, which means it was not symlinked into /opt/homebrew,
because conflicts with postgres formula.
If you need to have libpq first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/libpq/bin:$PATH"' >> ~/.zshrc
For compilers to find libpq you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/libpq/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libpq/include"
I have added the path to .zshrc and also the export flags. creating an entity class is still not working.