minor #36105 [FrameworkBundle] Fix deprecation message for booting a 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
-------
a0a6243a21
Fix deprecation messages
This commit is contained in:
commit
efb4a7f0bc
@ -42,7 +42,7 @@ abstract class WebTestCase extends KernelTestCase
|
|||||||
protected static function createClient(array $options = [], array $server = [])
|
protected static function createClient(array $options = [], array $server = [])
|
||||||
{
|
{
|
||||||
if (static::$booted) {
|
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);
|
$kernel = static::bootKernel($options);
|
||||||
|
@ -40,7 +40,7 @@ class FormLoginLdapFactory extends FormLoginFactory
|
|||||||
|
|
||||||
if (!empty($config['query_string'])) {
|
if (!empty($config['query_string'])) {
|
||||||
if ('' === $config['search_dn'] || '' === $config['search_password']) {
|
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']]);
|
$definition->addMethodCall('setQueryString', [$config['query_string']]);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ class HttpBasicLdapFactory extends HttpBasicFactory
|
|||||||
|
|
||||||
if (!empty($config['query_string'])) {
|
if (!empty($config['query_string'])) {
|
||||||
if ('' === $config['search_dn'] || '' === $config['search_password']) {
|
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']]);
|
$definition->addMethodCall('setQueryString', [$config['query_string']]);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ class JsonLoginLdapFactory extends JsonLoginFactory
|
|||||||
|
|
||||||
if (!empty($config['query_string'])) {
|
if (!empty($config['query_string'])) {
|
||||||
if ('' === $config['search_dn'] || '' === $config['search_password']) {
|
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']]);
|
$definition->addMethodCall('setQueryString', [$config['query_string']]);
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ class LdapBindAuthenticationProvider extends UserAuthenticationProvider
|
|||||||
if ('' !== $this->searchDn && '' !== $this->searchPassword) {
|
if ('' !== $this->searchDn && '' !== $this->searchPassword) {
|
||||||
$this->ldap->bind($this->searchDn, $this->searchPassword);
|
$this->ldap->bind($this->searchDn, $this->searchPassword);
|
||||||
} else {
|
} 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);
|
$query = str_replace('{username}', $username, $this->queryString);
|
||||||
$result = $this->ldap->query($this->dnString, $query)->execute();
|
$result = $this->ldap->query($this->dnString, $query)->execute();
|
||||||
|
Reference in New Issue
Block a user