80e5a7fbd8
This PR was merged into the 5.2-dev branch.
Discussion
----------
[PropertyInfo] fix array types with keys (array<string, string>)
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | n/a
Array types with keys are currently not detected correctly from the PropertyInfo component:
```
@var array<string, string>
@var array<string, array<integer, string>>
```
Those are currently identified as object with class `rray<string, string>`.
This PR tries to fix it.
What I noticed while fixing this, is that union types in arrays are not supported in general at the moment, because the `Type` class supports only one collectionValueType and I do not see how to pass a Union Type there. But I guess that's a different issue and for those types I decided to return null as collection value type for now. (Or better throw on exception?)
Commits
-------
|
||
---|---|---|
.. | ||
DependencyInjection | ||
Extractor | ||
Tests | ||
Util | ||
.gitattributes | ||
.gitignore | ||
CHANGELOG.md | ||
composer.json | ||
LICENSE | ||
phpunit.xml.dist | ||
PropertyAccessExtractorInterface.php | ||
PropertyDescriptionExtractorInterface.php | ||
PropertyInfoCacheExtractor.php | ||
PropertyInfoExtractor.php | ||
PropertyInfoExtractorInterface.php | ||
PropertyInitializableExtractorInterface.php | ||
PropertyListExtractorInterface.php | ||
PropertyReadInfo.php | ||
PropertyReadInfoExtractorInterface.php | ||
PropertyTypeExtractorInterface.php | ||
PropertyWriteInfo.php | ||
PropertyWriteInfoExtractorInterface.php | ||
README.md | ||
Type.php |
PropertyInfo Component
PropertyInfo extracts information about PHP class' properties using metadata of popular sources.