8000 bug #13081 [FrameworkBundle] forward error reporting level to insulat… · symfony/symfony@e2762f6 · GitHub
[go: up one dir, main page]

Skip to content

Commit e2762f6

Browse files
committed
bug #13081 [FrameworkBundle] forward error reporting level to insulated Client (nicolas-grekas)
This PR was merged into the 2.3 branch. Discussion ---------- [FrameworkBundle] forward error reporting level to insulated Client | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Especially if deprecation notices are silenced on the main php instance, we should also silence them in the insulated Client Commits ------- d82e062 [FrameworkBundle] forward error reporting level to insulated Client
2 parents cbbd062 + d82e062 commit e2762f6

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Client.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,13 @@ protected function getScript($request)
160160
$profilerCode = '$kernel->getContainer()->get(\'profiler\')->enable();';
161161
}
162162

163+
$errorReporting = error_reporting();
164+
163165
$code = <<<EOF
164166
<?php
165167
168+
error_reporting($errorReporting);
169+
166170
if ('$autoloader') {
167171
require_once '$autoloader';
168172
}

src/Symfony/Component/HttpKernel/Client.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,13 @@ protected function getScript($request)
102102
$r = new \ReflectionClass('\\Symfony\\Component\\ClassLoader\\ClassLoader');
103103
$requirePath = str_replace("'", "\\'", $r->getFileName());
104104
$symfonyPath = str_replace("'", "\\'", realpath(__DIR__.'/../../..'));
105+
$errorReporting = error_reporting();
105106

106107
$code = <<<EOF
107108
<?php
108109
110+
error_reporting($errorReporting);
111+
109112
require_once '$requirePath';
110113
111114
\$loader = new Symfony\Component\ClassLoader\ClassLoader();

0 commit comments

Comments
 (0)
0