Skip to content

Fix/legacy driver removal followup#362

Merged
JanJakes merged 2 commits intoremove-legacy-driverfrom
fix/legacy-driver-removal-followup
Apr 15, 2026
Merged

Fix/legacy driver removal followup#362
JanJakes merged 2 commits intoremove-legacy-driverfrom
fix/legacy-driver-removal-followup

Conversation

@ashfame
Copy link
Copy Markdown
Member

@ashfame ashfame commented Apr 15, 2026

Follow up items for consideration from reviewing #358

ashfame added 2 commits April 15, 2026 18:11
The catch block accessed $err->errorInfo[1] and $err->errorInfo[2],
but WP_SQLite_Driver_Exception (which extends PDOException) never sets
the errorInfo property — it is only populated by PHP's internal PDO C
code, not when constructing PDOException subclasses in userland.

This caused PHP warnings and a blank error message on installation
failures. Use $err->getMessage() instead, which is always available,
and remove the unused $err_code variable.

Made-with: Cursor
The root-level phpunit/phpunit and yoast/phpunit-polyfills packages
were only used by the legacy driver test suite, which was removed
along with the root phpunit.xml.dist and tests/ directory. The new
driver's tests live in packages/mysql-on-sqlite/ with their own
composer.json and dependencies.

Made-with: Cursor
@ashfame ashfame requested a review from JanJakes April 15, 2026 12:29
@ashfame ashfame self-assigned this Apr 15, 2026
@ashfame ashfame mentioned this pull request Apr 15, 2026
3 tasks
Copy link
Copy Markdown
Member

@JanJakes JanJakes left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes!

@JanJakes JanJakes merged commit dd88684 into remove-legacy-driver Apr 15, 2026
16 checks passed
@JanJakes JanJakes deleted the fix/legacy-driver-removal-followup branch April 15, 2026 15:32
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.

2 participants