Below the Symfony: The Fast Track book I walk through the steps.
On point 8. Doctrine ( https://symfony.com/doc/current/the-fast-track/en/8-doctrine.html#migrating-the-database): Migrating the Database
$ symfony console make:migration
expected:
generated file name:
migrations/Version20191019083640.php)
unexpected:
In ExceptionConverter.php line 77:
An exception occurred in the driver: SQLSTATE[08006] [7] SCRAM authentication requires libpq version 10 or above
In Exception.php line 28:
SQLSTATE[08006] [7] SCRAM authentication requires libpq version 10 or above
In Driver.php line 29:
SQLSTATE[08006] [7] SCRAM authentication requires libpq version 10 or above
$ symfony run psql
psql: error: connection to server at "127.0.0.1", port 50615 failed: FATAL: password authentication failed for user "app"
command "psql" failed: exit status 2
Work Environment:
Device: Mac, Apple M1 Max, Ventura 13.1
$ symfony server:start -d
[OK] Web server listening
The Web server is using PHP CGI 8.1.1
https://127.0.0.1:8000
$ symfony proxy:start
[OK] Proxy server listening on http://localhost:7080
$ docker-compose ps
guestbook-database-1 "docker-entrypoint.s…" database running 0.0.0.0:60714->5432/tcp
$ postgres -V
postgres (PostgreSQL) 14.6 (Homebrew)
$ brew install libpq
/...
Warning: libpq 15.1 is already installed and up-to-date.
$ docker-compose exec database psql app app
app=# SELECT version();
version
-----------------------------------------------------------------------------------------------------------------------
PostgreSQL 14.6 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924, 64-bit
(1 row)
app=# \! psql -V
psql (PostgreSQL) 14.6
$ symfony book:check-requirements
[OK] Git installed
[OK] PHP installed version 8.1.1 (/Applications/MAMP/bin/php/php8.1.1/bin/php)
[OK] PHP extension "intl" installed - required
[KO] PHP extension "amqp" not found, optional - needed only for chapter 32
[OK] PHP extension "json" installed - required
[OK] PHP extension "session" installed - required
[OK] PHP extension "xml" installed - required
[KO] PHP extension "redis" not found, optional - needed only for chapter 31
[OK] PHP extension "pdo_pgsql" installed - required
[OK] PHP extension "sodium" installed - required
[OK] PHP extension "curl" installed - optional - needed only for chapter 17 (Panther)
[OK] PHP extension "gd" installed - optional - needed only for chapter 23 (Imagine)
[OK] PHP extension "ctype" installed - required
[OK] PHP extension "tokenizer" installed - required
[OK] PHP extension "zip" installed - optional - needed only for chapter 17 (Panther)
[OK] PHP extension "mbstring" installed - required
[OK] PHP extension "xsl" installed - required
[OK] PHP extension "openssl" installed - required
[OK] Composer installed
[OK] Docker installed
[OK] Docker Compose installed
[OK] npm installed