Skip to content

Version 7.0: Upgrade to anydataset-db 7.0 - #60

Open
byjg wants to merge 2 commits into
masterfrom
7.0
Open

Version 7.0: Upgrade to anydataset-db 7.0#60
byjg wants to merge 2 commits into
masterfrom
7.0

Conversation

@byjg

@byjg byjg commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Overview

Upgrades the library to byjg/anydataset-db 7.0 and bumps the migration version to 7.0, aligning it with the anydataset-db major version.

Changes

  • Replace the driver query methods removed in anydataset-db 7.0 (execute, getScalar, getIterator) with the new DatabaseExecutor API
  • Add getExecutor(): DatabaseExecutor to Migration, DatabaseInterface, and AbstractDatabase
  • Rename the protected static helper getDbDriverWithoutDatabase() to getExecutorWithoutDatabase() (now returns DatabaseExecutor)
  • Change PgsqlDatabase::createDatabaseIfNotExists() to receive a DatabaseExecutor
  • Upgrade PHPUnit to ^12.5
  • Pin SQL Server image to 2022-latest and use MSSQL_SA_PASSWORD in docker-compose
  • Add CHANGELOG-6.0.md (released 6.0) and CHANGELOG-7.0.md with the full upgrade path
  • Document getExecutor() in the API reference

Breaking Changes

  • Consumers calling query methods on $migration->getDbDriver() must switch to $migration->getExecutor() (transactions stay on the driver)
  • Custom DatabaseInterface implementations must add getExecutor() (inherited when extending AbstractDatabase)

See CHANGELOG-7.0.md for the detailed upgrade path.

Testing

  • Psalm: no errors
  • PHPUnit: 111 tests, 704 assertions passing against MySQL, PostgreSQL, SQLite, and SQL Server (dblib); sqlsrv tests skipped locally (extension not installed)

byjg added 2 commits July 12, 2026 23:23
- Replace removed driver query methods (execute, getScalar, getIterator)
  with the new DatabaseExecutor API
- Add getExecutor() to Migration, DatabaseInterface and AbstractDatabase
- Rename getDbDriverWithoutDatabase() to getExecutorWithoutDatabase()
- Update PgsqlDatabase::createDatabaseIfNotExists() to receive DatabaseExecutor
- Upgrade PHPUnit to ^12.5
- Pin SQL Server image to 2022-latest and use MSSQL_SA_PASSWORD
- Add CHANGELOG-6.0.md and CHANGELOG-7.0.md
- Document getExecutor() in the API reference
Widen the PHP constraint to ">=8.3 <8.7"; the previous "<8.6" is
exclusive and excluded PHP 8.6.

Bump byjg/* dependencies to ^7.0. While 7.0 is unreleased these resolve
to 7.0.x-dev from each component's 7.0 branch, via minimum-stability dev
with prefer-stable.

Pin PHPUnit to ^12.5 and move Psalm to tools/psalm/composer.json. Psalm
enumerates supported PHP versions and no release lists 8.6, so as a
require-dev it made "composer install" fail on the 8.6 build before any
test ran. "composer psalm" bootstraps the tool and runs it.

CI: add PHP 8.6 to the matrix; the Psalm job runs on 8.5.

Housekeeping: rename phpunit.xml.dist to phpunit.xml, carry the 6.0
changelog onto this branch, and update CHANGELOG-7.0.md.
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.

1 participant