-
-
Notifications
You must be signed in to change notification settings - Fork 448
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
Deprecate ORM proxy commands #1524
Comments
The need for the ORM is actually to keep the command name configurable (the base Command constructor accepts a name). Then, the bundle could add the name in the tag (for lazyness) and in the constructor (so that the command has the right name). |
As far as I can see, DBAL also defines name in DoctrineBundle/Resources/config/dbal.xml Line 104 in b700275
|
@ostrolucky indeed I think this works. I just tried this diff on one of my apps: - <service id="doctrine.cache_clear_query_cache_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\ClearQueryCacheDoctrineCommand">
+ <service id="doctrine.cache_clear_query_cache_command" class="Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand">
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
<tag name="console.command" command="doctrine:cache:clear-query" />
</service> and the configured name from the tag works:
Just the description is now of course the default one provided by the ORM command. |
In case the description in the proxy command is better than the one in the ORM command, we should update the description upstream. |
As mentioned in #1513 (comment) the proxy commands would just change the command name and description once we remove the deprecated helper approach of providing the entity manager in 3.0.
So we should deprecate them and prepare a path of removing them.
As suggested in the linked discussion we could make the name and description configurable on the ORM commands or change them there directly.
The text was updated successfully, but these errors were encountered: