Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Uid] Added toHexString method to AbstractUid class#45945

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:6.2fromaurimasniekis:6.1
Jul 20, 2022

Conversation

@aurimasniekis
Copy link
Contributor

QA
Branch?6.1
Bug fix?no
New feature?yes
Deprecations?no
Fix#42966
LicenseMIT

Added a small method to Uid componentAbstractUid class calledtoHex which would output binary value of identifier as prefixed hex string for e.g.0x0000000. This is really useful when using with Doctrine for Id generation as the storage of Uid is a binary format in the database, and in most cases, it is usually used with hex format to query it.

This PR is from#45939 as I needed to change the source branch to 6.1

@aurimasniekis
Copy link
ContributorAuthor

aurimasniekis commentedApr 5, 2022
edited
Loading

Can't fix theCoding standard from fabbot.io becauseassertSame has to have those spaces (was really annoying to fix with.editorconfig)

If the branch is 6.1 will this be integrated into 6.0/5.4 versions or only 6.1?

@OskarStark
Copy link
Contributor

If the branch is 6.1 will this be integrated into 6.0/5.4 versions or only 6.1?

Only in 6.1

@fancyweb
Copy link
Contributor

Should we just add it in the inspect commands? IMHO, adding it toAbstractUid makes it a newUid component supported format, so we would have to support it everywhere (from methods and format inUidNormalizer at least).

We could also add it to theSymfonyCaster class from theVarDumper component.

@aurimasniekis
Copy link
ContributorAuthor

I can addfromHex method too, as it depends on binary methods so I don't see why it can cause any issues. My goal for this PR was to add a method for getting hex string values as it's heavily used in our several applications, and having to make wrappers/methods to get value that can be used directly in the database without using converter functions is really nice, because the normalbase32 version is only used basically for the input data into the application and nowhere outside.

I can implement those methods in this PR just provide of additional places it ned to be supported.

@fancyweb
Copy link
Contributor

I recommend waiting for@nicolas-grekas opinion before putting in any extra work.

@nicolas-grekas
Copy link
Member

I don't see the need forfromHex, so I'd prefer not adding it. I agree with@fancyweb about the commands.

@aurimasniekis
Copy link
ContributorAuthor

Any progress on this?

@fabpotfabpot modified the milestones:6.1,6.2May 20, 2022
@fabpot
Copy link
Member

Thank you@aurimasniekis.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@fabpotfabpotfabpot approved these changes

@fancywebfancywebAwaiting requested review from fancyweb

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

6 participants

@aurimasniekis@OskarStark@fancyweb@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp