2.x#2
Merged
Merged
Conversation
Quality push for the 2.0 line. Full diff is documented in CHANGELOG.md.
Bugs
- B1/B7 andWhereNotIn now produces NOT IN (was IN).
- B2 orLike/andLike connector swap fixed.
- B3 orBetween parameter order fixed.
- B4 RawQuery::set() Closure branch was dead — Closure now imported.
- B5/B6 selfJoin/naturalJoin signatures aligned with implementation.
- B8 preg_match() default-branch null-matches guard.
- B9 where() operator type coercion before trim().
- B16 startLike/endLike wildcard semantics fixed (start='val%', end='%val').
- B20/B21 UPDATE exception message corrected.
- B23 Abstract test bases now actually abstract.
- B26 BucketCompiler joins AND/OR buckets with ' OR ' (was ' AND ',
silently collapsing top-level orWhere() chains to AND).
- B27 in_array() strict-mode so booleans don't loose-match operators.
- B28 FIND_IN_SET parameterization was inverted — raw user strings were
being inlined as literal SQL. Latent injection vector; fixed.
Architecture
- Drivers: BaseDriver -> AbstractDriver; MySQL/PgSQL/SQLite -> MySqlDriver/
PostgreSqlDriver/SqliteDriver; new GenericDriver. DriverInterface API:
escapeIdentify(&) -> escapeIdentifier() and getDriver() -> getName().
- QueryBuilder split: the 1505-line god class becomes 6 clause traits
(Structure / From / Select / Join / Where / Set), 7 compilers
(Select/Insert/BatchInsert/Update/BatchUpdate/Delete + Abstract),
plus Operators / SqlValueDetector / BucketCompiler helpers.
- Interface ↔ impl type contracts realigned (mixed , static
returns, group() parameter declared).
- QueryBuilder::__clone deep-clones the parameter bag.
Tooling and CI
- PHP requirement: 8.0 -> 8.1; PHP 8.4 implicit-nullable deprecations
resolved.
- phpcs.xml (PSR-12, 120-char soft cap), phpstan.neon (level 6).
- composer scripts: test, cs, cs-ci, cs-fix, stan, qa.
- .github/workflows: phpunit (PHP 8.1-8.4 matrix with pcov), phpcs,
phpstan, composer-validate; dependabot weekly.
Tests and coverage
- 62 baseline tests -> 299 tests / 399 assertions.
- Line coverage 97.28 % (Clover: 100 % methods covered).
- New regression suites: BugfixRegressionTest, WhereOperatorsTest,
BetweenInLikeTest, SubQueryTest, CrudEdgeCasesTest, ParametersTest,
RawQueryTest, DriversTest, FactoryAndStructureTest, SelectHelpersTest,
QueryBuilderBehaviorTest.
Documentation
- README.md rewritten: badges, requirements, install, quick start,
features, supported drivers, contributing/security pointers.
- CHANGELOG.md (Keep-a-Changelog) with the full v2.0.0 entry.
- docs/en/ (13 chapters, ~2 750 lines) with runnable examples and the
generated SQL inline.
- Security hardening: identifier validation (V3), LIKE wildcard escape (V4), placeholder regex tightening (V6). - Architecture refactor: clause traits + dedicated compilers; driver renames with breaking DriverInterface changes. - PHP requirement raised to 8.1. - Test suite: 62 -> 324 tests; line coverage 97.52 %. - New CI (PHPUnit 8.1-8.4 / PHPStan level 6 / PSR-12), 14-chapter docs/en/.
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.
Özet / Summary
Etkilenen paket / Affected package
initorm/query-builderinitorm/dbalinitorm/databaseinitorm/ormDeğişiklik türü / Type of change
İlgili konu / Related issues
Bağımlılık zinciri etkisi / Dependency chain impact
Test / Tests
php vendor/bin/phpunityerel olarak çalıştırıldı / ran locallyKontrol listesi / Checklist
Facade\DBetkilendiyse@method staticnotları güncellendi /@method staticannotations updated ifFacade\DBis affectedNotlar / Additional notes