--dry-run is not fully working
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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