Skip to content

Commit f91a020

Browse files
committed
Using FQ name for PHP_VERSION_ID
1 parent 36bd06a commit f91a020

File tree

65 files changed

+121
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+121
-121
lines changed

.github/build-packages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$mergeBase = trim(shell_exec(sprintf('git merge-base %s HEAD', array_shift($dirs))));
1212

1313
$packages = array();
14-
$flags = PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0;
14+
$flags = \PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0;
1515

1616
foreach ($dirs as $k => $dir) {
1717
if (!system("git diff --name-only $mergeBase -- $dir", $exitStatus)) {

phpunit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
77
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\nPlease run `composer update` before running this command.\n";
88
exit(1);
99
}
10-
if (PHP_VERSION_ID >= 70000 && !getenv('SYMFONY_PHPUNIT_VERSION')) {
10+
if (\PHP_VERSION_ID >= 70000 && !getenv('SYMFONY_PHPUNIT_VERSION')) {
1111
putenv('SYMFONY_PHPUNIT_VERSION=6.0');
1212
}
1313
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');

src/Symfony/Bridge/Twig/Extension/CodeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function formatFile($file, $line, $text = null)
174174
$text = "$text at line $line";
175175

176176
if (false !== $link = $this->getFileLink($file, $line)) {
177-
if (PHP_VERSION_ID >= 50400) {
177+
if (\PHP_VERSION_ID >= 50400) {
178178
$flags = ENT_QUOTES | ENT_SUBSTITUTE;
179179
} else {
180180
$flags = ENT_QUOTES;

src/Symfony/Bridge/Twig/Tests/Node/DumpNodeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ public function testOneVar()
8181
}
8282

8383
EOTXT;
84-
if (PHP_VERSION_ID >= 70000) {
84+
if (\PHP_VERSION_ID >= 70000) {
8585
$expected = preg_replace('/%(.*?)%/', '($context["$1"] ?? null)', $expected);
86-
} elseif (PHP_VERSION_ID >= 50400) {
86+
} elseif (\PHP_VERSION_ID >= 50400) {
8787
$expected = preg_replace('/%(.*?)%/', '(isset($context["$1"]) ? $context["$1"] : null)', $expected);
8888
} else {
8989
$expected = preg_replace('/%(.*?)%/', '$this->getContext($context, "$1")', $expected);
@@ -114,9 +114,9 @@ public function testMultiVars()
114114

115115
EOTXT;
116116

117-
if (PHP_VERSION_ID >= 70000) {
117+
if (\PHP_VERSION_ID >= 70000) {
118118
$expected = preg_replace('/%(.*?)%/', '($context["$1"] ?? null)', $expected);
119-
} elseif (PHP_VERSION_ID >= 50400) {
119+
} elseif (\PHP_VERSION_ID >= 50400) {
120120
$expected = preg_replace('/%(.*?)%/', '(isset($context["$1"]) ? $context["$1"] : null)', $expected);
121121
} else {
122122
$expected = preg_replace('/%(.*?)%/', '$this->getContext($context, "$1")', $expected);

src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ public function testCompile()
6767

6868
protected function getVariableGetter($name)
6969
{
70-
if (PHP_VERSION_ID >= 70000) {
70+
if (\PHP_VERSION_ID >= 70000) {
7171
return sprintf('($context["%s"] ?? null)', $name, $name);
7272
}
7373

74-
if (PHP_VERSION_ID >= 50400) {
74+
if (\PHP_VERSION_ID >= 50400) {
7575
return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name);
7676
}
7777

src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,11 @@ public function testCompileLabelWithLabelThatEvaluatesToNullAndAttributes()
264264

265265
protected function getVariableGetter($name)
266266
{
267-
if (PHP_VERSION_ID >= 70000) {
267+
if (\PHP_VERSION_ID >= 70000) {
268268
return sprintf('($context["%s"] ?? null)', $name, $name);
269269
}
270270

271-
if (PHP_VERSION_ID >= 50400) {
271+
if (\PHP_VERSION_ID >= 50400) {
272272
return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name);
273273
}
274274

src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ public function testCompileStrict()
4040

4141
protected function getVariableGetterWithoutStrictCheck($name)
4242
{
43-
if (PHP_VERSION_ID >= 70000) {
43+
if (\PHP_VERSION_ID >= 70000) {
4444
return sprintf('($context["%s"] ?? null)', $name, $name);
4545
}
4646

47-
if (PHP_VERSION_ID >= 50400) {
47+
if (\PHP_VERSION_ID >= 50400) {
4848
return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name);
4949
}
5050

@@ -57,11 +57,11 @@ protected function getVariableGetterWithStrictCheck($name)
5757
return sprintf('(isset($context["%s"]) || array_key_exists("%s", $context) ? $context["%s"] : (function () { throw new Twig_Error_Runtime(\'Variable "%s" does not exist.\', 0, $this->getSourceContext()); })())', $name, $name, $name, $name);
5858
}
5959

60-
if (PHP_VERSION_ID >= 70000) {
60+
if (\PHP_VERSION_ID >= 70000) {
6161
return sprintf('($context["%s"] ?? $this->getContext($context, "%s"))', $name, $name, $name);
6262
}
6363

64-
if (PHP_VERSION_ID >= 50400) {
64+
if (\PHP_VERSION_ID >= 50400) {
6565
return sprintf('(isset($context["%s"]) ? $context["%s"] : $this->getContext($context, "%s"))', $name, $name, $name);
6666
}
6767

src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ abstract class ServerCommand extends ContainerAwareCommand
2323
*/
2424
public function isEnabled()
2525
{
26-
if (PHP_VERSION_ID < 50400 || defined('HHVM_VERSION')) {
26+
if (\PHP_VERSION_ID < 50400 || defined('HHVM_VERSION')) {
2727
return false;
2828
}
2929

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function fileExcerpt($file, $line)
154154
*/
155155
public function formatFile($file, $line, $text = null)
156156
{
157-
if (PHP_VERSION_ID >= 50400) {
157+
if (\PHP_VERSION_ID >= 50400) {
158158
$flags = ENT_QUOTES | ENT_SUBSTITUTE;
159159
} else {
160160
$flags = ENT_QUOTES;

src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function extract($resource, MessageCatalogue $catalog)
8585
foreach ($files as $file) {
8686
$this->parseTokens(token_get_all(file_get_contents($file)), $catalog);
8787

88-
if (PHP_VERSION_ID >= 70000) {
88+
if (\PHP_VERSION_ID >= 70000) {
8989
// PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098
9090
gc_mem_caches();
9191
}

0 commit comments

Comments
 (0)