Skip to content

Commit

Permalink
Merge pull request #3358 from acrobat/cleanup-deprecations
Browse files Browse the repository at this point in the history
[Allbundles] Cleanup remaining deprecated code
  • Loading branch information
acrobat authored Mar 24, 2024
2 parents 0ebe338 + a489e3d commit b33414b
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 254 deletions.

This file was deleted.

2 changes: 0 additions & 2 deletions src/Kunstmaan/AdminBundle/KunstmaanAdminBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Kunstmaan\AdminBundle\DependencyInjection\Compiler\DataCollectorPass;
use Kunstmaan\AdminBundle\DependencyInjection\Compiler\EnablePermissionsPass;
use Kunstmaan\AdminBundle\DependencyInjection\Compiler\MenuCompilerPass;
use Kunstmaan\AdminBundle\DependencyInjection\Compiler\ReplaceSymfonyEnvironmentConfiguratorCompilerPass;
use Kunstmaan\AdminBundle\DependencyInjection\KunstmaanAdminExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
Expand All @@ -26,7 +25,6 @@ public function build(ContainerBuilder $container)
$container->addCompilerPass(new AddLogProcessorsCompilerPass());
$container->addCompilerPass(new DataCollectorPass());
$container->addCompilerPass(new EnablePermissionsPass());
$container->addCompilerPass(new ReplaceSymfonyEnvironmentConfiguratorCompilerPass());

$container->registerExtension(new KunstmaanAdminExtension());
}
Expand Down

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions src/Kunstmaan/CookieBundle/Controller/LegalController.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,4 @@ public function toggleAllCookiesAction(Request $request)

return $response;
}

/**
* @deprecated since 6.3. Replaced by \Kunstmaan\CookieBundle\ViewDataProvider\LegalPageViewDataProvider.
*/
public function legalPageAction(Request $request)
{
if (!$this->cookieHelper->isGrantedForCookieBundle($request)) {
throw $this->createNotFoundException();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ class GenerateDefaultSiteCommand extends KunstmaanGenerateCommand
*/
private $demosite;

/**
* @var bool
*/
private $groundcontrol;

/** @var DoctrineHelper */
private $doctrineHelper;

Expand Down Expand Up @@ -65,7 +60,6 @@ protected function configure()
->addOption('namespace', '', InputOption::VALUE_OPTIONAL, 'The namespace to generate the default website in')
->addOption('prefix', '', InputOption::VALUE_OPTIONAL, 'The prefix to be used in the table names of the generated entities')
->addOption('demosite', '', InputOption::VALUE_NONE, 'Whether to generate a website with demo contents or a basic website')
->addOption('groundcontrol', '', InputOption::VALUE_NONE, 'Whether to use Webpack Encore or Groundcontrol as FE build tools')
->addOption('browsersync', '', InputOption::VALUE_OPTIONAL, 'The URI that will be used for browsersync to connect')
->addOption('articleoverviewpageparent', '', InputOption::VALUE_OPTIONAL, 'Shortnames of the pages that can have the article overview page as a child (comma separated)')
->setName('kuma:generate:default-site');
Expand Down Expand Up @@ -99,18 +93,12 @@ protected function doExecute()

$browserSyncUrl = $this->assistant->getOptionOrDefault('browsersync', null);

/*
* If we need to generate Groundcontrol or Webpack Encore
*/
$this->groundcontrol = $this->assistant->getOption('groundcontrol');

// First we generate the layout if it is not yet generated
$command = $this->getApplication()->find('kuma:generate:layout');
$arguments = [
'command' => 'kuma:generate:layout',
'--namespace' => str_replace('\\', '/', $this->bundle->getNamespace()),
'--demosite' => $this->demosite,
'--groundcontrol' => $this->groundcontrol,
'--browsersync' => $browserSyncUrl,
'--subcommand' => true,
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ protected function configure()
->addOption('namespace', '', InputOption::VALUE_OPTIONAL, 'The namespace of the bundle where we need to create the layout in')
->addOption('subcommand', '', InputOption::VALUE_OPTIONAL, 'Whether the command is called from an other command or not')
->addOption('demosite', '', InputOption::VALUE_NONE, 'Pass this parameter when the demosite styles/javascipt should be generated')
->addOption('groundcontrol', '', InputOption::VALUE_NONE, 'Pass this parameter to use Groundcontrol in favor of Webpack Encore')
->addOption('browsersync', '', InputOption::VALUE_OPTIONAL, 'The URI that will be used for browsersync to connect')
->setName('kuma:generate:layout');
}
Expand All @@ -59,7 +58,7 @@ protected function doExecute()
}

$rootDir = $this->getApplication()->getKernel()->getProjectDir() . '/';
$this->createGenerator()->generate($this->bundle, $rootDir, $this->assistant->getOption('demosite'), $this->browserSyncUrl, $this->assistant->getOption('groundcontrol'));
$this->createGenerator()->generate($this->bundle, $rootDir, $this->assistant->getOption('demosite'), $this->browserSyncUrl);

if (!$this->isSubCommand()) {
$this->assistant->writeSection('Layout successfully created', 'bg=green;fg=black');
Expand All @@ -80,10 +79,6 @@ protected function doInteract()
$bundleNamespace = $this->assistant->getOptionOrDefault('namespace', null);
$this->bundle = $this->askForBundleName('layout', $bundleNamespace);
$this->browserSyncUrl = $this->assistant->getOptionOrDefault('browsersync', null);

if (null === $this->browserSyncUrl && $this->assistant->getOption('groundcontrol', null)) {
$this->browserSyncUrl = $this->assistant->ask('Which URL would you like to configure for browserSync?', 'https://myproject.dev');
}
}

/**
Expand Down
10 changes: 0 additions & 10 deletions src/Kunstmaan/GeneratorBundle/Command/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ protected function configure()
[
new InputOption('db-installed', '', InputOption::VALUE_NONE, 'Acknowledge that you have setup your database"'),
new InputOption('demosite', '', InputOption::VALUE_REQUIRED, 'Do you want to create a "demosite"'),
new InputOption('groundcontrol', '', InputOption::VALUE_REQUIRED, 'Do you want to use Groundcontrol instead of Webpack Encore'),
new InputOption('create-tests', '', InputOption::VALUE_REQUIRED, 'Do you want to create tests for you pages/pageparts'),
new InputOption('namespace', '', InputOption::VALUE_OPTIONAL, 'The namespace of the bundle to create (only for SF3)'),
new InputOption('dir', '', InputOption::VALUE_OPTIONAL, 'The directory where to create the bundle (only for SF3)'),
Expand Down Expand Up @@ -98,11 +97,6 @@ protected function interact(InputInterface $input, OutputInterface $output)
$input->setOption('demosite', $demoSiteOption === true ? 'Yes' : 'No');
}

if (null === $input->getOption('groundcontrol')) {
$groundcontrolOption = $this->assistant->askConfirmation('Do you want to use Groundcontrol instead of Webpack Encore? (y/n)', 'n', '?', false);
$input->setOption('groundcontrol', $groundcontrolOption === true ? 'Yes' : 'No');
}

if (null === $input->getOption('create-tests')) {
$createTests = $this->assistant->askConfirmation('Do you want to create tests for you pages/pageparts? (y/n)', 'n', '?', false);
$input->setOption('create-tests', $createTests === true ? 'Yes' : 'No');
Expand All @@ -129,10 +123,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$defaultSiteOptions['--demosite'] = true;
}

if ($input->getOption('groundcontrol') === 'Yes') {
$defaultSiteOptions['--groundcontrol'] = true;
}

$this->executeCommand($output, 'kuma:generate:config');

$this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ class DefaultSiteGenerator extends KunstmaanGenerator
*/
private $demosite;

/**
* @var bool
*/
private $groundControl;
/** @var DoctrineHelper */
private $doctrineHelper;

Expand All @@ -56,13 +52,12 @@ public function __construct(Filesystem $filesystem, ManagerRegistry $registry, $
* @param string $rootDir
* @param bool $demosite
*/
public function generate(BundleInterface $bundle, $prefix, $rootDir, $demosite = false, $groundControl = false)
public function generate(BundleInterface $bundle, $prefix, $rootDir, $demosite = false)
{
$this->bundle = $bundle;
$this->prefix = GeneratorUtils::cleanPrefix($prefix);
$this->rootDir = $rootDir;
$this->demosite = $demosite;
$this->groundControl = $groundControl;

$parameters = [
'namespace' => $this->bundle->getNamespace(),
Expand All @@ -71,7 +66,6 @@ public function generate(BundleInterface $bundle, $prefix, $rootDir, $demosite =
'prefix' => $this->prefix,
'demosite' => $this->demosite,
'multilanguage' => $this->isMultiLangEnvironment(),
'groundcontrol' => $this->groundControl,
'canUseAttributes' => Kernel::VERSION_ID >= 50200,
'canUseEntityAttributes' => $this->doctrineHelper->doesClassUsesAttributes('App\\Entity\\Unkown' . uniqid()),
];
Expand Down
Loading

0 comments on commit b33414b

Please sign in to comment.