Release 0.8.0 - #1
Merged
Merged
Conversation
- Use standard names for functions (insert, select) - Reuse parameter parser in get and select
CrudTrait: pass sort as order, use explicit table.id key
feat: use dbal, add pgsql/mysql tests feat: Add Model support feat: Add CI fix: update dependencies fix: remove CrudTrait, update Table methods to use sql naming
objectivebot
approved these changes
Sep 27, 2026
objectivebot
left a comment
There was a problem hiding this comment.
Reviewed for the v0.8.0 release. The full CI matrix is green, including lowest-compatible dependencies with Doctrine DBAL 4.0.0, Composer metadata validation, SQLite/MySQL/PostgreSQL coverage, and PHP 8.2–8.4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the 0.8.0 modernization of
objectiveweb/db. It replaces the legacy PDO-oriented internals with Doctrine DBAL, strengthens query construction and mutation safety, adds model mapping and table inheritance, and expands the project from primarily MySQL-oriented behavior to a tested SQLite/MySQL/PostgreSQL abstraction.The documented public API is intentionally small around
DB,Table,Query,Collection,Model, andExpr. This is still a pre-1.0 release and contains breaking behavioral and runtime changes from 0.7.Database layer
^4.0).DB::ensureConnection()andDB::reconnect()for recovering lost connections.TransactionExceptionfailures.COUNT(*)queries for pagination totals instead ofSQL_CALC_FOUND_ROWS.Exprsupport for explicit SQL expressions.Query construction and safety
FOR UPDATEandFOR SHARE.Table API
TableCRUD behavior and filtering.findBy().DB::table().Table::insert()return contract as the primary-key map, e.g.['id' => '1'], ornullwhen the ID cannot be determined. Custom primary-key names are used as the return key.CrudTraitimplementation.Models
Add optional
Modelmapping to tables:ModelValidationExceptionfor invalid payloads.Model mapping remains optional; tables without a model continue returning arrays.
Table inheritance
Add support for representing one logical entity across a base and child table using
extendsconfiguration.Exceptions
Add typed exceptions for database-level failures:
DBExceptionInvalidQueryExceptionModelValidationExceptionNotFoundExceptionTransactionExceptionCollection and Query
Queryfor Doctrine DBAL result handling.Query::exec()as returning DBALResult::rowCount()for result-set queries and DBAL affected-row counts for statement queries; result-set row-count semantics remain driver-dependent.Collectionbehavior and typing.total()andcontentRange().Collection::render()to return the collection data array directly, with no HTTP side effects.Testing and CI
The test suite was substantially expanded to cover CRUD, query generation, SQL behavior, models, inheritance, transactions, safety checks, joins, locks, and database-specific behavior.
GitHub Actions now runs:
MySQL and PostgreSQL run as real service containers in CI. Pull requests run the suite once through the
pull_requestevent; pushes run CI only onmasterto avoid duplicate PR checks.Local multi-database testing is also available through Docker Compose and
./scripts/test-docker.sh.The obsolete Travis CI configuration has been removed.
Compatibility
DB::insert()returns a scalar generated ID (string|null), whileTable::insert()returns a primary-key map such as['id' => '1']ornull.Validation
The branch is synchronized with
masterand the expanded SQLite, MySQL, and PostgreSQL GitHub Actions suites are passing.