Skip to content

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

Open
TomasVotruba wants to merge 3 commits into
mainfrom
entropy-console-migration
Open

TomasVotruba wants to merge 3 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.

@TomasVotruba
TomasVotruba force-pushed the entropy-console-migration branch 4 times, most recently from 5586dc9 to 18b9010 Compare October 29, 2026 09:54
@TomasVotruba
TomasVotruba force-pushed the entropy-console-migration branch from 18b9010 to 9df7384 Compare November 14, 2026 14:27
@TomasVotruba
TomasVotruba marked this pull request as ready for review November 14, 2026 14:55
@TomasVotruba
TomasVotruba force-pushed the entropy-console-migration branch from 6324e45 to e9b67d0 Compare November 20, 2026 22:28
@nikspyratos

Copy link
Copy Markdown

Why?

Without a justification, this reads like spam to promote your own packages.

@TomasVotruba

Copy link
Copy Markdown
Member Author

Symfony 7+ is not possible to downgrade to 7.4. The commands can only use attributes.

TomasVotruba added a commit that referenced this pull request Nov 23, 2026
Split out of #8787: WorkerCommandLineFactory forwards options from the resolved
Configuration (plus --config, --autoload-file and --xdebug from raw argv) instead of
mirroring the Symfony InputDefinition. CommandFromReflectionFactory is removed and
ApplicationFileProcessor/ParallelFileProcessor no longer take InputInterface.
@TomasVotruba
TomasVotruba force-pushed the entropy-console-migration branch 5 times, most recently from 3259283 to 903309c Compare November 23, 2026 22:34
Commands implement Entropy\Console\Contract\CommandInterface, CLI options are run() parameters.
SymfonyStyle is replaced by entropy-backed RectorStyle, bin/rector.php boots
Entropy\Console\ConsoleApplication, symfony/console dropped from require.
@TomasVotruba
TomasVotruba force-pushed the entropy-console-migration branch from 903309c to 75d0739 Compare November 23, 2026 22:38
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