Skip to content

Support PHP 8.5#1315

Merged
lippserd merged 5 commits intomainfrom
support-php-8.4/8.5
Mar 20, 2026
Merged

Support PHP 8.5#1315
lippserd merged 5 commits intomainfrom
support-php-8.4/8.5

Conversation

@BastianLedererIcinga
Copy link
Copy Markdown
Contributor

@BastianLedererIcinga BastianLedererIcinga commented Dec 3, 2025

PHP 8.4

  • Change implicit nullable type declaration to explicit

Migration docs

PHP 8.5

  • Remove no-op ReflectionProperty::setAccessible() calls
  • Use Pdo\Mysql driver-specific constants
  • Avoid using null as an array key or as the key to array_key_exists()

Migration docs

resolves #1312
requires Icinga/ipl-sql#99

@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Dec 3, 2025
@BastianLedererIcinga BastianLedererIcinga self-assigned this Dec 3, 2025
sukhwinder33445
sukhwinder33445 previously approved these changes Dec 5, 2025
Copy link
Copy Markdown
Contributor

@sukhwinder33445 sukhwinder33445 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good, @Jan-Schuppik, please approve it when the UI tests are also fine.

sukhwinder33445
sukhwinder33445 previously approved these changes Dec 5, 2025
Jan-Schuppik
Jan-Schuppik previously approved these changes Dec 8, 2025
@lippserd lippserd changed the title Support php 8.4/8.5 Support PHP 8.5 Jan 15, 2026
@lippserd
Copy link
Copy Markdown
Member

@BastianLedererIcinga Please rebase.

@nilmerg nilmerg modified the milestones: 1.3.1, 1.4.0 Mar 5, 2026
@BastianLedererIcinga BastianLedererIcinga force-pushed the support-php-8.4/8.5 branch 2 times, most recently from 05a46a9 to 49d97b4 Compare March 10, 2026 08:42
Since PHP 8.4 implicitly nullable parameter types are deprecated.

Normalize scoped PHPDoc for nullable-parameter updates: use `?Type` instead of
`Type|null` and remove column alignment.

Co-authored-by: "Eric Lippmann <eric.lippmann@icinga.com>"
`ReflectionProperty::setAccessible()` has had no effect since PHP 8.1, as all
properties are accessible via reflection by default. The method is deprecated
as of PHP 8.5.
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`.
@lippserd lippserd force-pushed the support-php-8.4/8.5 branch from 3caa773 to a99b2ec Compare March 19, 2026 21:08
@lippserd
Copy link
Copy Markdown
Member

@BastianLedererIcinga Please justify a99b2ec.

@BastianLedererIcinga BastianLedererIcinga force-pushed the support-php-8.4/8.5 branch 3 times, most recently from 76f5d63 to d360924 Compare March 20, 2026 10:54
BastianLedererIcinga and others added 2 commits March 20, 2026 14:54
Passing `null` as the key to `array_key_exists()` or using it as an array key
is deprecated as of PHP 8.5.

Co-authored-by: Eric Lippmann <eric.lippmann@icinga.com>
Remove errors no longer reported. Since PHP 7.x is no longer supported, remove
the 7.x baseline. It is now no longer necessary to have multiple baseline
files.
@lippserd lippserd force-pushed the support-php-8.4/8.5 branch from d360924 to 5053fb3 Compare March 20, 2026 13:54
@lippserd lippserd merged commit 7c6135e into main Mar 20, 2026
13 checks passed
@lippserd lippserd deleted the support-php-8.4/8.5 branch March 20, 2026 13:57
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.

PHP 8.4/8.5 Support

5 participants