Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the registerCommands() methods #1126

Merged
merged 1 commit into from
Dec 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 0 additions & 9 deletions core-bundle/src/ContaoCoreBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
use Contao\CoreBundle\Fragment\Reference\ContentElementReference;
use Contao\CoreBundle\Fragment\Reference\FrontendModuleReference;
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
Expand All @@ -50,14 +49,6 @@ public function getContainerExtension(): ContaoCoreExtension
return new ContaoCoreExtension();
}

/**
* {@inheritdoc}
*/
public function registerCommands(Application $application): void
{
// disable automatic command registration
}

/**
* {@inheritdoc}
*/
Expand Down
12 changes: 0 additions & 12 deletions core-bundle/tests/ContaoCoreBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,11 @@
use Contao\CoreBundle\DependencyInjection\Compiler\TranslationDataCollectorPass;
use Contao\CoreBundle\DependencyInjection\Security\ContaoLoginFactory;
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass;

class ContaoCoreBundleTest extends TestCase
{
public function testDoesNotRegisterAnyCommands(): void
{
$application = new Application();
$commands = $application->all();

$bundle = new ContaoCoreBundle();
$bundle->registerCommands($application);

$this->assertSame($commands, $application->all());
}

public function testAddsTheCompilerPaths(): void
{
$passes = [
Expand Down
9 changes: 0 additions & 9 deletions manager-bundle/src/ContaoManagerBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace Contao\ManagerBundle;

use Contao\ManagerBundle\DependencyInjection\Compiler\ContaoManagerPass;
use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -28,12 +27,4 @@ public function build(ContainerBuilder $container): void

$container->addCompilerPass(new ContaoManagerPass());
}

/**
* {@inheritdoc}
*/
public function registerCommands(Application $application): void
{
// disable automatic command registration
}
}