Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2e4de58

Browse filesBrowse files
bug #54054 [VarExporter] Bugfix/workaround jit issue (verfriemelt-dot-org)
This PR was merged into the 6.4 branch. Discussion ---------- [VarExporter] Bugfix/workaround jit issue | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fixes/Workaround for #54053 | License | MIT I managed to fix the erratically behavior with this patch, but i have no idea how one would test this. It seems tracing jit has some issues with the ternary operator. Let me know what you think, i have no idea how to work with that properly :) Commits ------- b9a9d35 bugfix php jit issue with ternary operator
2 parents 8ec8741 + b9a9d35 commit 2e4de58
Copy full SHA for 2e4de58

File tree

1 file changed

+11
-2
lines changed
Filter options

1 file changed

+11
-2
lines changed

‎src/Symfony/Component/VarExporter/Internal/Hydrator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarExporter/Internal/Hydrator.php
+11-2Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,19 @@ public static function getPropertyScopes($class)
271271
$name = $property->name;
272272

273273
if (\ReflectionProperty::IS_PRIVATE & $flags) {
274-
$propertyScopes["\0$class\0$name"] = $propertyScopes[$name] = [$class, $name, $flags & \ReflectionProperty::IS_READONLY ? $class : null, $property];
274+
$readonlyScope = null;
275+
if ($flags & \ReflectionProperty::IS_READONLY) {
276+
$readonlyScope = $class;
277+
}
278+
$propertyScopes["\0$class\0$name"] = $propertyScopes[$name] = [$class, $name, $readonlyScope, $property];
279+
275280
continue;
276281
}
277-
$propertyScopes[$name] = [$class, $name, $flags & \ReflectionProperty::IS_READONLY ? $property->class : null, $property];
282+
$readonlyScope = null;
283+
if ($flags & \ReflectionProperty::IS_READONLY) {
284+
$readonlyScope = $property->class;
285+
}
286+
$propertyScopes[$name] = [$class, $name, $readonlyScope, $property];
278287

279288
if (\ReflectionProperty::IS_PROTECTED & $flags) {
280289
$propertyScopes["\0*\0$name"] = $propertyScopes[$name];

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.