-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DoctrineBridge] Add NAME
const for UID types
#46642
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
Conversation
This allows to refer to the constant instead of an "arbitrary" string. For example: #[ORM\Column(type: UuidType::NAME)] private $foo; Doctrine already does it this way in its documentation. The name of the constant is taken from the already existing `Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\DoctrineFooType` class, where a constant with a similar purpose already exists (albeit this one is `private`).
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:
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! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
Hey! I think @AndreasA has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
@marcelsiegert Not really sure why I got mentioned, The last thing I did was adjust the unique entity validator. It is part of the doctrine bridge but it wasn't really related to UUID or ULID types. But I can take a look though, bu I cannot approve it anyway. |
@AndreasA Looks like it's because you updated the DoctrineBridge CHANGELOG at some point 🤦♂️ Carsonbot should probably skip |
@chalasr Ah. Yes, it would probably make sense to skip those. |
You should be able to approve the PR. It's probably not looking green like project member approvals but it still matters to us, especially if the bot requested your review as it should mean you have some knowledge in this area (otherwise you can just excuse Carson for the noise and ignore them) |
@chalasr ah. yes I just see it now. It was at a different position than I expected, I seldom had to approve PRs on GitHub, mostly gitlab. as I already reviewed it, it is fine. But as you mentioned I was actually only mentioned due the changelog entry 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
except for the comments. though maybe a Symfony member can check those if they are indeed relevant as they are not that important to the functionality.
Thank you @marcelsiegert. |
This PR was merged into the 6.2 branch. Discussion ---------- Add `NAME` const for UID types Documentation update for symfony/symfony#46642. Commits ------- 5cc7135 [DoctrineBridge] Add `NAME` const for UID types
This allows to refer to the constant instead of an "arbitrary" string. For example:
Doctrine already does it this way in its documentation.
The name of the constant is taken from the already existing
Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\DoctrineFooType
class, where a constant with a similar purpose already exists (albeit this one isprivate
). Another possibility would beUlidType::ULID
andUuidType::UUID
as shown in Doctrine's Custom Mapping Types documentation.