Got this Error Message at the symfony console:
[WARNING] Some commands could not be registered:
In App_KernelDevDebugContainer.php line 1837:
Class 'PHP_CodeSniffer\Fixer' not found
Exception trace:
at .../var/cache/dev/ContainerZyn425z/App_KernelDevDebugContainer.php:1837
ContainerZyn425z\App_KernelDevDebugContainer->getSniffFileProcessorService() at .../var/cache/dev/ContainerZyn425z/App_KernelDevDebugContainer.php:1450
ContainerZyn425z\App_KernelDevDebugContainer->getFileProcessorCollectorService() at .../var/cache/dev/ContainerZyn425z/App_KernelDevDebugContainer.php:1463
ContainerZyn425z\App_KernelDevDebugContainer->getSingleFileProcessorService() at .../var/cache/dev/ContainerZyn425z/App_KernelDevDebugContainer.php:1438
ContainerZyn425z\App_KernelDevDebugContainer->getEasyCodingStandardApplicationService() at .../var/cache/dev/ContainerZyn425z/App_KernelDevDebugContainer.php:1538
ContainerZyn425z\App_KernelDevDebugContainer->getCheckCommandService() at .../vendor/symfony/dependency-injection/Container.php:248
Symfony\Component\DependencyInjection\Container->make() at .../vendor/symfony/dependency-injection/Container.php:228
Symfony\Component\DependencyInjection\Container->get() at .../vendor/symfony/framework-bundle/Console/Application.php:191
Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at .../vendor/symfony/framework-bundle/Console/Application.php:74
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at .../vendor/symfony/console/Application.php:140
Symfony\Component\Console\Application->run() at ../bin/console:42
At the App_KernelDevDebugContainer:
/**
* Gets the public 'Symplify\EasyCodingStandard\SniffRunner\Application\SniffFileProcessor' shared autowired service.
*
* @return \Symplify\EasyCodingStandard\SniffRunner\Application\SniffFileProcessor
*/
protected function getSniffFileProcessorService()
{
include_once \dirname(__DIR__, 4).'/vendor/symplify/easy-coding-standard/src/Contract/Application/FileProcessorInterface.php';
include_once \dirname(__DIR__, 4).'/vendor/symplify/easy-coding-standard/packages/sniff-runner/src/Application/SniffFileProcessor.php';
include_once \dirname(__DIR__, 4).'/vendor/symplify/easy-coding-standard/packages/configuration/src/Configuration.php';
include_once \dirname(__DIR__, 4).'/vendor/friendsofphp/php-cs-fixer/src/Differ/DifferInterface.php';
include_once \dirname(__DIR__, 4).'/vendor/friendsofphp/php-cs-fixer/src/Differ/UnifiedDiffer.php';
include_once \dirname(__DIR__, 4).'/vendor/symplify/easy-coding-standard/src/Application/AppliedCheckersCollector.php';
return $this->services['Symplify\\EasyCodingStandard\\SniffRunner\\Application\\SniffFileProcessor'] = new \Symplify\EasyCodingStandard\SniffRunner\Application\SniffFileProcessor(($this->services['PHP_CodeSniffer\\Fixer'] ?? ($this->services['PHP_CodeSniffer\\Fixer'] = new \PHP_CodeSniffer\Fixer())), ($this->services['Symplify\\EasyCodingStandard\\SniffRunner\\File\\FileFactory'] ?? $this->getFileFactoryService()), ($this->services['Symplify\\EasyCodingStandard\\Configuration\\Configuration'] ?? ($this->services['Symplify\\EasyCodingStandard\\Configuration\\Configuration'] = new \Symplify\EasyCodingStandard\Configuration\Configuration([], []))), ($this->services['Symplify\\EasyCodingStandard\\Error\\ErrorAndDiffCollector'] ?? $this->getErrorAndDiffCollectorService()), ($this->services['PhpCsFixer\\Differ\\UnifiedDiffer'] ?? ($this->services['PhpCsFixer\\Differ\\UnifiedDiffer'] = new \PhpCsFixer\Differ\UnifiedDiffer())), ($this->services['Symplify\\EasyCodingStandard\\Application\\AppliedCheckersCollector'] ?? ($this->services['Symplify\\EasyCodingStandard\\Application\\AppliedCheckersCollector'] = new \Symplify\EasyCodingStandard\Application\AppliedCheckersCollector())));
}
What ECS version do you use? Try latest 7.3.*
Removing vendor and composer.lock might also help
I have v7.3.18 installed and also reinstall the complete setup, still persist.
Check bundles.php and try removing ECS/CS Bundles.
Works, thank you.
Great!
FYI, It's a symfony/flex conflict, that automatically registers ECS services to your app. It will be fixed automatically in Symplify 8.
Yes, recognized that with the Composer/CaBundle. 馃槃
Thank you very much, for the fast reply and help.