Component type is not tracked when hyphen notation is used
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the four component-access examples in the issue and trace how component types are tracked for bracket and hyphen notation. Resolve whether hyphen notation should infer HeadControl like the other forms or be explicitly unsupported; done when the chosen behavior is consistently reported.
Written by the indexing model from the issue text.
Description
Sub-components accessed via hyphen notation are treated as mixed
$this['document']['head'];
$this['document-head'];
$this->getComponent('document')->getComponent('head');
$this->getComponent('document-head');
Current result
1 Dumped type: HeadControl
2 Dumped type: mixed~null
3 Dumped type: HeadControl
4 Dumped type: mixed~null
Expected result:
All should return HeadControl. Or report that this syntax is not supported.
Which variant would you prefer?
- Dominant language
- PHP
- Stars
- 118
- Forks
- 44
- Avg merge
- 17d 5h
- Merged PRs (30d)
- 1
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-nette
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
phpstan/phpstan-nette#213 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
phpstan/phpstan-nette#141 · 6 comments ·
-
Dependency Dashboard Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
phpstan/phpstan-nette#94 ·
-
Form events errors Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
phpstan/phpstan-nette#82 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
phpstan/phpstan-nette#77 · 4 comments ·
All issues in phpstan/phpstan-nette
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 ·