Merge branch '2.8' into 3.2

* 2.8:
  Fixes #22264 - add support for Chrome headless, see also Seldaek/monolog#966
  bumped Symfony version to 2.8.20
  updated VERSION for 2.8.19
  updated CHANGELOG for 2.8.19
  Dont call sprintf() when no placeholders are used
This commit is contained in:
Fabien Potencier 2017-04-05 06:44:24 -07:00
commit f53e81dd6a
4 changed files with 6 additions and 6 deletions

View File

@ -41,7 +41,7 @@ class ChromePhpHandler extends BaseChromePhpHandler
return;
}
if (!preg_match('{\b(?:Chrome/\d+(?:\.\d+)*|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}', $event->getRequest()->headers->get('User-Agent'))) {
if (!preg_match('{\b(?:Chrome/\d+(?:\.\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}', $event->getRequest()->headers->get('User-Agent'))) {
$this->sendHeaders = false;
$this->headers = array();

View File

@ -173,11 +173,11 @@ EOF
}
if (!$this->getApplication()->getKernel()->isDebug()) {
throw new \LogicException(sprintf('Debug information about the container is only available in debug mode.'));
throw new \LogicException('Debug information about the container is only available in debug mode.');
}
if (!is_file($cachedFile = $this->getContainer()->getParameter('debug.container.dump'))) {
throw new \LogicException(sprintf('Debug information about the container could not be found. Please clear the cache and try again.'));
throw new \LogicException('Debug information about the container could not be found. Please clear the cache and try again.');
}
$container = new ContainerBuilder();

View File

@ -269,7 +269,7 @@ class Definition
public function addMethodCall($method, array $arguments = array())
{
if (empty($method)) {
throw new InvalidArgumentException(sprintf('Method name cannot be empty.'));
throw new InvalidArgumentException('Method name cannot be empty.');
}
$this->calls[] = array($method, $arguments);

View File

@ -93,7 +93,7 @@ class YamlDumper extends Dumper
}
if ($definition->isSynthetic()) {
$code .= sprintf(" synthetic: true\n");
$code .= " synthetic: true\n";
}
if ($definition->isDeprecated()) {
@ -113,7 +113,7 @@ class YamlDumper extends Dumper
}
if ($definition->isLazy()) {
$code .= sprintf(" lazy: true\n");
$code .= " lazy: true\n";
}
if ($definition->getArguments()) {