minor #32942 [Ldap] Fix LdapUserProvider signatures (chalasr)

This PR was merged into the 5.0-dev branch.

Discussion
----------

[Ldap] Fix LdapUserProvider signatures

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

920a52ddda [Ldap] Fix signature compat
This commit is contained in:
Robin Chalas 2019-08-05 14:01:25 +02:00
commit fc6d6c9054
2 changed files with 5 additions and 4 deletions

View File

@ -63,7 +63,7 @@ class LdapUserProvider implements UserProviderInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function loadUserByUsername($username) public function loadUserByUsername(string $username)
{ {
try { try {
$this->ldap->bind($this->searchDn, $this->searchPassword); $this->ldap->bind($this->searchDn, $this->searchPassword);
@ -112,7 +112,7 @@ class LdapUserProvider implements UserProviderInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function supportsClass($class) public function supportsClass(string $class)
{ {
return LdapUser::class === $class; return LdapUser::class === $class;
} }

View File

@ -21,10 +21,11 @@
"ext-ldap": "*" "ext-ldap": "*"
}, },
"require-dev": { "require-dev": {
"symfony/security-core": "^4.4" "symfony/security-core": "^5.0"
}, },
"conflict": { "conflict": {
"symfony/options-resolver": "<4.4" "symfony/options-resolver": "<4.4",
"symfony/security-core": "<5"
}, },
"autoload": { "autoload": {
"psr-4": { "Symfony\\Component\\Ldap\\": "" }, "psr-4": { "Symfony\\Component\\Ldap\\": "" },