Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix PHP 8.4 implicit nullable parameter deprecations#228

Merged
TheTechsTech merged 1 commit into
ezSQL:masterezSQL/ezsql:masterfrom
dannetstudio:fix/php84-implicit-nullable-deprecationsdannetstudio/ezsql:fix/php84-implicit-nullable-deprecationsCopy head branch name to clipboard
Apr 2, 2026
Merged

Fix PHP 8.4 implicit nullable parameter deprecations#228
TheTechsTech merged 1 commit into
ezSQL:masterezSQL/ezsql:masterfrom
dannetstudio:fix/php84-implicit-nullable-deprecationsdannetstudio/ezsql:fix/php84-implicit-nullable-deprecationsCopy head branch name to clipboard

Conversation

@dannetstudio
Copy link
Copy Markdown
Contributor

Summary

PHP 8.4 deprecated implicitly nullable parameters — typed parameters with a null default value that don't use the explicit ?Type notation. This triggers hundreds of E_DEPRECATED warnings on every request.

This PR updates all affected function signatures across the library from:

function foo(Type $param = null)

to:

function foo(?Type $param = null)

Files changed (14)

  • lib/Config.php
  • lib/ConfigInterface.php
  • lib/DatabaseInterface.php
  • lib/Database/ez_mysqli.php
  • lib/Database/ez_pdo.php
  • lib/Database/ez_pgsql.php
  • lib/Database/ez_sqlite3.php
  • lib/Database/ez_sqlsrv.php
  • lib/ezFunctions.php
  • lib/ezQuery.php
  • lib/ezQueryInterface.php
  • lib/ezSchema.php
  • lib/ezsqlModel.php
  • lib/ezsqlModelInterface.php

Testing

  • Ran the existing test suite (phpunit) — results are identical before and after this change (same pass/fail/skip counts)
  • All 22 PHP files pass php -l syntax validation
  • No behavioral changes — this is purely a type annotation fix

Fixes #226

PHP 8.4 deprecated implicitly nullable parameters (typed parameters
with a null default value without explicit ?Type notation).

This updates all typed parameters across the library from:
  function foo(Type $param = null)
to:
  function foo(?Type $param = null)

Affected files: Config, ConfigInterface, DatabaseInterface,
Database drivers (mysqli, pdo, pgsql, sqlite3, sqlsrv),
ezFunctions, ezQuery, ezQueryInterface, ezSchema,
ezsqlModel, ezsqlModelInterface.

Fixes ezSQL#226
Copy link
Copy Markdown
Contributor

@TheTechsTech TheTechsTech left a comment

Choose a reason for hiding this comment

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

Excellent!

@TheTechsTech TheTechsTech merged commit 780c1c1 into ezSQL:master Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More deprecation warnings with PHP 8.4

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.