Skip to content

Commit a5c2e0f

Browse files
Merge branch '3.4'
* 3.4: [TwigBridge] fix BC for FormExtension if renderer is FormRenderer [Form] Fix 5.5 compatibility for ResizeFormListener [BrowserKit] Handle deprecations triggered in insulated requests [Bridge\PhpUnit] Handle deprecations triggered in separate processes Fix LogLevel::DEBUG as min level [Validator] added magic method __isset() to File Constraint class Support array of types in allowed type [DI] Fix possible incorrect php-code when dumped strings contains newlines [Translation] minor: remove unused variable in test added ability to handle parent classes for PropertyNormalizer replace parameters in dummy identity translator never match invalid IP addresses
2 parents 14ab39a + f8d7bce commit a5c2e0f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Client.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,23 @@ public function request($method, $uri, array $parameters = array(), array $files
346346
*/
347347
protected function doRequestInProcess($request)
348348
{
349+
$deprecationsFile = tempnam(sys_get_temp_dir(), 'deprec');
350+
putenv('SYMFONY_DEPRECATIONS_SERIALIZE='.$deprecationsFile);
349351
$process = new PhpProcess($this->getScript($request), null, null);
350352
$process->run();
351353

354+
if (file_exists($deprecationsFile)) {
355+
$deprecations = file_get_contents($deprecationsFile);
356+
unlink($deprecationsFile);
357+
foreach ($deprecations ? unserialize($deprecations) : array() as $deprecation) {
358+
if ($deprecation[0]) {
359+
trigger_error($deprecation[1], E_USER_DEPRECATED);
360+
} else {
361+
@trigger_error($deprecation[1], E_USER_DEPRECATED);
362+
}
363+
}
364+
}
365+
352366
if (!$process->isSuccessful() || !preg_match('/^O\:\d+\:/', $process->getOutput())) {
353367
throw new \RuntimeException(sprintf('OUTPUT: %s ERROR OUTPUT: %s', $process->getOutput(), $process->getErrorOutput()));
354368
}

0 commit comments

Comments
 (0)