Skip to content

Commit f81b62b

Browse files
authored
Add support for arm64 machine type (#271)
* Add support for arm64 machine type This patch adds support for Apple M2 Pro Fixes: #270 * Fix CI errors Fixes: #270 * Remove obsolete comment Fixes: #270
1 parent a413d8c commit f81b62b

3 files changed

Lines changed: 4 additions & 12 deletions

File tree

phpstan.neon.dist

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,3 @@ parameters:
99
checkMissingCallableSignature: true
1010
checkUninitializedProperties: true
1111
checkTooWideReturnTypesInProtectedAndPublicMethods: true
12-
13-
ignoreErrors:
14-
-
15-
# CORE_VERSION constant may change in the future
16-
message: '~Right side of && is always true~'
17-
path: 'src/EditorconfigChecker/Utilities.php'
18-
count: 1

src/EditorconfigChecker/Cli.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use EditorconfigChecker\Utilities;
66

7-
define('CORE_VERSION', '2.3.5');
7+
define('CORE_VERSION', '2.7.0');
88

99
class Cli
1010
{

src/EditorconfigChecker/Utilities.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ public static function getCurrentArch(): string
1212
$arch = php_uname('m');
1313

1414
switch ($arch) {
15-
case 'AMD64':
16-
return "amd64";
1715
case 'x86_64':
16+
case 'AMD64':
1817
return "amd64";
1918
case 'i386':
2019
return "386";
20+
case 'arm64':
2121
case 'aarch64':
2222
return "arm64";
2323
default:
@@ -79,8 +79,7 @@ public static function downloadReleaseArchive(string $releaseName, string $versi
7979
$archivePath = sprintf('%s/%s.tar.gz', Utilities::getBasePath(), $releaseName);
8080

8181
$releaseSuffix = '.tar.gz';
82-
// Windows release archive suffix changed from 2.5 to 2.6
83-
if (self::getCurrentOs() === 'windows' && version_compare(CORE_VERSION, '2.6.0', '<')) {
82+
if (self::getCurrentOs() === 'windows') {
8483
$releaseSuffix = '.exe.tar.gz';
8584
}
8685
$releaseUrl = sprintf(

0 commit comments

Comments
 (0)