0

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.

Gunnarius
  • 59
  • 5
  • 1
    Please post all code/errors in the question as text instead of images, since text in images aren't indexed or searchable for future visitors that might have the same issue. – M. Eriksson May 17 '23 at 14:36
  • I don't understand the problem. You don't want to use postgresql, and you report that using mariaDB works. So what is the issue? – jjanes May 17 '23 at 15:11
  • The tutorial is with postgresql. But I am thinking to switch to mariaDB. – Gunnarius May 17 '23 at 15:12
  • If PostgreSQL throws that error, are you sure this is a problem of PHP or Symfony? – Nico Haase May 17 '23 at 15:12

0 Answers0