cakephp / cakephp/phinx

--dry-run is not fully working

Open
#1,415 19 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
4.5k
Forks
884
PR merge metrics
No merged PRs in 30d

Description

Running phinx migrate --dry-run will execute queries if they're written via queryBuilder.
For example here's code from docs:

<?php
$builder = $this->getQueryBuilder();
$builder
->update('users')
->set('fname', 'Snow')
->where(['fname' => 'Jon'])
->execute()

So phinx migrate --dry-run will not work with that code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing phinx migrate --dry-run with the documented QueryBuilder update example, then trace how QueryBuilder executes statements during migrations. Done means dry-run reports the generated query without executing it, while normal migration execution remains unchanged; add or update coverage for this behavior if the existing test structure supports it.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.