Stubs: internally modifyable properties are not @readonly
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
We have a couple of internal classes (e.g. mysqli) which implement properties basically as hooks (i.e. internally calling a function). Such properties should not be tagged as @readonly in the stubs, because their behavior is not what users expect (their value is not fixed), and it also can be very confusing regarding the behavior of ReflectionProperty::isReadOnly() et. al, see #15309.
While at least for me this is more of a documentation issue, since the classsynopses are generated from the stub files, some improvements would need to be done there at first.
PHP Version
PHP 8
Operating System
any
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
Inspect the PHP stub files for internal classes such as mysqli, then check the generated classsynopses that derive from them. Identify properties whose values are internally modified through hooks and remove inappropriate @readonly annotations; done means the generated documentation and ReflectionProperty::isReadOnly() behavior no longer describe them as fixed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100