symfony / symfony/maker-bundle
make:reset-password : Multiple entities
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.4k
- Forks
- 427
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 20
Description
Hi 😄,
It would be great if we could handle multiple entities with this Reset Password.
@jrushlow said :
[...] But off the top of my head, the
reset_password.yamlfile wouldn't change if you wanted to use multiple user entities. It just needs to know what repository to use for theResetPasswordRequestentity. Which there should only be 1 of those.What would change would be the
Entity\ResetPasswordRequest::userDoctrine Annotation.make:reset-passworddoes something like@ORM\ManyToOne(targetEntity="App\Entity\User")for that property.If you have multiple entities, you couldn't use a
ManyToOnerelation. Knee jerk thinking would be the request entity would need a new property(ies) to track which user "type" (entity) and the id of the user. Then in the request repository, you would use the new properties to fetch and setEntity\ResetPasswordRequest::userwith the correct user entity before returning theEntity\ResetPasswordRequest::classto the consumer.
View : https://github.com/SymfonyCasts/reset-password-bundle/issues/110#issuecomment-626244231
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the make:reset-password command and the reset_password.yaml configuration, then inspect the Entity\ResetPasswordRequest::user Doctrine annotation and the request repository mentioned in the issue. Determine how support for multiple user entities should be represented and how completion would be verified; the issue currently describes possible design directions without a settled implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- authentication, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100