-
-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Feature Request
Q | A |
---|---|
New Feature | yes |
RFC | no |
BC Break | no |
Summary
PDO extensions (i.e. MySQL driver) do have dedicated extensions which need to be enabled.
These can be required using composer.json
ext-
notation, i.e.:
pdo_mysql
pdo_sqlite
- etc.
We do not properly support these as of now within the CI container:
Extension "ctype" is already enabled.
Extension "intl" is already enabled.
Extension "mbstring" is already enabled.
Installing packaged extensions: php8.2-gd php8.2-pdo_mysql php8.2-mysql
[...]
Fetched 14.9 MB in 2s (8465 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
181 packages can be upgraded. Run 'apt list --upgradable' to see them.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php8.2-pdo_mysql
I only had ext-pdo_mysql
as requirement within composer.json
and added mysql
via .laminas-ci.json
as I was wondering if that actually allows me to have the module detection (pdo_mysql
is available once mysql
extension is installed) to skip the installation of pdo_mysql
but that did not work as mysql
is appended to the list we parsed from composer.json
.
It seems there are several packages available from sury which provide the appropriate PDO drivers:
php8.2-mysql - MySQL module for PHP
php8.2-odbc - ODBC module for PHP
php8.2-pgsql - PostgreSQL module for PHP
php8.2-sqlite3 - SQLite3 module for PHP
MySQL, ODBC and Postgres do actually create 1:1 the same mods-available
file as expected. Only SQLIte does not match... its sqlite3
vs pdo_sqlite
(there is no such pdo_sqlite3
which is really annoying).
Extension Name | Sury Package Name | Extension Config |
---|---|---|
ext-pdo_mysql |
php8.2-mysql |
pdo_mysql.ini |
ext-pdo_odbc |
php8.2-odbc |
pdo_odbc.ini |
ext-pdo_pgsql |
php8.2-pgsql |
pdo_pgsql.ini |
ext-pdo_sqlite |
php8.2-sqlite3 |
pdo_sqlite.ini |
I was thinking of adding support for MySQL, Postgres and SQLIte for now to the container so that we have the most common (?) drivers for postgres so that this is properly installed.