Skip to content
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

Console commands: compatiblity with upcoming doctrine/dbal 3.0 #1179

Closed
dmaicher opened this issue Jun 9, 2020 · 6 comments · Fixed by #1231
Closed

Console commands: compatiblity with upcoming doctrine/dbal 3.0 #1179

dmaicher opened this issue Jun 9, 2020 · 6 comments · Fixed by #1231

Comments

@dmaicher
Copy link
Contributor

dmaicher commented Jun 9, 2020

Due to some deprecations and the new ConnectionProvider interface we need to fix a few things to be compatible with doctrine/dbal 3.0.

See doctrine/dbal#3956, doctrine/dbal#4059

Also related was this fix: #1170

Some thoughts:

  • we will need an adapter from Symfony\Bridge\Doctrine\ManagerRegistry to Doctrine\DBAL\Tools\Console\ConnectionProvider and inject that into the 2 commands RunSqlDoctrineCommand and ImportDoctrineCommand (can we use the dbal commands directly and deprecate the proxy commands?)
  • remove usages of Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper
@ostrolucky ostrolucky added the Status: On Hold Most likely waiting for upstream resolution label Jun 9, 2020
@ostrolucky
Copy link
Member

Yes, I concluded same. But like I mentioned in #1170 I don't want to change DoctrineBundle only to find dbal changed their API before release.

@dmaicher
Copy link
Contributor Author

@ostrolucky I think now we could work on this?

Since release 2.11 I now have some deprecations related to this on some projects:

Other deprecation notices (1)

  1x: Not passing a connection provider as the first constructor argument is deprecated
    1x in Application::run from Symfony\Bundle\FrameworkBundle\Console

@ostrolucky
Copy link
Member

Yep

@ostrolucky ostrolucky added Ready to work on and removed Status: On Hold Most likely waiting for upstream resolution labels Sep 23, 2020
@Adirelle
Copy link

Adirelle commented Oct 7, 2020

Since release 2.11 I now have some deprecations related to this

It also triggers an error when using the --connection parameter:

$ bin/console doctrine:query:sql --connection=someconnection 'CREATE SCHEMA IF NOT EXISTS someschema'

In RunSqlCommand.php line 108:

   Specifying a connection is only supported when a ConnectionProvider is used

With these versions:

  • doctrine/dbal 2.11.1
  • doctrine/doctrine-bundle 2.1.2

@dmaicher
Copy link
Contributor Author

dmaicher commented Oct 7, 2020

@Adirelle indeed. I proposed a fix for that issue here: #1226

@ostrolucky ostrolucky linked a pull request Oct 18, 2020 that will close this issue
ostrolucky added a commit that referenced this issue Oct 25, 2020
#1179 Deprecate doctrine:query:sql command
@ostrolucky
Copy link
Member

Fixed in master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants