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 c112bf1

Browse filesBrowse files
committed
bug #45258 [DependencyInjection] Don't dump polyfilled classes in preload script (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [DependencyInjection] Don't dump polyfilled classes in preload script | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #44866 | License | MIT | Doc PR | - Commits ------- c11d664 [DependencyInjection] Don't dump polyfilled classes in preload script
2 parents 5c67f40 + c11d664 commit c112bf1
Copy full SHA for c112bf1

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public function dump(array $options = [])
316316
if (!$class || str_contains($class, '$')) {
317317
continue;
318318
}
319-
if (!(class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false)) || (new \ReflectionClass($class))->isUserDefined()) {
319+
if (!(class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false)) || ((new \ReflectionClass($class))->isUserDefined() && !\in_array($class, ['Attribute', 'JsonException', 'ReturnTypeWillChange', 'Stringable', 'UnhandledMatchError', 'ValueError'], true))) {
320320
$code[$options['class'].'.preload.php'] .= sprintf("\$classes[] = '%s';\n", $class);
321321
}
322322
}

0 commit comments

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