Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Security] Added type-hints to user providers #32353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Jul 3, 2019

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #32179
License MIT
Doc PR N/A

This PR adds type declarations to user provider classes.

@@ -44,7 +44,7 @@ public function __construct(ManagerRegistry $registry, string $classOrAlias, str
/**
* {@inheritdoc}
*/
public function loadUserByUsername($username)
public function loadUserByUsername(string $username)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 These changes to doctrine-bridge 5 break compatibility with security-core 4.4, thus the bump in composer.json. Can be reverted and re-applied later, if you don't want to bump yet.

@@ -140,11 +137,8 @@ protected function loadUser($username, Entry $entry)

/**
* Fetches a required unique attribute value from an LDAP entry.
*
* @param Entry|null $entry
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This @param annotation was obviously lying to us. 🤔

@fabpot
Copy link
Member

fabpot commented Jul 4, 2019

Thank you @derrabus.

@fabpot fabpot merged commit 62abb70 into symfony:master Jul 4, 2019
fabpot added a commit that referenced this pull request Jul 4, 2019
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Security] Added type-hints to user providers

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

This PR adds type declarations to user provider classes.

Commits
-------

62abb70 [Security] Added type-hints to user providers.
@derrabus derrabus deleted the improvement/type-hints-on-user-provider branch July 4, 2019 08:52
@nicolas-grekas nicolas-grekas added this to the 5.0 milestone Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.