From a1c0ba785d110ec3118f2293697f3a73aac230d6 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 19 May 2013 11:00:08 -0700 Subject: [PATCH] Lint for PHP 5.3 on Windows Test Plan: Linted `FileFinder`. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5972 --- src/lint/linter/ArcanistXHPASTLinter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php index 5d20c006..ea900691 100644 --- a/src/lint/linter/ArcanistXHPASTLinter.php +++ b/src/lint/linter/ArcanistXHPASTLinter.php @@ -439,12 +439,12 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter { "of `{$name}()` was not introduced until PHP {$version}."); } } - } else if ($windows_version !== null) { + } else if (version_compare($windows_version, '5.3.0') > 0) { $this->raiseLintAtNode( $node, self::LINT_PHP_53_FEATURES, - "This codebase targets PHP 5.2.3, but `{$name}()` is not available ". - "on Windows". + "This codebase targets PHP 5.3.0 on Windows, but `{$name}()` is not ". + "available there.". ($windows_version ? " until PHP {$windows_version}" : "")."."); } }