8000 bug #36896 [Config] Removed implicit cast of ReflectionProperty to st… · symfony/symfony@77a826c · GitHub
[go: up one dir, main page]

Skip to content

Commit 77a826c

Browse files
committed
bug #36896 [Config] Removed implicit cast of ReflectionProperty to string (derrabus)
This PR was merged into the 3.4 branch. Discussion ---------- [Config] Removed implicit cast of ReflectionProperty to string | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | #36872 | License | MIT | Doc PR | N/A PHP 8 does not allow casting `ReflectionProperty` instances to string anymore. Commits ------- 8adbade [Config] Removed implicit cast of ReflectionProperty to string.
2 parents b202696 + 8adbade commit 77a826c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/Config/Resource/ReflectionClassResource.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ private function generateSignature(\ReflectionClass $class)
139139
$defaults = $class->getDefaultProperties();
140140

141141
foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED) as $p) {
142-
yield $p->getDocComment().$p;
142+
yield $p->getDocComment();
143+
yield $p->isDefault() ? '<default>' : '';
144+
yield $p->isPublic() ? 'public' : 'protected';
145+
yield $p->isStatic() ? 'static' : '';
146+
yield '$'.$p->name;
143147
yield print_r(isset($defaults[$p->name]) && !\is_object($defaults[$p->name]) ? $defaults[$p->name] : null, true);
144148
}
145149
}

0 commit comments

Comments
 (0)
0