Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[TypeInfo] add TypeFactoryTrait::arrayKey()#60087
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Good idea! 🙂
@@ -5,7 +5,7 @@ CHANGELOG | |||
--- | |||
* Add `Type::accepts()` method | |||
* Add `TypeFactoryTrait::fromValue()` method | |||
* Addthe`TypeFactoryTrait::fromValue()`, `TypeFactoryTrait::arrayShape()`, and `TypeFactoryTrait::arrayKey()` methods |
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.
Maybe we can merge theaccepts
method as well?
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.
accepts()
was documented forType
as it's not in the trait. Does that really make sense to merge them or isn't it more readable this way?
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.
These methods are most likely to be accessed via theType
class. But we can keep them separate in the changelog.
Thank you@xabbuh. |
4ca9c2d
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
reading the latest PRs about array shapes I wondered if it wouldn't be useful to have a dedicated method for the array key types supported by PHP