-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Move CLI tools into a separate package #5076
Comments
Personally, I haven't used these commands a single time except for the cases when I had to modify their code. I would be fine with just deprecating them. If we extract the CLI to a separate package, I will have no interest in maintaining it. The only significant contribution in the recent past I recall was #3956. It shows that some people may be interested in it being maintained but it doesn't mean it should be the Doctrine organization that owns it. |
There are certainly more convenient tools to run a query. Compared to dedicated clients, this command looks like a toy. If I wanted a sophisticated UI, PhpStorm/DataGrip is the better choice. If wanted a CLI, my database vendor probably provides one that is better integrated and way more capable than our command. I usually use the DBAL inside Symfony applications. Here, the DBAL and ORM commands are integrated into the applications console by DoctrineBundle. It totally makes sense to have such a command there as a debug tool. It allows me to access the database with exctaly the same connection settings as my application is configured to use. And that alone makes the command valuable for me. I rarely use it, but when I do, I'm glad that it's there.
Database vendors have documentation for that purpose, right? I've never used that command and would be happy to remove it. What bugs me more is this rudimental console applications that DBAL and ORM throw into my We could document a code snippet for a console binary that developers could paste into their projects instead of placing a config file they don't understand to some magic place to make a vendor-provided console work. They could adjust that script to their needs and would be in full control. Taking all of this into account, what's left is a single command class, that a developer or a framework integration may wire into a Symfony console application if they need it. And honestly, I don't need a dedicated package for a single class that does no harm if it lies around dormant. |
Does this functionality depend on the tools provided by the DBAL package (i.e.
I'd love to see it done this way. Unless somebody expresses their interest in maintaining the new package, it will be abandoned since its inception. |
@derrabus if you could document the code snippet you have in mind (as you're the one who has at least some experience using them), we could deprecate this functionality. |
Will do. |
@morozov DoctrineBundle depends on the Command classes in the I admit that in 10 years, I have never used any of these 2 DBAL commands (the ORM commands are a different matter) |
So, if I understand you @derrabus correctly, you find the This way, it will still be available to Symfony users and will let us remove the dependency of the DBAL on Symfony Console. In general, a storage-level library that depends on a presentation-level library looks odd. |
DoctrineBundle is an integration package for Symfony full-stack applications. The console component however is used standalone quite often. Moving the classes there would make them less accessible for non-Symfony applications. I Don't think that this is the right place for it. As I said earlier, I'd just keep them here. |
So we resolve this issue as "Won't Fix"? |
If that's okay for you, yes. |
Well, it doesn't solve the originally reported problem that the DBAL depends on something that it shouldn't depend on. The only alternative is to move the namespace to a separate package. Similar to the bundle, it's used for development, and isn't part of the database abstraction. |
The DBAL does not depend on Symfony Console; it works very well without it. Symfony Console can optionally be installed to use two console commands which are an absolutely non-essential feature. I wouldn't create a separate package for two tiny command classes and a helper class. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm moving this discussion into a separate issue to make it more visible and split it from the code review of #5070.
Original comment by @morozov:
Originally posted by @morozov in #5070 (comment)
Comment by @greg0ire:
Originally posted by @greg0ire in #5070 (comment)
The text was updated successfully, but these errors were encountered: