Skip to content

[FrameworkBundle] remove deprecated code paths #31899

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

Merged
merged 1 commit into from
Jun 6, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ CHANGELOG
* Removed `ResolveControllerNameSubscriber`
* Removed support for `bundle:controller:action` to reference controllers. Use `serviceOrFqcn::method` instead
* Removed support for PHP templating, use Twig instead
* Removed `Controller`, use `AbstractController` instead
* Removed `Client`, use `KernelBrowser` instead
* Removed `ContainerAwareCommand`, use dependency injection instead
* Removed the `validation.strict_email` option, use `validation.email_validation_mode` instead
* Removed the `cache.app.simple` service and its corresponding PSR-16 autowiring alias
* Removed cache-related compiler passes and `RequestDataCollector`
* Removed the `translator.selector` and `session.save_listener` services

4.4.0
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Doctrine\Common\Annotations\AnnotationException;
use Doctrine\Common\Annotations\CachedReader;
use Doctrine\Common\Annotations\Reader;
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\DoctrineProvider;

Expand All @@ -31,17 +30,10 @@ class AnnotationsCacheWarmer extends AbstractPhpFileCacheWarmer
private $debug;

/**
* @param string $phpArrayFile The PHP file where annotations are cached
* @param string $excludeRegexp
* @param bool $debug
* @param string $phpArrayFile The PHP file where annotations are cached
*/
public function __construct(Reader $annotationReader, string $phpArrayFile, $excludeRegexp = null, $debug = false)
public function __construct(Reader $annotationReader, string $phpArrayFile, string $excludeRegexp = null, bool $debug = false)
{
if ($excludeRegexp instanceof CacheItemPoolInterface) {
@trigger_error(sprintf('The CacheItemPoolInterface $fallbackPool argument of "%s()" is deprecated since Symfony 4.2, you should not pass it anymore.', __METHOD__), E_USER_DEPRECATED);
$excludeRegexp = $debug;
$debug = 4 < \func_num_args() && \func_get_arg(4);
}
parent::__construct($phpArrayFile);
$this->annotationReader = $annotationReader;
$this->excludeRegexp = $excludeRegexp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;

use Doctrine\Common\Annotations\AnnotationException;
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory;
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
Expand All @@ -36,9 +35,6 @@ class SerializerCacheWarmer extends AbstractPhpFileCacheWarmer
*/
public function __construct(array $loaders, string $phpArrayFile)
{
if (2 < \func_num_args() && \func_get_arg(2) instanceof CacheItemPoolInterface) {
@trigger_error(sprintf('The CacheItemPoolInterface $fallbackPool argument of "%s()" is deprecated since Symfony 4.2, you should not pass it anymore.', __METHOD__), E_USER_DEPRECATED);
}
parent::__construct($phpArrayFile);
$this->loaders = $loaders;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;

use Doctrine\Common\Annotations\AnnotationException;
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
use Symfony\Component\Validator\Mapping\Cache\Psr6Cache;
Expand All @@ -22,7 +21,6 @@
use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader;
use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader;
use Symfony\Component\Validator\ValidatorBuilder;
use Symfony\Component\Validator\ValidatorBuilderInterface;

/**
* Warms up XML and YAML validator metadata.
Expand All @@ -34,17 +32,10 @@ class ValidatorCacheWarmer extends AbstractPhpFileCacheWarmer
private $validatorBuilder;

/**
* @param ValidatorBuilder $validatorBuilder
* @param string $phpArrayFile The PHP file where metadata are cached
* @param string $phpArrayFile The PHP file where metadata are cached
*/
public function __construct($validatorBuilder, string $phpArrayFile)
public function __construct(ValidatorBuilder $validatorBuilder, string $phpArrayFile)
{
if (!$validatorBuilder instanceof ValidatorBuilder && !$validatorBuilder instanceof ValidatorBuilderInterface) {
throw new \TypeError(sprintf('Argument 1 passed to %s() must be an instance of %s, %s given.', __METHOD__, ValidatorBuilder::class, \is_object($validatorBuilder) ? \get_class($validatorBuilder) : \gettype($validatorBuilder)));
}
if (2 < \func_num_args() && \func_get_arg(2) instanceof CacheItemPoolInterface) {
@trigger_error(sprintf('The CacheItemPoolInterface $fallbackPool argument of "%s()" is deprecated since Symfony 4.2, you should not pass it anymore.', __METHOD__), E_USER_DEPRECATED);
}
parent::__construct($phpArrayFile);
$this->validatorBuilder = $validatorBuilder;
}
Expand Down
206 changes: 0 additions & 206 deletions src/Symfony/Bundle/FrameworkBundle/Client.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,10 @@ class AssetsInstallCommand extends Command
private $filesystem;
private $projectDir;

public function __construct(Filesystem $filesystem, string $projectDir = null)
public function __construct(Filesystem $filesystem, string $projectDir)
{
parent::__construct();

if (null === $projectDir) {
@trigger_error(sprintf('Not passing the project directory to the constructor of %s is deprecated since Symfony 4.3 and will not be supported in 5.0.', __CLASS__), E_USER_DEPRECATED);
}

$this->filesystem = $filesystem;
$this->projectDir = $projectDir;
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ protected function configure()
$this
->setDefinition([
new InputArgument('name', InputArgument::OPTIONAL, 'A service name (foo)'),
new InputOption('show-private', null, InputOption::VALUE_NONE, 'Used to show public *and* private services (deprecated)'),
new InputOption('show-arguments', null, InputOption::VALUE_NONE, 'Used to show arguments in services'),
new InputOption('show-hidden', null, InputOption::VALUE_NONE, 'Used to show hidden (internal) services'),
new InputOption('tag', null, InputOption::VALUE_REQUIRED, 'Shows all services with a specific tag'),
Expand Down Expand Up @@ -116,10 +115,6 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
if ($input->getOption('show-private')) {
@trigger_error('The "--show-private" option no longer has any effect and is deprecated since Symfony 4.1.', E_USER_DEPRECATED);
}

$io = new SymfonyStyle($input, $output);
$errorIo = $io->getErrorStyle();

Expand Down
Loading