From dee17ff429c904941b444c6e7358e5d0db855c30 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 1 Jun 2017 10:56:34 -0700 Subject: [PATCH] Using FQ name for PHP_VERSION_ID --- Exception/ParseException.php | 2 +- Tests/ParseExceptionTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Exception/ParseException.php b/Exception/ParseException.php index 74548df1..ef36cfba 100644 --- a/Exception/ParseException.php +++ b/Exception/ParseException.php @@ -123,7 +123,7 @@ private function updateRepr() } if (null !== $this->parsedFile) { - if (PHP_VERSION_ID >= 50400) { + if (\PHP_VERSION_ID >= 50400) { $jsonOptions = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; } else { $jsonOptions = 0; diff --git a/Tests/ParseExceptionTest.php b/Tests/ParseExceptionTest.php index 4f01ab93..b7797fb7 100644 --- a/Tests/ParseExceptionTest.php +++ b/Tests/ParseExceptionTest.php @@ -19,7 +19,7 @@ class ParseExceptionTest extends TestCase public function testGetMessage() { $exception = new ParseException('Error message', 42, 'foo: bar', '/var/www/app/config.yml'); - if (PHP_VERSION_ID >= 50400) { + if (\PHP_VERSION_ID >= 50400) { $message = 'Error message in "/var/www/app/config.yml" at line 42 (near "foo: bar")'; } else { $message = 'Error message in "\\/var\\/www\\/app\\/config.yml" at line 42 (near "foo: bar")'; @@ -31,7 +31,7 @@ public function testGetMessage() public function testGetMessageWithUnicodeInFilename() { $exception = new ParseException('Error message', 42, 'foo: bar', 'äöü.yml'); - if (PHP_VERSION_ID >= 50400) { + if (\PHP_VERSION_ID >= 50400) { $message = 'Error message in "äöü.yml" at line 42 (near "foo: bar")'; } else { $message = 'Error message in "\u00e4\u00f6\u00fc.yml" at line 42 (near "foo: bar")';