Skip to content

Conversation

@pierredup
Copy link
Member

The password reset feature currently doesn't work. Here we use the symfonycasts/reset-password-bundle package to add a better and proper password reset flow.

@pierredup pierredup added this to the 2.3.6 milestone May 19, 2025
@pierredup pierredup requested a review from Copilot May 19, 2025 14:35
@pierredup pierredup self-assigned this May 19, 2025
@pierredup pierredup added the bug label May 19, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the password reset process by integrating the symfonycasts/reset-password-bundle, refactoring related routes, controllers, entities, and configurations. Key changes include removing legacy confirmation token logic from the User entity and repository, introducing a dedicated ResetPasswordRequest entity and repository, and updating controllers and forms to support the new flow.

Reviewed Changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
translations/messages.en.yml Removed outdated password reset notes.
Resources/config/routing.php Removed the legacy Send route and added a default token parameter for reset route.
Repository/UserRepository.php Removed confirmation token clearing logic redundant with the new reset password flow.
Repository/ResetPasswordRequestRepository.php Added repository implementation for handling reset password requests.
Form/Type/ResetPasswordRequestFormType.php & ChangePasswordFormType.php Introduced new form types for reset password request and change password actions.
Entity/User.php & ResetPasswordRequest.php Removed legacy confirmation token properties and added new entity for reset password requests.
Email/ResetPasswordEmail.php Updated email subject and context to support reset token messaging.
Action/ForgotPassword/* Refactored controllers for password reset, request, and check email flows; removed legacy Send action.
DataFixtures/ORM/LoadData.php Updated fixtures to remove legacy password request data.
Migrations/Version20306.php Created a migration to drop obsolete columns and create the new reset_password_request table.
Config files (security.php, reset_password.php, bundles.php, composer.json) Updated configuration to support the new reset password bundle and its routing/security requirements.

@codecov
Copy link

codecov bot commented May 19, 2025

Bundle Report

Changes will decrease total bundle size by 407.05kB (-5.1%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
solidinvoice-webpack-bundle-array-push 7.57MB -407.05kB (-5.1%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: solidinvoice-webpack-bundle-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
app.*.css -555 bytes 1.36MB -0.04%
email.*.css -152.22kB 504.16kB -23.19%
pdf.*.css -152.22kB 445.21kB -25.48%
648.*.js (New) 376.53kB 376.53kB 100.0% 🚀
145.*.css (New) 297.58kB 297.58kB 100.0% 🚀
runtime.*.js -1 bytes 3.21kB -0.03%
core.*.js 53 bytes 3.1kB 1.74%
core.*.css 311 bytes 1.33kB 30.43% ⚠️
355.*.js (Deleted) -446.4kB 0 bytes -100.0% 🗑️
847.*.css (Deleted) -330.13kB 0 bytes -100.0% 🗑️

@codecov
Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 85.33333% with 22 lines in your changes missing coverage. Please review.

Project coverage is 49.47%. Comparing base (4f7829b) to head (80034fb).
Report is 6 commits behind head on 2.3.x.

Files with missing lines Patch % Lines
src/UserBundle/Action/ForgotPassword/Reset.php 73.33% 8 Missing ⚠️
...ndle/Repository/ResetPasswordRequestRepository.php 74.19% 8 Missing ⚠️
src/UserBundle/Action/ForgotPassword/Request.php 86.95% 3 Missing ⚠️
src/UserBundle/Entity/ResetPasswordRequest.php 71.42% 2 Missing ⚠️
src/UserBundle/Action/ForgotPassword/Check.php 87.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              2.3.x    #1720      +/-   ##
============================================
+ Coverage     48.74%   49.47%   +0.72%     
- Complexity     2683     2694      +11     
============================================
  Files           491      494       +3     
  Lines          9648     9751     +103     
============================================
+ Hits           4703     4824     +121     
+ Misses         4945     4927      -18     
Flag Coverage Δ
unittests 49.47% <85.33%> (+0.72%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pierredup pierredup merged commit 1168ba5 into 2.3.x May 19, 2025
27 of 28 checks passed
@pierredup pierredup deleted the password-reset branch May 19, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants