Skip to content

Commit 5f6a667

Browse files
committed
Merge branch 'main' into feature/extras
2 parents 0a03eb1 + 158b830 commit 5f6a667

21 files changed

+187
-29
lines changed

.github/funding.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
github: simonhamp
21
open_collective: nativephp

.github/workflows/fix-php-code-style-issues.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@ jobs:
2020

2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2424
with:
2525
ref: ${{ github.head_ref || github.sha }}
2626

2727
- name: Check PHP code style issues
2828
if: github.event_name == 'push'
29-
uses: aglipanci/laravel-pint-action@2.5
29+
uses: aglipanci/laravel-pint-action@2.6
3030
with:
3131
verboseMode: true
3232
testMode: true
3333

3434
- name: Fix PHP code style issues
3535
if: github.event_name == 'pull_request'
36-
uses: aglipanci/laravel-pint-action@2.5
36+
uses: aglipanci/laravel-pint-action@2.6
3737

3838
- name: Commit changes
3939
if: github.event_name == 'pull_request'
40-
uses: stefanzweifel/git-auto-commit-action@v5
40+
uses: stefanzweifel/git-auto-commit-action@v6
4141
with:
4242
commit_message: Fix styling
4343

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919

2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222

2323
- name: Setup PHP
2424
uses: shivammathur/setup-php@v2

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout code
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v5
2525

2626
- name: Setup PHP
2727
uses: shivammathur/setup-php@v2

.github/workflows/update-changelog.yml

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

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717
with:
1818
ref: main
1919

@@ -24,7 +24,7 @@ jobs:
2424
release-notes: ${{ github.event.release.body }}
2525

2626
- name: Commit updated CHANGELOG
27-
uses: stefanzweifel/git-auto-commit-action@v5
27+
uses: stefanzweifel/git-auto-commit-action@v6
2828
with:
2929
branch: main
3030
commit_message: Update CHANGELOG

config/nativephp-internal.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@
4848
'apple_team_id' => env('NATIVEPHP_APPLE_TEAM_ID'),
4949
],
5050

51+
/**
52+
* The credentials to use Azure Trusted Signing service.
53+
*/
54+
'azure_trusted_signing' => [
55+
'tenant_id' => env('AZURE_TENANT_ID'),
56+
'client_id' => env('AZURE_CLIENT_ID'),
57+
'client_secret' => env('AZURE_CLIENT_SECRET'),
58+
'publisher_name' => env('NATIVEPHP_AZURE_PUBLISHER_NAME'),
59+
'endpoint' => env('NATIVEPHP_AZURE_ENDPOINT'),
60+
'certificate_profile_name' => env('NATIVEPHP_AZURE_CERTIFICATE_PROFILE_NAME'),
61+
'code_signing_account_name' => env('NATIVEPHP_AZURE_CODE_SIGNING_ACCOUNT_NAME'),
62+
],
63+
5164
/**
5265
* The binary path of PHP for NativePHP to use at build.
5366
*/

config/nativephp.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
*/
6161
'cleanup_env_keys' => [
6262
'AWS_*',
63+
'AZURE_*',
6364
'GITHUB_*',
6465
'DO_SPACES_*',
6566
'*_SECRET',
@@ -68,6 +69,10 @@
6869
'NATIVEPHP_APPLE_ID',
6970
'NATIVEPHP_APPLE_ID_PASS',
7071
'NATIVEPHP_APPLE_TEAM_ID',
72+
'NATIVEPHP_AZURE_PUBLISHER_NAME',
73+
'NATIVEPHP_AZURE_ENDPOINT',
74+
'NATIVEPHP_AZURE_CERTIFICATE_PROFILE_NAME',
75+
'NATIVEPHP_AZURE_CODE_SIGNING_ACCOUNT_NAME',
7176
],
7277

7378
/**

src/App.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@ public function isHidden(): bool
3434
return $this->client->get('app/is-hidden')->json('is_hidden');
3535
}
3636

37+
public function getLocale(): string
38+
{
39+
return $this->client->get('app/locale')->json('locale');
40+
}
41+
42+
public function getLocaleCountryCode(): string
43+
{
44+
return $this->client->get('app/locale-country-code')->json('locale_country_code');
45+
}
46+
47+
public function getSystemLocale(): string
48+
{
49+
return $this->client->get('app/system-locale')->json('system_locale');
50+
}
51+
3752
public function version(): string
3853
{
3954
return $this->client->get('app/version')->json('version');
@@ -87,4 +102,14 @@ public function openAtLogin(?bool $open = null): bool
87102

88103
return $open;
89104
}
105+
106+
public function isEmojiPanelSupported(): bool
107+
{
108+
return (bool) $this->client->get('app/is-emoji-panel-supported')->json('supported');
109+
}
110+
111+
public function showEmojiPanel(): void
112+
{
113+
$this->client->post('app/show-emoji-panel');
114+
}
90115
}

src/Commands/DebugCommand.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ private function processNativePHP(): static
111111
&& config('nativephp-internal.notarization.apple_id_pass')
112112
&& config('nativephp-internal.notarization.apple_team_id');
113113

114+
$isAzureTrustedSigningConfigured = config('nativephp-internal.azure_trusted_signing.tenant_id')
115+
&& config('nativephp-internal.azure_trusted_signing.client_id')
116+
&& config('nativephp-internal.azure_trusted_signing.client_secret')
117+
&& config('nativephp-internal.azure_trusted_signing.publisher_name')
118+
&& config('nativephp-internal.azure_trusted_signing.endpoint')
119+
&& config('nativephp-internal.azure_trusted_signing.certificate_profile_name')
120+
&& config('nativephp-internal.azure_trusted_signing.code_signing_account_name');
121+
114122
$this->debugInfo->put(
115123
'NativePHP',
116124
[
@@ -122,6 +130,7 @@ private function processNativePHP(): static
122130
'Post' => config('nativephp.postbuild'),
123131
],
124132
'NotarizationEnabled' => $isNotarizationConfigured,
133+
'AzureTrustedSigningEnabled' => $isAzureTrustedSigningConfigured,
125134
'CustomPHPBinary' => config('nativephp-internal.php_binary_path') ?? false,
126135
],
127136
]

src/Commands/SeedDatabaseCommand.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,30 @@
55
use Illuminate\Database\Console\Seeds\SeedCommand as BaseSeedCommand;
66
use Native\Laravel\NativeServiceProvider;
77
use Symfony\Component\Console\Attribute\AsCommand;
8+
use Symfony\Component\Console\Input\InputArgument;
9+
use Symfony\Component\Console\Input\InputOption;
810

911
#[AsCommand(
1012
name: 'native:seed',
1113
description: 'Seed the database in the NativePHP development environment',
1214
)]
1315
class SeedDatabaseCommand extends BaseSeedCommand
1416
{
17+
protected $signature = 'native:seed';
18+
19+
protected function configure(): void
20+
{
21+
parent::configure();
22+
23+
$this->addArgument('class', mode: InputArgument::OPTIONAL, description: 'The class name of the root seeder');
24+
$this->addOption('class', mode: InputOption::VALUE_OPTIONAL, description: 'The class name of the root seeder', default: 'Database\\Seeders\\DatabaseSeeder');
25+
}
26+
1527
public function handle()
1628
{
29+
// Add the database option here so it won't show up in `--help`
30+
$this->addOption('database', mode: InputOption::VALUE_REQUIRED, default: 'nativephp');
31+
1732
(new NativeServiceProvider($this->laravel))->rewriteDatabase();
1833

1934
return parent::handle();

0 commit comments

Comments
 (0)