From ad7f7ab220391e87da119e7e05baa810e7312ec3 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Mon, 23 Nov 2026 16:15:45 +0200 Subject: [PATCH 1/3] test(curation-sets): ignore rule defaults added by typesense 30.2 --- tests/Feature/CurationSetsTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Feature/CurationSetsTest.php b/tests/Feature/CurationSetsTest.php index 4219663d..6312037f 100644 --- a/tests/Feature/CurationSetsTest.php +++ b/tests/Feature/CurationSetsTest.php @@ -55,7 +55,9 @@ protected function tearDown(): void public function testCanUpsertACurationSet(): void { $this->assertEquals($this->curationSetData['items'][0]['id'], $this->upsertResponse['items'][0]['id']); - $this->assertEquals($this->curationSetData['items'][0]['rule'], $this->upsertResponse['items'][0]['rule']); + // Typesense v30.2+ adds defaults such as stem and synonyms to the rule; compare only the keys we sent. + $rule = $this->curationSetData['items'][0]['rule']; + $this->assertEquals($rule, array_intersect_key($this->upsertResponse['items'][0]['rule'], $rule)); $this->assertEquals($this->curationSetData['items'][0]['includes'], $this->upsertResponse['items'][0]['includes']); } @@ -79,7 +81,9 @@ public function testCanRetrieveASpecificCurationSet(): void { $returnData = $this->curationSets['test-curation-set']->retrieve(); $this->assertEquals($this->curationSetData['items'][0]['id'], $returnData['items'][0]['id']); - $this->assertEquals($this->curationSetData['items'][0]['rule'], $returnData['items'][0]['rule']); + // Typesense v30.2+ adds defaults such as stem and synonyms to the rule; compare only the keys we sent. + $rule = $this->curationSetData['items'][0]['rule']; + $this->assertEquals($rule, array_intersect_key($returnData['items'][0]['rule'], $rule)); $this->assertEquals($this->curationSetData['items'][0]['includes'], $returnData['items'][0]['includes']); } From 50f342abd6cf8b533d9d88e2f0c197b1f0e52055 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Mon, 23 Nov 2026 16:15:45 +0200 Subject: [PATCH 2/3] ci: run tests against typesense 30.2 --- .github/workflows/tests.yml | 2 +- docker-compose.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 01fcaea3..8b768654 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: --name typesense \ -v /tmp/typesense-data:/data \ -v /tmp/typesense-analytics-data:/analytics-data \ - typesense/typesense:30.0.alpha1 \ + typesense/typesense:30.2 \ --api-key=xyz \ --data-dir=/data \ --enable-search-analytics=true \ diff --git a/docker-compose.yml b/docker-compose.yml index 97531a76..38eba89c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,10 +2,11 @@ version: '3.5' services: typesense: - image: typesense/typesense:27.0.rc21 + image: typesense/typesense:30.2 environment: TYPESENSE_DATA_DIR: /data TYPESENSE_API_KEY: xyz + TYPESENSE_ANALYTICS_MINUTE_RATE_LIMIT: 50 volumes: - /tmp/typesense-server-data:/data ports: From 99438c6c91d99d7426efd9c4c41dcc08289940d8 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Mon, 23 Nov 2026 16:35:41 +0200 Subject: [PATCH 3/3] ci: install dependencies with setup-php's composer --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8b768654..e13f8ec8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,6 +29,7 @@ jobs: with: php-version: "8.4" coverage: xdebug - - uses: php-actions/composer@v6 + - name: Install dependencies + run: composer install --no-interaction --no-progress - name: Run tests run: vendor/bin/phpunit --coverage-text --testdox