-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 Annotated Commands in favor of native Symfony Console commands #6135
Open
weitzman
wants to merge
49
commits into
drush-ops:13.x
Choose a base branch
from
weitzman:use-command-directly
base: 13.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
2f63ffc
Deprecate AnnotatedCommands in favor of native Symfony Console commands
weitzman ec1f512
PHPCS and rename directory to just Listeners (was EventListener)
weitzman 47bf610
PHPStan
weitzman a201b1e
Restore handle() methods on a few Formatter Attribute classes
weitzman 756d384
A few fixes
weitzman 000c215
Remove illegal operation
weitzman 2eeb287
A bit ugly but test has to pass
weitzman ff65ece
Add --filter option automatically for Console commands. Implementatio…
weitzman f2f179d
Incorporate into the Trait
weitzman 41a8aa6
Support --filter during execute() of formatter supporting commands
weitzman 141fa70
Convert image:flush to a Console command. Add ValidateEntityLoad list…
weitzman 2eea0de
Deprecate constants
weitzman 68cad77
Inject a new io service when StyleInterface is the type hint
weitzman b3fbd3a
Add visibility and remove use of dt()
weitzman a194c59
Use io instead of logger for success messages
weitzman 4a9f239
Deal with a PHPStan failure by aliasing SynfonyStyle to DrushStyle in…
weitzman e78b50a
in ImageFlushCommand, use choice() and remove the deprecation from it
weitzman 2f42025
Convert sql:dump. Optionsets are provided via a Listener
weitzman ac5ad80
PHPCS
weitzman 0239f0f
Experiment with static method to add OptionSets
weitzman 8b16ff4
Demonstrate a static method approach for Validators
weitzman 7d6e8ea
Experiment with FormatterOptions via code not Attributes
weitzman 9847b61
Build io when needed - don't get it from the container
weitzman b9e11f3
Use DI
weitzman 6216ad6
Less magic - commands that format have own execute() with a bit of bo…
weitzman 8d7b2e4
FormatterOptions now has methods we need to deprecate formatting Attr…
weitzman 1a795af
Revert Formatting Attributes and use new fluid syntax for setInput
weitzman 680da18
Start restore of automatic mention of the formatting help topic
weitzman 12e74f8
Pass formattterOptions during configure()
weitzman 74becdc
Simplify ImageFlushCommands a bit
weitzman 6c899f4
Start deprecating a few Attribute classes
weitzman 74b697c
Minor improvements
weitzman 5b55f98
Convert sql:sanitize command. Convert the UserTable sanitizer to a Li…
weitzman ebd367a
PHPStan fixes
weitzman 34afdc7
Convert to UserTableFields listener. Needed for green
weitzman f923a80
Introduce writeFormattedOutput() - use in execute()
weitzman 2e75912
Just put validators right into the Command
weitzman a2b44fd
Lets go with calling Optionset methods statically from configure()
weitzman b4ed0bf
Experiment with CommandTester - it works
weitzman 58c2ddd
Move the install check to setUp()
weitzman c1056ed
A bit more experimentation with Applicationtester
weitzman 8f4f573
Delay getting $application because that can make entitytypeManager stale
weitzman fdfaf0f
Dont store $application in local variable. it gets stale.
weitzman 3712e5d
drush() method is good enough for now
weitzman f0ffbd9
Docs for Console commands
weitzman 955511e
Merge branch '13.x' into use-command-directly
weitzman aa21ad9
Convert image:derive
weitzman 8ef8994
Migrate config:set into a Console command
weitzman b9817b9
Config:get is now a Console command
weitzman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Not super excited to do this outside of tests. Is this for some sort of "alter" hook? If we want to do this, maybe we should, during preflight, add commands to some other list and provide a specific hook to alter that before adding to the application. That might be complicated, since today we add in two steps (commands from modules being added later).
Alternately, instead of removing a command, maybe we could change its name, remove its aliases and hide it?
I'm not sure why I think that setAccissible is worse than that.
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.
I think thats more more easily done once we use a container to store commands and maybe use a CommandLoader. Yes, this is just used by Woot today - we can remove it if it offends the eyes.