Skip to content

Stdlib: SQLite3 open/lastError*/version/createCollation/backup (#20565) - #20577

Merged
PurHur merged 1 commit into
masterfrom
agent/stdlib-sqlite3-open-error-version
Jul 18, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/stdlib-sqlite3-open-error-version

Conversation

@PurHur

@PurHur PurHur commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implements SQLite3::open, lastErrorCode/lastErrorMsg, static version, createCollation, and backup in PHP-in-PHP (ext/sqlite3/) with libsqlite3 FFI — matching php-src ext/sqlite3/sqlite3.c.
  • Note: Zend 8.4/8.5 has no SQLite3::totalChanges() (issue-doc drift); left unimplemented.
  • createCollation registers/stores the callable (parity with createFunction); full COLLATE FFI callback remains follow-up.
  • No new runtime/*.c.

Closes #20565

Test plan

  • PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/sqlite3_open_error_version_backup.php → ok
  • PHP_COMPILER_PROFILE=8.4 ./phpc build -o /tmp/sq_adv2 test/repro/sqlite3_20565_aot_advertise.php && /tmp/sq_adv2 → all methods =Y / ok (AOT advertisement; instance execution under AOT is a pre-existing SQLite3 gap — same as exec)
  • vendor/bin/phpunit --filter sqlite3_open_error_version_backup → OK (2 tests)
  • php script/bootstrap-inventory.php --check → OK 5685/5685
  • spine coverage sync OK after new spine requires

php-src-strict · Pillar 4 stdlib

Made with Cursor

Register remaining stub methods via PHP-in-PHP + libsqlite3 FFI so apps can
reopen after close, read error state, report library version, register
collations, and backup databases (php-src ext/sqlite3/sqlite3.c).

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Stdlib: SQLite3::open/backup/createAggregate/createCollation/loadExtension/version/lastError* still missing after #19862 (ext/sqlite3/sqlite3.stub.php)

1 participant