Skip to content

Commit b89ff3c

Browse files
authored
Add com_dotnet extension (#1023)
1 parent 0cfa203 commit b89ff3c

File tree

4 files changed

+36
-11
lines changed

4 files changed

+36
-11
lines changed

config/ext.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@
4343
"calendar": {
4444
"type": "builtin"
4545
},
46+
"com_dotnet": {
47+
"support": {
48+
"BSD": "no",
49+
"Linux": "no",
50+
"Darwin": "no"
51+
},
52+
"type": "builtin"
53+
},
4654
"ctype": {
4755
"type": "builtin"
4856
},
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SPC\builder\extension;
6+
7+
use SPC\builder\Extension;
8+
use SPC\util\CustomExt;
9+
10+
#[CustomExt('com_dotnet')]
11+
class com_dotnet extends Extension
12+
{
13+
public function getWindowsConfigureArg(bool $shared = false): string
14+
{
15+
return '--enable-com-dotnet=yes';
16+
}
17+
}

src/SPC/command/SwitchPhpVersionCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ public function configure()
2020
$this->addArgument(
2121
'php-major-version',
2222
InputArgument::REQUIRED,
23-
'PHP major version (supported: 7.4, 8.0, 8.1, 8.2, 8.3, 8.4)',
23+
'PHP major version (supported: 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5)',
2424
null,
25-
fn () => ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
25+
fn () => ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
2626
);
2727
$this->no_motd = true;
2828

@@ -32,7 +32,7 @@ public function configure()
3232
public function handle(): int
3333
{
3434
$php_ver = $this->input->getArgument('php-major-version');
35-
if (!in_array($php_ver, ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'])) {
35+
if (!in_array($php_ver, ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'])) {
3636
// match x.y.z
3737
preg_match('/^\d+\.\d+\.\d+$/', $php_ver, $matches);
3838
if (!$matches) {

src/globals/test-extensions.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// test php version (8.1 ~ 8.4 available, multiple for matrix)
1515
$test_php_version = [
16-
// '8.1',
16+
'8.1',
1717
'8.2',
1818
'8.3',
1919
'8.4',
@@ -23,15 +23,15 @@
2323

2424
// test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available)
2525
$test_os = [
26-
'macos-15-intel', // bin/spc for x86_64
27-
'macos-15', // bin/spc for arm64
28-
'ubuntu-latest', // bin/spc-alpine-docker for x86_64
29-
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
30-
'ubuntu-24.04', // bin/spc for x86_64
26+
// 'macos-15-intel', // bin/spc for x86_64
27+
// 'macos-15', // bin/spc for arm64
28+
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
29+
// 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
30+
// 'ubuntu-24.04', // bin/spc for x86_64
3131
// 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
3232
// 'ubuntu-24.04-arm', // bin/spc for arm64
3333
// 'windows-2022', // .\bin\spc.ps1
34-
// 'windows-2025',
34+
'windows-2025',
3535
];
3636

3737
// whether enable thread safe
@@ -51,7 +51,7 @@
5151
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
5252
$extensions = match (PHP_OS_FAMILY) {
5353
'Linux', 'Darwin' => 'mysqli,gmp',
54-
'Windows' => 'bcmath',
54+
'Windows' => 'com_dotnet',
5555
};
5656

5757
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).

0 commit comments

Comments
 (0)