Skip to content

Fix PHP 8.5 deprecation of PDO::sqliteCreateFunction()#70

Merged
aaemnnosttv merged 1 commit intoaaemnnosttv:masterfrom
superdav42:fix/php85-deprecated-sqliteCreateFunction
Mar 18, 2026
Merged

Fix PHP 8.5 deprecation of PDO::sqliteCreateFunction()#70
aaemnnosttv merged 1 commit intoaaemnnosttv:masterfrom
superdav42:fix/php85-deprecated-sqliteCreateFunction

Conversation

@superdav42
Copy link
Copy Markdown
Contributor

Summary

  • PHP 8.5 deprecated PDO::sqliteCreateFunction() in favor of Pdo\Sqlite::createFunction()
  • Use the new createFunction() method on PHP 8.0+ (where it was introduced), falling back to the old method for PHP < 8.0

Test plan

  • Verify no deprecation warnings on PHP 8.5
  • Verify functionality on PHP 7.x (uses old sqliteCreateFunction())
  • Verify functionality on PHP 8.0-8.4 (uses new createFunction())

🤖 Generated with Claude Code

@superdav42 superdav42 force-pushed the fix/php85-deprecated-sqliteCreateFunction branch from 0ec890b to 22c8c44 Compare February 11, 2026 00:59
PHP 8.5 deprecated PDO::sqliteCreateFunction() in favor of
Pdo\Sqlite::createFunction(). Use the new method on PHP 8.0+
where it is available, falling back to the old method for
older versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@superdav42 superdav42 force-pushed the fix/php85-deprecated-sqliteCreateFunction branch from 22c8c44 to 1dd07a5 Compare February 11, 2026 01:07
@ara303
Copy link
Copy Markdown

ara303 commented Mar 18, 2026

Commenting here because it's relevant to my PR on aaemnnosttv/wp-cli-valet-command.

This solution works, having tested with both PHP 8.5 and 8.4.

If merged, this solves the one last deprecation notice I'm trying to squash on my PR. 😄

Copy link
Copy Markdown
Owner

@aaemnnosttv aaemnnosttv left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@aaemnnosttv aaemnnosttv merged commit 458c2ac into aaemnnosttv:master Mar 18, 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.

3 participants