Adding the possibility to use BackedEnumFilter on values 0, -1, -2 etc.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- php
- Domain
- api, backend-api-design
Research direction
No file or test is named in the issue. Start by locating BackedEnumFilter and its normalizeValue path, then reproduce filtering with backed enum values 0, -1, and -2. Done means those values are accepted without being discarded, with the behavior covered by the filter's existing tests.
Written by the indexing model from the issue text.
Description
Description
It is currently not possible to use the BackedEnumFilter on values below 1, currently i have a enum class starting at 0. I cannot use the BackedEnumFilter for this currently.
Example
$values = is_array($value) ? $value : [$value];
$normalizedValues = array_values(array_filter(
array_map(fn ($value) => $this->normalizeValue($value, $property), $values),
static fn ($value) => null !== $value,
));
- Dominant language
- PHP
- Stars
- 2.6k
- Forks
- 982
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 42
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.
More from api-platform/core
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
api-platform/core#8549 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
api-platform/core#8495 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
api-platform/core#8471 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
api-platform/core#8447 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
api-platform/core#8312 · 2 comments ·
All issues in api-platform/core
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·