mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +01:00
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
This commit is contained in:
parent
c5df885d7b
commit
637832d06f
1 changed files with 6 additions and 6 deletions
|
@ -495,8 +495,8 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
|
||||||
$name = $node->getConcreteString();
|
$name = $node->getConcreteString();
|
||||||
|
|
||||||
$version = idx($compat_info['functions'], $name, array());
|
$version = idx($compat_info['functions'], $name, array());
|
||||||
$min = idx($version, 'min');
|
$min = idx($version, 'php.min');
|
||||||
$max = idx($version, 'max');
|
$max = idx($version, 'php.max');
|
||||||
|
|
||||||
// Check if whitelisted.
|
// Check if whitelisted.
|
||||||
$whitelisted = false;
|
$whitelisted = false;
|
||||||
|
@ -581,8 +581,8 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
|
||||||
$name = $node->getConcreteString();
|
$name = $node->getConcreteString();
|
||||||
$version = idx($compat_info['interfaces'], $name, array());
|
$version = idx($compat_info['interfaces'], $name, array());
|
||||||
$version = idx($compat_info['classes'], $name, $version);
|
$version = idx($compat_info['classes'], $name, $version);
|
||||||
$min = idx($version, 'min');
|
$min = idx($version, 'php.min');
|
||||||
$max = idx($version, 'max');
|
$max = idx($version, 'php.max');
|
||||||
// Check if whitelisted.
|
// Check if whitelisted.
|
||||||
$whitelisted = false;
|
$whitelisted = false;
|
||||||
foreach (idx($whitelist['class'], $name, array()) as $range) {
|
foreach (idx($whitelist['class'], $name, array()) as $range) {
|
||||||
|
@ -629,8 +629,8 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
|
||||||
foreach ($constants as $node) {
|
foreach ($constants as $node) {
|
||||||
$name = $node->getConcreteString();
|
$name = $node->getConcreteString();
|
||||||
$version = idx($compat_info['constants'], $name, array());
|
$version = idx($compat_info['constants'], $name, array());
|
||||||
$min = idx($version, 'min');
|
$min = idx($version, 'php.min');
|
||||||
$max = idx($version, 'max');
|
$max = idx($version, 'php.max');
|
||||||
|
|
||||||
if ($min && version_compare($min, $this->version, '>')) {
|
if ($min && version_compare($min, $this->version, '>')) {
|
||||||
$this->raiseLintAtNode(
|
$this->raiseLintAtNode(
|
||||||
|
|
Loading…
Reference in a new issue