Add `EnumTypeCaster` to hydrator configuration
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 17
- Forks
- 7
- Avg merge
- 58m
- Merged PRs (30d)
- 1
Description
It seems to me that this order will be good:
FormHydrator::class => [
'__construct()' => [
'hydrator' => DynamicReference::to([
'class' => Hydrator::class,
'__construct()' => [
'typeCaster' => new CompositeTypeCaster(
new NullTypeCaster(emptyString: true),
new PhpNativeTypeCaster(),
new NonArrayTypeCaster(),
new \Yiisoft\Hydrator\TypeCaster\EnumTypeCaster(),
new HydratorTypeCaster(),
),
],
]),
],
],
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the FormHydrator configuration and the Hydrator construction described in the issue. Compare the type-caster order with the proposed EnumTypeCaster entry, then verify that enum-valued form fields are handled by the configured hydrator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100