Skip to content

Conversation

weitzman
Copy link
Member

Experimental PR to evaluate backporting of the 14.x changes (Service Manager, Listeners, etc)

weitzman and others added 30 commits September 28, 2025 14:07
* 14.x branch in links, edit urls, CI, etc.

* Prep for 14.x
…nds (drush-ops#6135)

* Deprecate AnnotatedCommands in favor of native Symfony Console commands

* PHPCS and rename directory to just Listeners (was EventListener)

* PHPStan

* Restore handle() methods on a few Formatter Attribute classes

* A few fixes

* Remove illegal operation

* A bit ugly but test has to pass

* Add --filter option automatically for Console commands. Implementation is in progress

* Incorporate into the Trait

* Support --filter during execute() of formatter supporting commands

* Convert image:flush to a Console command. Add ValidateEntityLoad listener

Shows interact()

* Deprecate constants

* Inject a new io service when StyleInterface is the type hint

* Add visibility and remove use of dt()

* Use io instead of logger for success messages

* Deal with a PHPStan failure by aliasing SynfonyStyle to DrushStyle in \Drush\Runtime\DependencyInjection::alterServicesForDrush

* in ImageFlushCommand, use choice() and remove the deprecation from it

Resolves a PHPStan failure.

* Convert sql:dump. Optionsets are provided via a Listener

* PHPCS

* Experiment with static method to add OptionSets

* Demonstrate a static method approach for Validators

* Experiment with FormatterOptions via code not Attributes

* Build io when needed - don't get it from the container

* Use DI

* Less magic - commands that format have own execute() with a bit of boilerplate

* FormatterOptions now has methods we need to deprecate formatting Attributes

* Revert Formatting Attributes and use new fluid syntax for setInput

* Start restore of automatic mention of the formatting help topic

Use a web URL instead of the actual topic text.

* Pass formattterOptions during configure()

* Simplify ImageFlushCommands a bit

* Start deprecating a few Attribute classes

* Minor improvements

* Convert sql:sanitize command. Convert the UserTable sanitizer to a Listener

* PHPStan fixes

* Convert to UserTableFields listener. Needed for green

* Introduce writeFormattedOutput() - use in execute()

* Just put validators right into the Command

Its OK to duplicate a few lines of code

* Lets go with calling Optionset methods statically from configure()

* Experiment with CommandTester - it works

* Move the install check to setUp()

* A bit more experimentation with Applicationtester

* Delay getting $application because that can make entitytypeManager stale

* Dont store $application in local variable. it gets stale.

* drush() method is good enough for now

* Docs for Console commands

* Convert image:derive

* Migrate config:set into a Console command

* Config:get is now a Console command

* Initial handling of Invokable commands

Not dealing with Formatters yet.

* Use constant as invoke return

* composer.json changes for easier development on this branch

* Temporarily use my Symfony Console patch

* Use invokable commands - sql:dump

* No patch needed

* Add back listeners for validators

* Add command/listener load logging. And misc

* Preserve backward compat with Symfony 6

* Fix failing tests

* Fix twu command

* PHPCS

* Invokables only loaded on Console 7.4+

* A few PHPStan fixes

* PHPStan

* Fix config:get

* Minor

* Preserve backward compat for sql:sanitize plugins

* Nits

* Tidy ApplicationTester

* Bump dependencies

* Fix odd ImageTest failure and move FielterDefaultField to own listener

* Config name validate/interact

* phpcs

* Code comments.

* Remove unneeded assertion

* A new way of specifying Topics for a command

* PHPCS

* Allow composer plugin - core-composer-scaffold

* Implement BootstrapListener

* Convert sql:conf to verify MAX handling in BootstrapListener

* Convert updatedb:status. Uses a custom 'update' Kernel

* BootstrapListener should load early (maybe). Support DefaultTableFields

* Remove noisy log lines

* Use execute()

* Call redispatch hook during Application::doRunCommand (for Console commands)

* Honor #[HandleRemoteCommands] in Console commands

* Move Prompts configuration out of deprecated DrushCommands

* PHPCS

* Convert BrowseCommand

* PHPCS

* PHPStan

* Get own logger in ExecTrait

* Update the dcf generator

* Deprecate #[Complete]

* cast to bool

* Improve command authoring doc

* PHPCS

* Remove Application::remove() method

* use logger in id and if commands

* Use style for success messages, not Logger

Gets us in compliance with PSR3

* More success() via DrushStyle

* Trigger deprecation for old style success messages

* More runtime deprecations

* Note the needed conflict statement in composer.json

* Expand doc

* Convert updatedb command to native

* PHPCS

* Fix DI in sanitize listeners

* Impreove commandfile generator

* Convert sql:connect

* Convert sql:cli

* sql:create

* PHPCS

* sql:drop and sql:query

* Port rsync command

* fixes
* Port remaining config commands to Console style

* Update --destination handling and misc

* Symfony 6 compat

* Fix strval() params

* Fix DeployTest and misc

* PHPCS

* Fix missing command --format options in integration tests

* phpcs
* Batch as console command

* Autowire

* Update to use canonical command name
* Convert Cache commands to Console

* PHPStan
* Console - cache:warm

* PHPCS
* Console - core commands, cli

* Use newer command constant in deploy

* Remove old test
* Move cache commands into own folder

* Bump drupal core during phpstan

* Bump PHP for phpstan;
* Port deploy commands

* tweaks

* Port deply hook command sto Console

* Fix help links

* Tets fixes

* Simplify
* Too much formatter

* phpcs
* Too much formatter

* phpcs

* Convert Drupal commands

* phpcs
* Convert dd command to console

* dd and messengerCommand

* phpcs
* core:edit to Console

* phpcs
* Jsonapi to console

* PHPCS
* Port lang commands to console

* param type
)

* Bump to min PHP 8.3 , and bump to phpstan:2 and rector:2

* No more min php checking in drush

* PHPStan nits

* 8.2

* Fix bootsrtap site selection

* Deploy fix
* Port status to console

* Fix --project

* --field also means that we use string formatter

* theme:dev

* rm xhprofTest

* phpstan

* PHPstan fixes

* One more
* State commands to Console

* Renames

* namespace

* no ns
* user commands to console

* Add last twig command

* Avoid odd error
* PM commands to console

* ValidateModules

* Allow multiple args

* multiple

* PHPCS
* Theme commands to Console

* PHPStan
* Remove ExampleCommands

* More del
* Convert mkcommands to console

* PHPCS

* negatable and edit_url fixes
# Conflicts:
#	src/Commands/core/CacheWarmCommands.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants