Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

fix(cli): 2.x compatibility — shorthand, --nocomments=true, config type/include, --template, SQLite paths - #261

Merged
jasdeepkhalsa merged 4 commits into
masterfrom
fix/legacy-shorthand-and-missing-server
Oct 11, 2026
Merged

jasdeepkhalsa merged 4 commits into
masterfrom
fix/legacy-shorthand-and-missing-server

Conversation

@jasdeepkhalsa

@jasdeepkhalsa jasdeepkhalsa commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Fixes #182. 2.x's command line, checked option by option against a running 2.0.0, now works in 3.x on MySQL, PostgreSQL and SQLite.

What was broken, in every 3.0 release candidate

2.x usage 3.x before Now
dbdiff server1.db1:server2.db2 "There are no commands defined in the "server1.db1" namespace" runs diff
--nocomments=true "The "--nocomments" option does not accept a value" accepted (=false too)
--nocomments in native output changed nothing; the header was always written drops the -- DBDiff migration header; the UP/DOWN markers stay
type: / include: in .dbdiff or --config ignored: the options' own defaults counted as "set" honoured; a flag still wins, defaults come last
--template=… / template: ignored: native SQL was written regardless rendered (TemplateFormat, {{ $up }}/{{ $down }} as in 2.x)
--driver=sqlite server1./var/db/v1.db:… (the README example) v1.db read as database v1, table db SQLite paths split at the first dot only
server1.db1.table1:server2.db2.table3 PHP warnings a clear error: tables are compared with the table of the same name (2.0.0 crashed on this too)
diff with no settings for a server a PHP warning, then an empty config "No connection settings for server1. Pass --server1=…"
PHP 8.2+ "Creation of dynamic property" deprecations in the output properties declared

How it was checked

  • Every invocation in 2.0.0's README was run through 2.0.0 and 3.x on MySQL 8, and the SQL compared. The defaults, --output, --template, --config and .dbdiff cases produce the same statements.
  • The rest differ because 3.x is more accurate. A DOWN that restores a dropped column's values writes NULL where 2.0.0 wrote ''; 3.x names the columns in INSERT; a missing --output directory exits 1 where 2.0.0 exited 0 having written nothing.
  • The same invocations pass on PostgreSQL 16 and SQLite with 3.x (2.x supported neither). No PHP notices with error_reporting=-1.

Tests

  • tests/Unit/LegacyInvocationTest: the shorthand, and --nocomments=….
  • tests/Unit/TwoXCliSqliteTest, with no server needed:
    • the README's dotted SQLite paths;
    • --nocomments=true drops the header and keeps the markers;
    • .dbdiff decides type and include, and a flag still wins;
    • --template shapes the output;
    • no deprecations.
  • LegacyShorthandPostgresTest: the shorthand produces exactly diff's migration on a live server; differently named tables are refused clearly.
  • DiffCommandTest: buildParams leaves type/include unset for the config file, and applyDefaults supplies schema/up.

🤖 Generated with Claude Code

…sing server is a clear error

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added bug mysql Related to Mysql php Pull requests that update php code sqlite Related to Sqlite labels Oct 10, 2026
…s(=true), SQLite paths with dots, clear table-name error, no dynamic-property deprecations

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasdeepkhalsa jasdeepkhalsa changed the title fix(cli): the 2.x shorthand works again; a missing server is a clear error fix(cli): 2.x compatibility — shorthand, --nocomments=true, config type/include, --template, SQLite paths Oct 10, 2026
jasdeepkhalsa and others added 2 commits October 10, 2026 22:55
…er evaluated; server check out of DBManager

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@jasdeepkhalsa
jasdeepkhalsa merged commit 58e1d67 into master Oct 11, 2026
76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug mysql Related to Mysql php Pull requests that update php code sqlite Related to Sqlite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: Incorrect usage example for shorthand syntax

1 participant