diff --git a/.github/actions/setup-php/action.yml b/.github/actions/setup-php/action.yml index cf4df451c2..0b35b8c7d6 100644 --- a/.github/actions/setup-php/action.yml +++ b/.github/actions/setup-php/action.yml @@ -15,7 +15,7 @@ runs: with: php-version: 8.5 tools: composer:v2 - extensions: pdo_pgsql + extensions: intl, pdo_pgsql coverage: ${{ inputs.coverage }} ini-values: zend.assertions=1, memory_limit=-1 diff --git a/README.md b/README.md index 7d1254b35f..7a0e8e8922 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This is the source code of **[dev-null.sh](https://dev-null.sh)**, a social netw ## Contributing -Requires PHP 8.5+, Composer, Bun, and PostgreSQL 17+ with `pgvector` and `pg_trgm`. Create a `devnull` database, then: +Requires PHP 8.5+ with `intl`, Composer, Bun, and PostgreSQL 17+ with `pgvector` and `pg_trgm`. Create a `devnull` database, then: ```bash git clone https://github.com/dev-null-sh/dev-null.sh.git diff --git a/tests/Feature/EventThemeTest.php b/tests/Feature/EventThemeTest.php index c999a1d840..d852d86337 100644 --- a/tests/Feature/EventThemeTest.php +++ b/tests/Feature/EventThemeTest.php @@ -62,6 +62,22 @@ ->assertSee('data-event-theme="'.$choice.'"', false); })->with(['halloween', 'christmas', 'newyear']); +it('reads the local event date from browser time zone aliases', function (string $timeZone, string $date): void { + $this->travelTo(Date::parse($date)); + + $this->withUnencryptedCookie('time_zone', $timeZone) + ->get(route('home')) + ->assertOk() + ->assertSee('data-auto-event-theme="halloween"', false) + ->assertSee('data-event-theme="halloween"', false) + ->assertInertia(fn ($page) => $page + ->where('eventTheme', 'halloween') + ->where('clock.timeZone', $timeZone)); +})->with([ + 'a former name browsers still report' => ['Asia/Calcutta', '2026-10-28 20:00:00 UTC'], + 'a legacy regional alias' => ['US/Eastern', '2026-11-02 02:00:00 UTC'], +]); + it('keeps the usual colors for readers who picked default', function (): void { Date::setTestNow('2026-12-25 12:00:00');