8000 bug #36899 [VarDumper] ReflectionFunction::isDisabled() is deprecated… · symfony/symfony@fb91dc2 · GitHub
[go: up one dir, main page]

Skip to content

Commit fb91dc2

Browse files
bug #36899 [VarDumper] ReflectionFunction::isDisabled() is deprecated (derrabus)
This PR was merged into the 3.4 branch. Discussion ---------- [VarDumper] ReflectionFunction::isDisabled() is deprecated | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | #36872 | License | MIT | Doc PR | N/A See php/php-src#5473. Calling `ReflectionFunction::isDisabled()` is pointless on php 8 and doing so triggers a deprecation warning. Someone who is more familiar with that component might want to have a second look on this PR. I'm not really sure if this is the right way to fix the issue. Commits ------- 1da347e [VarDumper] ReflectionFunction::isDisabled() is deprecated.
2 parents 42692d6 + 1da347e commit fb91dc2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@ private static function addExtra(&$a, \Reflector $c)
333333
private static function addMap(&$a, \Reflector $c, $map, $prefix = Caster::PREFIX_VIRTUAL)
334334
{
335335
foreach ($map as $k => $m) {
336+
if (\PHP_VERSION_ID >= 80000 && 'isDisabled' === $k) {
337+
continue;
338+
}
339+
336340
if (method_exists($c, $m) && false !== ($m = $c->$m()) && null !== $m) {
337341
$a[$prefix.$k] = $m instanceof \Reflector ? $m->name : $m;
338342
}

0 commit comments

Comments
 (0)
0