Fix deprecation messages
This commit is contained in:
parent
46e441ff8d
commit
a0a6243a21
@ -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