8000 [VarDumper] Add Caster::PATTERN_PRIVATE to help builing key by lyrixx · Pull Request #49852 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[VarDumper] Add Caster::PATTERN_PRIVATE to help builing key #49852

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
Mar 29, 2023

Conversation

lyrixx
Copy link
Member
@lyrixx lyrixx commented Mar 28, 2023
Q A
Branch? 6.3
Bug fix? no
New feature? yes
Deprecations? no
Tickets
License MIT
Doc PR not needed I guess

@welcoMattic
Copy link
Member

Thank you @lyrixx.

@welcoMattic welcoMattic merged commit 36bb70a into symfony:6.3 Mar 29, 2023
@lyrixx lyrixx deleted the var-dump-cloner branch March 29, 2023 08:08
@stof
Copy link
Member
stof commented Mar 29, 2023

should it be a constant containing a sprintf pattern or a static method taking the class name ?

With the sprintf pattern, I fear devs will do mistakes by trying to use the constant only, as other constants.

@lyrixx
Copy link
Member Author
lyrixx commented Mar 30, 2023

I prefer the static method too. But I asked to @nicolas-grekas on slack and he told me to do that.

Anyway I'm up to add a method!

@nicolas-grekas
Copy link
Member
nicolas-grekas commented Mar 30, 2023

I'm not in favor of adding a method for this. My preference is that ppl know the pattern and use strings directly. I'm fine with adding a constants if that helps. But a method is the beginning of an API, and I don't think we should add an API for concatenating these strings.

@stof
Copy link
Member
stof commented Mar 30, 2023

To me, this constant does not help because it does not remove the need to know the pattern to understand how to use it.

@nicolas-grekas
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0