Add Parameters to the Output of Dry Run Migrations #477
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.
Closes #186
Right now this looks like...
with numeric indices in the param array. If there are string indices, those names are included in the output (under the assumption that they match placeholders in the SQL).
The DBAL type classes are used to convert the values to something suitable for output (specifically Type::convertToDatabaseValue.
SQL statements without any params look the same as they do currently.
This is probably a good enough first pass at this, but it's not going to protect users from doing something wonky like...
and causing it the dryrun fail (granted the migration itself would fail anyway).
In other words: there's not a lot of validation. But that's not necessarily a bad thing. Types aren't validated to make sure they exist before fetching them with
Type::getType(...)
, but that's something thay may help a user catch bugs.