Skip to content

Commit

Permalink
minor #36105 [FrameworkBundle] Fix deprecation message for booting a …
Browse files Browse the repository at this point in the history
…kernel twice (jschaedl)

This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Fix deprecation message for booting a kernel twice

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | - <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch master.
-->

Commits
-------

a0a6243 Fix deprecation messages
  • Loading branch information
fabpot committed Mar 18, 2020
2 parents e457b24 + a0a6243 commit efb4a7f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php
Expand Up @@ -42,7 +42,7 @@ private function doTearDown()
protected static function createClient(array $options = [], array $server = [])
{
if (static::$booted) {
@trigger_error(sprintf('Calling "%s()" while a kernel has been booted is deprecated since Symfony 4.4 and will throw in 5.0, ensure the kernel is shut down before calling the method.', __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('Calling "%s()" while a kernel has been booted is deprecated since Symfony 4.4 and will throw an exception in 5.0, ensure the kernel is shut down before calling the method.', __METHOD__), E_USER_DEPRECATED);
}

$kernel = static::bootKernel($options);
Expand Down
Expand Up @@ -40,7 +40,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);
@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 an exception in Symfony 5.0.', E_USER_DEPRECATED);
}
$definition->addMethodCall('setQueryString', [$config['query_string']]);
}
Expand Down
Expand Up @@ -44,7 +44,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);
@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 an exception in Symfony 5.0.', E_USER_DEPRECATED);
}
$definition->addMethodCall('setQueryString', [$config['query_string']]);
}
Expand Down
Expand Up @@ -42,7 +42,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);
@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 an exception in Symfony 5.0.', E_USER_DEPRECATED);
}
$definition->addMethodCall('setQueryString', [$config['query_string']]);
}
Expand Down
Expand Up @@ -89,7 +89,7 @@ protected function checkAuthentication(UserInterface $user, UsernamePasswordToke
if ('' !== $this->searchDn && '' !== $this->searchPassword) {
$this->ldap->bind($this->searchDn, $this->searchPassword);
} else {
@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);
@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 an exception in Symfony 5.0.', E_USER_DEPRECATED);
}
$query = str_replace('{username}', $username, $this->queryString);
$result = $this->ldap->query($this->dnString, $query)->execute();
Expand Down

0 comments on commit efb4a7f

Please sign in to comment.