Skip to content

Use forward compatible Mysql constants of ipl-sql#455

Merged
sukhwinder33445 merged 1 commit into
mainfrom
mysql-constants
May 12, 2026
Merged

Use forward compatible Mysql constants of ipl-sql#455
sukhwinder33445 merged 1 commit into
mainfrom
mysql-constants

Conversation

@BastianLedererIcinga
Copy link
Copy Markdown
Contributor

For PHP < 8.4 the constant Pdo\Mysql::ATTR_INIT_COMMAND is not yet available but its predecessor is deprecated.
Instead of using a version_compare to solve this problem, a forward compatibility shim of ipl-sql can be used to support these versions.

requires: Icinga/ipl-sql#99

@cla-bot cla-bot Bot added the cla/signed CLA is signed by all contributors of a PR label Mar 10, 2026
Replace deprecated `PDO::MYSQL_*` constant usage with the driver-specific
`Pdo\Mysql::ATTR_*` constants introduced in PHP 8.4.

This prepares the code for PHP 8.5, where accessing MySQL driver constants
through the generic `PDO` class is deprecated.

This change requires a compatibility shim on older PHP versions to provide
`Pdo\Mysql` for runtimes that do not expose the driver-specific class yet.  The
shim is provided in `ipl-sql`. As a consequence, the required version of the
Icinga PHP library has been raised.
@sukhwinder33445 sukhwinder33445 merged commit c4f0519 into main May 12, 2026
13 checks passed
@sukhwinder33445 sukhwinder33445 deleted the mysql-constants branch May 12, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed CLA is signed by all contributors of a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants