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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update MigrateCommand.php #1028
Update MigrateCommand.php #1028
Changes from 3 commits
929ddb1
f29a905
69a3358
5099259
e4eb34d
4e3707b
6044768
7ec206e
71da252
9517c32
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getDatabase
is not part of the\Doctrine\DBAL\Driver\Connection
interface, thus i'm not sure if we can do this...@greg0ire ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 but
getConnection
returns a\Doctrine\DBAL\Connection
instead of that interface, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm. right. being so, we know the database... (i remember that there was a reason for choosing the concrete implementation, but can't recall why :-( )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In doctrine/migrations 2.2.1 I'm getting:
But in 3.0.1
get_class($this->getDependencyFactory()->getConnection())
gives me:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the command
getDependencyFactory
has been introduced in 3.0There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greg0ire I'm not sure if is worth this, it would be nice to change the return type from
\Doctrine\DBAL\Driver\Connection
to\Doctrine\DBAL\Connection
to have a more simple interfaceThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That wouldn't be a BC break, except for extending classes, so… go ahead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be I'm worrying too much. Probably the improved dx is worth this change.
@ThomasLandauer can you do the same change on the other commands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, done :-) (I just copied it over - since they all extend
DoctrineCommand
)@goetas: What means "DX"? Developer Experience - as opposed to User Experience (UX)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThomasLandauer yes, DX means Developer Experience