Skip to content

Replace symfony/console with entropy/entropy console framework - #8787

Draft
TomasVotruba wants to merge 5 commits into
mainfrom
entropy-console-migration
Draft

TomasVotruba wants to merge 5 commits into
mainfrom
entropy-console-migration

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Replaces symfony/console with the lightweight entropy/entropy console framework, mirroring the approach in ecsphp/ecs-src#27.

What changed

  • All commands (process, worker, list-rules, validate, custom-rule, setup-ci, composer-based) now implement Entropy\Console\Contract\CommandInterface instead of extending Symfony\Component\Console\Command\Command. CLI options are the run() method parameters.
  • SymfonyStyle is replaced by an entropy-backed RectorStyle (over OutputPrinter, OutputColorizer, ProgressBar, ConsoleTable).
  • bin/rector.php boots Entropy\Console\ConsoleApplication and normalizes argv (decoration flags stripped, short options expanded, default process command injected).
  • The parallel worker CLI is rebuilt from the Configuration value object rather than from a Symfony InputDefinition, so CommandFromReflectionFactory is gone.
  • Bootstrap argv parsing (RectorConfigsResolver, AutoloadFileParameterResolver, AdditionalAutoloader) no longer depends on ArgvInput.
  • symfony/console moved from require to replace.

Notes

  • Shipmonk dead-code previously kept every DI-instantiated constructor alive only as a side effect of a reflection invoke() in the deleted CommandFromReflectionFactory. With that gone, constructors of container-instantiated services are reported dead because shipmonk cannot see reflection-based instantiation. Added a single shipmonk.deadMethod ignore for ::__construct, the same pattern used in ecs-src#27.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants