chore(deps): secure PHP 8.3 dependency baseline

This commit is contained in:
wchino
2026-07-21 23:41:18 +08:00
parent ba54444979
commit fb15c64d9b
5 changed files with 1812 additions and 404 deletions

View File

@@ -61,7 +61,7 @@ test('api unknown route returns unified not_found json without hitting locale mi
test('player me works with main site jwt when dev bypass is off', function () {
config(['lottery.player_auth.dev_bypass' => false]);
config(['lottery.main_site.sso_jwt_secret' => 'jwt-test-secret']);
config(['lottery.main_site.sso_jwt_secret' => 'jwt-test-secret-at-least-32-bytes-long']);
$player = Player::query()->create([
'site_code' => 'main',
@@ -78,7 +78,7 @@ test('player me works with main site jwt when dev bypass is off', function () {
'site_player_id' => 'jwt-user-1',
'iat' => $now,
'exp' => $now + 300,
], 'jwt-test-secret', 'HS256');
], 'jwt-test-secret-at-least-32-bytes-long', 'HS256');
$this->withHeader('Authorization', 'Bearer '.$jwt)
->getJson('/api/v1/player/me')
@@ -88,7 +88,7 @@ test('player me works with main site jwt when dev bypass is off', function () {
test('jwt first successful login auto-registers player mapping', function () {
config(['lottery.player_auth.dev_bypass' => false]);
config(['lottery.main_site.sso_jwt_secret' => 'jwt-test-secret']);
config(['lottery.main_site.sso_jwt_secret' => 'jwt-test-secret-at-least-32-bytes-long']);
expect(Player::query()->count())->toBe(0);
@@ -98,7 +98,7 @@ test('jwt first successful login auto-registers player mapping', function () {
'site_player_id' => 'brand-new-sso-1',
'iat' => $now,
'exp' => $now + 300,
], 'jwt-test-secret', 'HS256');
], 'jwt-test-secret-at-least-32-bytes-long', 'HS256');
$response = $this->withHeader('Authorization', 'Bearer '.$jwt)
->getJson('/api/v1/player/me')

View File

@@ -46,14 +46,14 @@ test('wallet transfer-out with empty bearer token returns 8001', function (): vo
test('wallet transfer-in rejects expired jwt when dev bypass is off', function (): void {
config(['lottery.player_auth.dev_bypass' => false]);
config(['lottery.main_site.sso_jwt_secret' => 'unit-test-jwt-secret-for-expiry']);
config(['lottery.main_site.sso_jwt_secret' => 'unit-test-jwt-secret-for-expiry-32-bytes']);
$token = JWT::encode([
'site_code' => 'main',
'site_player_id' => 'expired-jwt-user',
'iat' => now()->subHours(2)->timestamp,
'exp' => now()->subMinute()->timestamp,
], 'unit-test-jwt-secret-for-expiry', 'HS256');
], 'unit-test-jwt-secret-for-expiry-32-bytes', 'HS256');
$this->withHeader('Authorization', 'Bearer '.$token)
->postJson('/api/v1/wallet/transfer-in', [