Commit d7e6148
committed
bug symfony#59367 [PropertyInfo] Make sure that SerializerExtractor returns null for invalid class metadata (wuchen90)
This PR was merged into the 6.4 branch.
Discussion
----------
[PropertyInfo] Make sure that SerializerExtractor returns null for invalid class metadata
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License | MIT
When we try to call `getProperties` with a classname that doesn't exist, the classMetadataFactory will break.
In this case, this method should return `null` in order to fallback to other instances of `PropertyListExtractorInterface` in case we're accessing this `getProperties` method with `\Symfony\Component\PropertyInfo\PropertyInfoExtractor`.
Commits
-------
7bc832e fix(property-info): make sure that SerializerExtractor returns null for invalid class metadataFile tree
2 files changed
+6
-1
lines changed- src/Symfony/Component/PropertyInfo
- Extractor
- Tests/Extractor
2 files changed
+6
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
58 | 63 | | |
0 commit comments