Skip to content

Feature/fix release 8#153

Merged
jasdeepkhalsa merged 2 commits intomasterfrom
feature/fix-release-8
Mar 10, 2026
Merged

Feature/fix release 8#153
jasdeepkhalsa merged 2 commits intomasterfrom
feature/fix-release-8

Conversation

@jasdeepkhalsa
Copy link
Member

fix(release): remove broken src overlay; stamp version via constant

The src/ overlay (git checkout $REF -- src/) was partially overwriting
master files with incompatible old code — e.g. DefaultParams.php from
v2.0.1 (no $description) would replace the fixed master version while
DiffCommand.php from master (which sets $params->description) stayed,
causing the PHP 8.2 deprecation notice in every build.

The two codebases are architecturally incompatible across the old/new
boundary so the overlay concept does not work. Releases always build
from master HEAD (whatever branch the workflow is dispatched from).

The version number is now stamped via src/Version.php which is written
by the workflow before Box compiles, so dbdiff --version reports the
correct version. The unused 'ref' workflow input is also removed.

chore: add build:phar composer script; enable PHAR requirement check

  • composer run build:phar now builds dist/dbdiff.phar locally (version
    will show as 'dev' since src/Version.php defaults to that)
  • box.json check-requirements: true so PHP version is checked at PHAR
    startup — users on PHP < 8.1 get a clean error instead of a crash

The src/ overlay (git checkout $REF -- src/) was partially overwriting
master files with incompatible old code — e.g. DefaultParams.php from
v2.0.1 (no $description) would replace the fixed master version while
DiffCommand.php from master (which sets $params->description) stayed,
causing the PHP 8.2 deprecation notice in every build.

The two codebases are architecturally incompatible across the old/new
boundary so the overlay concept does not work. Releases always build
from master HEAD (whatever branch the workflow is dispatched from).

The version number is now stamped via src/Version.php which is written
by the workflow before Box compiles, so dbdiff --version reports the
correct version. The unused 'ref' workflow input is also removed.
- composer run build:phar now builds dist/dbdiff.phar locally (version
  will show as 'dev' since src/Version.php defaults to that)
- box.json check-requirements: true so PHP version is checked at PHAR
  startup — users on PHP < 8.1 get a clean error instead of a crash
@sonarqubecloud
Copy link

@jasdeepkhalsa jasdeepkhalsa merged commit de9f732 into master Mar 10, 2026
57 checks passed
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