From 637832d06f0eb74296cd5bc7b44cbe4d59b92567 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 7 Apr 2015 07:25:58 +1000 Subject: [PATCH] Fix parsing of PHP compatibility info Summary: The format of this file has changed. Depends on D12278. Test Plan: `arc unit` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12279 --- src/lint/linter/ArcanistXHPASTLinter.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php index f5860014..16f6022f 100644 --- a/src/lint/linter/ArcanistXHPASTLinter.php +++ b/src/lint/linter/ArcanistXHPASTLinter.php @@ -495,8 +495,8 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter { $name = $node->getConcreteString(); $version = idx($compat_info['functions'], $name, array()); - $min = idx($version, 'min'); - $max = idx($version, 'max'); + $min = idx($version, 'php.min'); + $max = idx($version, 'php.max'); // Check if whitelisted. $whitelisted = false; @@ -581,8 +581,8 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter { $name = $node->getConcreteString(); $version = idx($compat_info['interfaces'], $name, array()); $version = idx($compat_info['classes'], $name, $version); - $min = idx($version, 'min'); - $max = idx($version, 'max'); + $min = idx($version, 'php.min'); + $max = idx($version, 'php.max'); // Check if whitelisted. $whitelisted = false; foreach (idx($whitelist['class'], $name, array()) as $range) { @@ -629,8 +629,8 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter { foreach ($constants as $node) { $name = $node->getConcreteString(); $version = idx($compat_info['constants'], $name, array()); - $min = idx($version, 'min'); - $max = idx($version, 'max'); + $min = idx($version, 'php.min'); + $max = idx($version, 'php.max'); if ($min && version_compare($min, $this->version, '>')) { $this->raiseLintAtNode(