Skip to content

Remove symfony/console, migrate console layer to entropy/entropy#27

Merged
TomasVotruba merged 2 commits into
mainfrom
tv-console
Jun 19, 2026
Merged

Remove symfony/console, migrate console layer to entropy/entropy#27
TomasVotruba merged 2 commits into
mainfrom
tv-console

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

ECS no longer depends on symfony/console. The console layer runs on entropy/entropy: commands implement Entropy's CommandInterface (run() params are the CLI contract), and a new EasyCodingStandardStyle wraps entropy's OutputPrinter/ProgressBar.

  • commands (Check/Worker/ListCheckers) implement entropy CommandInterface; delete AbstractCheckCommand and the Symfony console application
  • replace SymfonyStyle with EasyCodingStandardStyle over entropy output; delete SymfonyStyleFactory
  • ConfigurationFactory builds Configuration from plain args instead of InputInterface; container resolves config from raw argv
  • ParallelFileProcessor passes plain option values to the decoupled WorkerCommandLineFactory (symplify/easy-parallel dev-main)
  • bin/ecs.php parses argv manually (xdebug, --version via Composer InstalledVersions, decoration-flag stripping, -c to --config)
  • drop dead Option CLI-name constants
  • composer: drop symfony/console from require, satisfy php-cs-fixer's constraint via replace; require easy-parallel dev-main

ECS no longer depends on symfony/console. The console layer runs on
entropy/entropy: commands implement Entropy's CommandInterface (run()
params are the CLI contract), and a new EasyCodingStandardStyle wraps
entropy's OutputPrinter/ProgressBar.

- commands (Check/Worker/ListCheckers) implement entropy CommandInterface;
  delete AbstractCheckCommand and the Symfony console application
- replace SymfonyStyle with EasyCodingStandardStyle over entropy output;
  delete SymfonyStyleFactory
- ConfigurationFactory builds Configuration from plain args instead of
  InputInterface; container resolves config from raw argv
- ParallelFileProcessor passes plain option values to the decoupled
  WorkerCommandLineFactory (symplify/easy-parallel dev-main)
- bin/ecs.php parses argv manually (xdebug, --version via Composer
  InstalledVersions, decoration-flag stripping, -c to --config)
- drop dead Option CLI-name constants
- composer: drop symfony/console from require, satisfy php-cs-fixer's
  constraint via replace; require easy-parallel dev-main
- CommandRegistrationTest: commands are discovered and wired into
  Entropy's CommandRegistry (check/worker/list-checkers registered,
  check is default, worker is hidden)
- EasyCodingStandardStyleTest: Symfony console tags are translated into
  Entropy's OutputColorizer vocabulary (comment/info/options/closing)
@TomasVotruba TomasVotruba merged commit 54eb0bc into main Jun 19, 2026
7 checks passed
@TomasVotruba TomasVotruba deleted the tv-console branch June 19, 2026 23:01
@felabrecque

Copy link
Copy Markdown

I used the cli option '--config' to pass a custom config file. How is it handled after this migration ?

I now get this error message:

Run failed: Unknown option: "--config="

@felabrecque

Copy link
Copy Markdown

I think I found it:

-c

Is that correct ?

@TomasVotruba

TomasVotruba commented Jul 11, 2026

Copy link
Copy Markdown
Member Author

Should be still --config. I'll look into it

@TomasVotruba

Copy link
Copy Markdown
Member Author

Fixed in #46

@edwinrocketcode

Copy link
Copy Markdown

Before we could add paths to check like so: ... --fix check -- <directory_1> <directory_2> but this doesn't work anymore, I think since this version we get the following error: Run failed: Unknown option: "--". Is this a bug or should we replace it with the (new?) --paths option?

@TomasVotruba

Copy link
Copy Markdown
Member Author

The -- is for nesting to other scripts. Not valid syntax from ECS itself. Just remove it.

If it doesn't help, share full vendon/bin/ecs command to reproduce the bug.

@edwinrocketcode

Copy link
Copy Markdown

Alright, thanks. I'm sorry if i've missed it in the docs, but how should we add multiple paths to the ECS check? vendor/bin/ecs --config=ecs.php --fix check --paths=app,config doesn't seem to work(Run failed: Source "app,config" does not exist.) and --paths=app --paths=config only checks the first path passed, not the second one.

@TomasVotruba

Copy link
Copy Markdown
Member Author

To use multiple paths, pass them as args:

vendor/bin/ecs src tests

Best practise is to use ecs.php config and ->withPaths() option, as there will be reported non-existing paths.
I'll update README to make it more clear how to use CLI args.

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.

3 participants