Skip to content

[PasswordHasher] Prevent PHP fatal error when using auto algorithm #41572

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
merged 1 commit into from
Jun 7, 2021

Conversation

matason
Copy link
Contributor

@matason matason commented Jun 6, 2021

Q A
Branch? 5.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #41571
License MIT
Doc PR N/A

Fixes a PHP fatal error that occurs when using the auto algorithm of the PasswordHasher in a standalone project.

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 5.4 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@derrabus derrabus added this to the 5.3 milestone Jun 6, 2021
@derrabus
Copy link
Member

derrabus commented Jun 6, 2021

Can you please rebase your patch onto 5.3?

@matason matason changed the base branch from 5.4 to 5.3 June 6, 2021 19:35
@matason matason changed the title [PasswordHasher] Prevent PHP warning when using auto algorithm WIP:[PasswordHasher] Prevent PHP warning when using auto algorithm Jun 6, 2021
@matason matason force-pushed the password-hasher-prevent-warning branch from 7d8ab05 to eb35b21 Compare June 6, 2021 19:40
@matason matason changed the title WIP:[PasswordHasher] Prevent PHP warning when using auto algorithm [PasswordHasher] Prevent PHP warning when using auto algorithm Jun 6, 2021
@matason
Copy link
Contributor Author

matason commented Jun 6, 2021

Can you please rebase your patch onto 5.3?

Doh, of course, that's done now, sorry about that!

@derrabus
Copy link
Member

derrabus commented Jun 6, 2021

No worries. 🙂 And can you please apply the code style patch from fabbot?

@derrabus
Copy link
Member

derrabus commented Jun 6, 2021

Your change looks correct, but would you be able to add a small test case? I'd like to make sure we don't break your use-case again in the future.

@matason
Copy link
Contributor Author

matason commented Jun 6, 2021 via email

@matason matason force-pushed the password-hasher-prevent-warning branch from 19df534 to dca28a2 Compare June 7, 2021 07:13
@matason matason changed the title [PasswordHasher] Prevent PHP warning when using auto algorithm [PasswordHasher] Prevent PHP fatal error when using auto algorithm Jun 7, 2021
@chalasr
Copy link
Member

chalasr commented Jun 7, 2021

PasswordHasher in a standalone project

Nice!

Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

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

👍 Thanks for reporting and fixing this bug.

@derrabus
Copy link
Member

derrabus commented Jun 7, 2021

Good catch, thanks @matason.

@derrabus derrabus merged commit 91585e4 into symfony:5.3 Jun 7, 2021
@fabpot fabpot mentioned this pull request Jun 17, 2021
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.

[PasswordHasher] Generates a PHP fatal error when using auto algorithm
4 participants