Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #32466 [Config] Fix for signatures of typed properties (tvandervorm)
This PR was submitted for the 4.3 branch but it was squashed and merged into the 3.4 branch instead (closes #32466). Discussion ---------- [Config] Fix for signatures of typed properties | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32465 | License | MIT | Doc PR | - Also see the issue description, when using public typed properties ([new in PHP7.4](https://wiki.php.net/rfc/typed_properties_v2)) like this: ``` namespace App; class Foo { public int $bar; } ``` will cause `$defaults['bar']` not to be set in Symfony/Component/Config/Resource/ReflectionClassResource.php::139. This is because `$bar` doesn't have a default value, but does have a type hint, meaning it's default value is not `null` but undefined. This causes an 'undefined index' error when clearing the cache through `bin/console cache:clear` when running PHP7.4. The default value is used here for the class signature, having `null` should be appropriate for all cases. Commits ------- bad2a2c [Config] Fix for signatures of typed properties
- Loading branch information