Skip to content

Version 7.0: Upgrade to anydataset-db 7.0#60

Open
byjg wants to merge 1 commit into
masterfrom
7.0
Open

Version 7.0: Upgrade to anydataset-db 7.0#60
byjg wants to merge 1 commit 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)

- 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
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