Skip to content

[MakeRegistration] add support for verify email attributes #1062

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
Feb 15, 2022

Conversation

jrushlow
Copy link
Collaborator

@jrushlow jrushlow commented Feb 7, 2022

  • fixes CI related MakeRegistrationFailures
  • Adds support for class level attributes, specifically UniqueEntity attributes on the User entity.
  • Adds support for VerifyEmail property attributes

Known Issues:
Adding a class level attribute that utilizes an aliased use statement, e.g. use CLASS as PREFIX type alias is not supported in this PR.

@jrushlow jrushlow force-pushed the fix/ci-make-registration branch 3 times, most recently from b70e8be to 88e248f Compare February 10, 2022 15:06
@jrushlow jrushlow changed the title WIP - fix isVerified attribute WIP - add support for verify email attributes Feb 10, 2022
@jrushlow jrushlow force-pushed the fix/ci-make-registration branch from 4c09f67 to a3740d7 Compare February 14, 2022 18:59
@jrushlow jrushlow linked an issue Feb 14, 2022 that may be closed by this pull request
@jrushlow jrushlow marked this pull request as ready for review February 14, 2022 22:13
@jrushlow jrushlow changed the title WIP - add support for verify email attributes [MakeRegistration] add support for verify email attributes Feb 14, 2022
@jrushlow
Copy link
Collaborator Author

Tests are needed for CSM

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

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

This generally looks good to me 👍

The ClassSourceManipulator is a mess when it comes to attributes vs annotations, but that's a known issue that we need to fix... at some point.

@@ -358,6 +367,17 @@ public function addProperty(string $name, array $annotationLines = [], $defaultV
$this->addNodeAfterProperties($newPropertyNode);
}

public function addAttributeToClass(string $attributeClass, array $options): void
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adding a class level attribute that requires an aliased use statement, e.g. use Doctrine\Mapping as ORM is not possible in this scope without refactoring the ClassSourceManipulator::addUseStatementIfNecessary() method. A task which is not required by our current use case and should be handled in a separate PR.

@jrushlow jrushlow force-pushed the fix/ci-make-registration branch from b23f382 to bb92ef7 Compare February 15, 2022 15:53
@weaverryan
Copy link
Member

Thanks Jesse!

@weaverryan weaverryan merged commit 4023799 into symfony:main Feb 15, 2022
@jrushlow jrushlow deleted the fix/ci-make-registration branch February 15, 2022 16:38
@jrushlow jrushlow mentioned this pull request Feb 15, 2022
weaverryan added a commit that referenced this pull request Feb 16, 2022
This PR was merged into the 1.0-dev branch.

Discussion
----------

[release] prep v1.37.0

# RELEASE

Hi Makers!

This release handles several bug fixes within MakerBundle and adds support for translating ResetPasswordBundle Exception messages, using constants instead of strings with `make:voter`, improved types for `Collection` getter methods in Entities, and support for attributes in `make:registration`!

Diff: v1.36.4...v1.37.0

Happy making!

---

# CHANGELOG

## [v1.37.0](https://github.com/symfony/maker-bundle/releases/tag/v1.37.0)

*February 15th, 2022*

### Feature

- [#1062](#1062) - [MakeRegistration] add support for verify email attributes - *`@jrushlow`*
- [#1059](#1059) - [make:reset-password] Translate exception reasons provided by ResetPasswordBundle - *`@bocharsky`-bw*
- [#1057](#1057) - [Voter] Refactor attributes - *`@mdoutreluingne`*
- [#1040](#1040) - [make:entity] Chaing getter PHPDoc return type on Collection - *`@mehdibo`*

### Bug Fix

- [#1060](#1060) - Add missing Passport use statement - *`@bocharsky`-bw*
- [#1032](#1032) - [reset-password] Coding standards - Twig - *`@seb`-jean*
- [#1031](#1031) - [verify-email] Coding standards - Twig - *`@seb`-jean*
- [#1027](#1027) - Fixing wrong messaging in make:auth about checking password in final steps - *`@weaverryan`*
- [#985](#985) - [make:auth] fix security controller attributes - *`@jrushlow`*

Commits
-------

52063a9 [release] prep v1.37.0
saylor-mik87786 added a commit to saylor-mik87786/maker-bundle that referenced this pull request Jun 3, 2025
This PR was merged into the 1.0-dev branch.

Discussion
----------

[release] prep v1.37.0

# RELEASE

Hi Makers!

This release handles several bug fixes within MakerBundle and adds support for translating ResetPasswordBundle Exception messages, using constants instead of strings with `make:voter`, improved types for `Collection` getter methods in Entities, and support for attributes in `make:registration`!

Diff: symfony/maker-bundle@v1.36.4...v1.37.0

Happy making!

---

# CHANGELOG

## [v1.37.0](https://github.com/symfony/maker-bundle/releases/tag/v1.37.0)

*February 15th, 2022*

### Feature

- [#1062](symfony/maker-bundle#1062) - [MakeRegistration] add support for verify email attributes - *`@jrushlow`*
- [#1059](symfony/maker-bundle#1059) - [make:reset-password] Translate exception reasons provided by ResetPasswordBundle - *`@bocharsky`-bw*
- [#1057](symfony/maker-bundle#1057) - [Voter] Refactor attributes - *`@mdoutreluingne`*
- [#1040](symfony/maker-bundle#1040) - [make:entity] Chaing getter PHPDoc return type on Collection - *`@mehdibo`*

### Bug Fix

- [#1060](symfony/maker-bundle#1060) - Add missing Passport use statement - *`@bocharsky`-bw*
- [#1032](symfony/maker-bundle#1032) - [reset-password] Coding standards - Twig - *`@seb`-jean*
- [#1031](symfony/maker-bundle#1031) - [verify-email] Coding standards - Twig - *`@seb`-jean*
- [#1027](symfony/maker-bundle#1027) - Fixing wrong messaging in make:auth about checking password in final steps - *`@weaverryan`*
- [#985](symfony/maker-bundle#985) - [make:auth] fix security controller attributes - *`@jrushlow`*

Commits
-------

52063a93 [release] prep v1.37.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make:registration-form: support UniqueEntity attribute
2 participants