Check types of repository method parameter values
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start by reproducing repository count with a BcMath\Number value for a Types::NUMBER field, then trace the parameter-type checking path in the Doctrine extension. Compare the current diagnostic with Doctrine DBAL's accepted types and verify that the relevant repository-method checks handle the value consistently.
Written by the indexing model from the issue text.
Description
I keep opening the can of worms with BcMath\Number.
Now ran into a problem without any advance warning where one can't do $repository->count(['field' => 0]) on a BcMath\Number / Types::NUMBER field because:
Could not convert PHP value 0 to type Doctrine\DBAL\Types\NumberType. Expected one of the following types: null, BcMath\Number
Unless it's relaxed on Doctrine side, it would be great if those types were checked also.
Related issue: https://github.com/doctrine/dbal/issues/7383
- Dominant language
- PHP
- Stars
- 678
- Forks
- 122
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
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 phpstan/phpstan-doctrine
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
phpstan/phpstan-doctrine#785 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
phpstan/phpstan-doctrine#792 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
phpstan/phpstan-doctrine#788 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
phpstan/phpstan-doctrine#748 ·
All issues in phpstan/phpstan-doctrine
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 74/100
Automattic/static-site-importer#1767 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100