Skip to content

Commit 7dee61c

Browse files
committed
minor #32531 remove deprecated features (xabbuh)
This PR was merged into the 5.0-dev branch. Discussion ---------- remove deprecated features | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- f2b8329 remove deprecated features
2 parents 8a17e4a + f2b8329 commit 7dee61c

30 files changed

+17
-1423
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
133133
$validAssetDirs = [];
134134
/** @var BundleInterface $bundle */
135135
foreach ($kernel->getBundles() as $bundle) {
136-
if (!method_exists($bundle, 'getPublicDir')) {
137-
@trigger_error(sprintf('Not defining "getPublicDir()" method in the "%s" class is deprecated since Symfony 4.4 and will not be supported in 5.0.', \get_class($bundle)), E_USER_DEPRECATED);
138-
$publicDir = 'Resources/public';
139-
} else {
140-
$publicDir = ltrim($bundle->getPublicDir(), '\\/');
141-
}
142-
if (!is_dir($originDir = $bundle->getPath().\DIRECTORY_SEPARATOR.$publicDir)) {
136+
if (!is_dir($originDir = $bundle->getPath().\DIRECTORY_SEPARATOR.ltrim($bundle->getPublicDir(), '\\/'))) {
143137
continue;
144138
}
145139

src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected function doTearDown(): void
4040
protected static function createClient(array $options = [], array $server = [])
4141
{
4242
if (true === static::$booted) {
43-
@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);
43+
throw new \LogicException(sprintf('Booting the kernel before calling %s() is not supported, the kernel should only be booted once.', __METHOD__));
4444
}
4545

4646
$kernel = static::bootKernel($options);

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\DependencyInjection\ChildDefinition;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
1717
use Symfony\Component\DependencyInjection\Reference;
18+
use Symfony\Component\Security\Core\Exception\LogicException;
1819

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

4142
if (!empty($config['query_string'])) {
4243
if ('' === $config['search_dn'] || '' === $config['search_password']) {
43-
@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);
44+
throw new LogicException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.');
4445
}
4546
$definition->addMethodCall('setQueryString', [$config['query_string']]);
4647
}

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\DependencyInjection\ChildDefinition;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
1717
use Symfony\Component\DependencyInjection\Reference;
18+
use Symfony\Component\Security\Core\Exception\LogicException;
1819

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

4546
if (!empty($config['query_string'])) {
4647
if ('' === $config['search_dn'] || '' === $config['search_password']) {
47-
@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);
48+
throw new LogicException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.');
4849
}
4950
$definition->addMethodCall('setQueryString', [$config['query_string']]);
5051
}

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/JsonLoginLdapFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\DependencyInjection\ChildDefinition;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
1717
use Symfony\Component\DependencyInjection\Reference;
18+
use Symfony\Component\Security\Core\Exception\LogicException;
1819

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

4344
if (!empty($config['query_string'])) {
4445
if ('' === $config['search_dn'] || '' === $config['search_password']) {
45-
@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);
46+
throw new LogicException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.');
4647
}
4748
$definition->addMethodCall('setQueryString', [$config['query_string']]);
4849
}

src/Symfony/Bundle/WebServerBundle/CHANGELOG.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php

Lines changed: 0 additions & 161 deletions
This file was deleted.

0 commit comments

Comments
 (0)