Skip to content

Commit f0aff8c

Browse files
minor #33541 [DI] cascade preloading only to public parameters/properties (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [DI] cascade preloading only to public parameters/properties | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - This removes `ContaierBuilder`, `RouteCollectionBuilder`, etc. coming from `App\Kernel` Commits ------- 0e3ea8f [DI] cascade preloading only to public parameters/properties
2 parents 3536b13 + 0e3ea8f commit f0aff8c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/DependencyInjection/Dumper/Preloader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ private static function doPreload(string $class, array &$preloaded)
6767
$r->getDefaultProperties();
6868

6969
if (\PHP_VERSION_ID >= 70400) {
70-
foreach ($r->getProperties() as $p) {
70+
foreach ($r->getProperties(\ReflectionProperty::IS_PUBLIC) as $p) {
7171
if (($t = $p->getType()) && !$t->isBuiltin()) {
7272
self::doPreload($t->getName(), $preloaded);
7373
}
7474
}
7575
}
7676

77-
foreach ($r->getMethods() as $m) {
77+
foreach ($r->getMethods(\ReflectionMethod::IS_PUBLIC) as $m) {
7878
foreach ($m->getParameters() as $p) {
7979
if ($p->isDefaultValueAvailable() && $p->isDefaultValueConstant()) {
8080
$c = $p->getDefaultValueConstantName();

src/Symfony/Component/DependencyInjection/ExpressionLanguage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
1616

1717
if (!class_exists(BaseExpressionLanguage::class)) {
18-
throw new \ReflectionException(BaseExpressionLanguage::class.' not found.');
18+
return;
1919
}
2020

2121
/**

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy