Skip to content

Commit

Permalink
feature #22296 Bump monolog to 1.19 and use the agent regex const fro…
Browse files Browse the repository at this point in the history
…m parent (redthor)

This PR was merged into the 3.3-dev branch.

Discussion
----------

Bump monolog to 1.19 and use the agent regex const from parent

See #22264

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | refer to #22264
| License       | MIT
| Doc PR        |

Bump monolog and use const from parent. See #22264 (comment)

I went for `static` instead of `self` in case anyone wanted to easily override just the agent string.

Commits
-------

69f9586 Bump monolog to 1.19 and use the agent regex const from parent, see #22264
  • Loading branch information
fabpot committed Apr 5, 2017
2 parents 3aeac5a + 69f9586 commit b65ebc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php
Expand Up @@ -41,7 +41,7 @@ public function onKernelResponse(FilterResponseEvent $event)
return;
}

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'))) {
if (!preg_match(static::USER_AGENT_REGEX, $event->getRequest()->headers->get('User-Agent'))) {
$this->sendHeaders = false;
$this->headers = array();

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Monolog/composer.json
Expand Up @@ -17,7 +17,7 @@
],
"require": {
"php": ">=5.5.9",
"monolog/monolog": "~1.11",
"monolog/monolog": "~1.19",
"symfony/http-kernel": "~2.8|~3.0"
},
"require-dev": {
Expand Down

0 comments on commit b65ebc7

Please sign in to comment.