Skip to content

Commit

Permalink
remove deprecated features
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jul 13, 2019
1 parent 08c80eb commit 1f54316
Show file tree
Hide file tree
Showing 28 changed files with 11 additions and 1,421 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,11 @@
use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface;
use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\Lock\Factory;
use Symfony\Component\Lock\Lock;
use Symfony\Component\Lock\LockInterface;
use Symfony\Component\Lock\PersistStoreInterface;
use Symfony\Component\Lock\Store\FlockStore;
use Symfony\Component\Lock\Store\StoreFactory;
use Symfony\Component\Lock\StoreInterface;
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Symfony\Component\Messenger\MessageBus;
Expand Down Expand Up @@ -1441,7 +1439,7 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont
$container->setDefinition($connectionDefinitionId, $connectionDefinition);
}

$storeDefinition = new Definition(StoreInterface::class);
$storeDefinition = new Definition(PersistStoreInterface::class);
$storeDefinition->setPublic(false);
$storeDefinition->setFactory([StoreFactory::class, 'createStore']);
$storeDefinition->setArguments([new Reference($connectionDefinitionId)]);
Expand Down Expand Up @@ -1483,14 +1481,10 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont
$container->setAlias('lock.store', new Alias('lock.'.$resourceName.'.store', false));
$container->setAlias('lock.factory', new Alias('lock.'.$resourceName.'.factory', false));
$container->setAlias('lock', new Alias('lock.'.$resourceName, false));
$container->setAlias(StoreInterface::class, new Alias('lock.store', false));
$container->setAlias(PersistStoreInterface::class, new Alias('lock.store', false));
$container->setAlias(Factory::class, new Alias('lock.factory', false));
$container->setAlias(LockInterface::class, new Alias('lock', false));
} else {
$container->registerAliasForArgument('lock.'.$resourceName.'.store', StoreInterface::class, $resourceName.'.lock.store');
$container->registerAliasForArgument('lock.'.$resourceName.'.store', PersistStoreInterface::class, $resourceName.'.lock.store');
$container->registerAliasForArgument('lock.'.$resourceName.'.factory', Factory::class, $resourceName.'.lock.factory');
$container->registerAliasForArgument('lock.'.$resourceName, LockInterface::class, $resourceName.'.lock');
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected function doTearDown(): void
protected static function createClient(array $options = [], array $server = [])
{
if (true === static::$booted) {
@trigger_error(sprintf('Booting the kernel before calling %s::%s is deprecated and will throw in Symfony 5.0, the kernel should only be booted once.', __CLASS__, __METHOD__), E_USER_DEPRECATED);
throw new \LogicException(sprintf('Booting the kernel before calling %s() is not supported, the kernel should only be booted once.', __METHOD__));
}

$kernel = static::bootKernel($options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\Security\Core\Exception\LogicException;

/**
* FormLoginLdapFactory creates services for form login ldap authentication.
Expand All @@ -40,7 +41,7 @@ protected function createAuthProvider(ContainerBuilder $container, $id, $config,

if (!empty($config['query_string'])) {
if ('' === $config['search_dn'] || '' === $config['search_password']) {
@trigger_error('Using the "query_string" config without using a "search_dn" and a "search_password" is deprecated since Symfony 4.4 and will throw in Symfony 5.0.', E_USER_DEPRECATED);
throw new LogicException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.');
}
$definition->addMethodCall('setQueryString', [$config['query_string']]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\Security\Core\Exception\LogicException;

/**
* HttpBasicFactory creates services for HTTP basic authentication.
Expand Down Expand Up @@ -44,7 +45,7 @@ public function create(ContainerBuilder $container, $id, $config, $userProvider,

if (!empty($config['query_string'])) {
if ('' === $config['search_dn'] || '' === $config['search_password']) {
@trigger_error('Using the "query_string" config without using a "search_dn" and a "search_password" is deprecated since Symfony 4.4 and will throw in Symfony 5.0.', E_USER_DEPRECATED);
throw new LogicException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.');
}
$definition->addMethodCall('setQueryString', [$config['query_string']]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\Security\Core\Exception\LogicException;

/**
* JsonLoginLdapFactory creates services for json login ldap authentication.
Expand Down Expand Up @@ -42,7 +43,7 @@ protected function createAuthProvider(ContainerBuilder $container, $id, $config,

if (!empty($config['query_string'])) {
if ('' === $config['search_dn'] || '' === $config['search_password']) {
@trigger_error('Using the "query_string" config without using a "search_dn" and a "search_password" is deprecated since Symfony 4.4 and will throw in Symfony 5.0.', E_USER_DEPRECATED);
throw new LogicException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.');
}
$definition->addMethodCall('setQueryString', [$config['query_string']]);
}
Expand Down
17 changes: 0 additions & 17 deletions src/Symfony/Bundle/WebServerBundle/CHANGELOG.md

This file was deleted.

161 changes: 0 additions & 161 deletions src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php

This file was deleted.

0 comments on commit 1f54316

Please sign in to comment.