Skip to content

Conversation

@meili-bot
Copy link
Contributor

@meili-bot meili-bot commented Nov 18, 2025

This PR is auto-generated.

The automated script updates the version of meilisearch-php to a new version: "v2.0.0-beta.1"

Changelog below 👇

Migration guide

Refactor tasks as objects, and task status and type as enums

This introduces two changes:

  • Asynchronous operations now return Tasks as an object instead of an array
  • Tasks can be awaited with the new wait(int $timeoutInMs = 5000, int $intervalInMs = 50): Task method

Awaiting tasks:

// Before
$promise = $this->client->createIndex('new-index', ['primaryKey' => 'objectID']);
$this->index->waitForTask($promise['taskUid']);

// After
$this->client->createIndex('new-index', ['primaryKey' => 'objectID'])->wait();

Asserting task status:

// Before
$task = $this->client->getTask($taskUid);
if ($task['status'] === 'succeeded') {
    // do something
}

// After
if ($task->getStatus() === TaskStatus::Succeeded) {
    // do something
}

Asserting task types:

// Before
$task = $this->client->getTask($taskUid);
if ($task['type'] === 'indexCreation') {
    // do something
}

// After
$task = $this->client->getTask($taskUid);
if ($task->getType() === TaskType::IndexCreation) {
    // do something
}

Remove custom exception for JSON parsing

Before: catching SDK-specific JSON exceptions

<?php

try {
    $client->index('books')->addDocuments([["title" => "\xB1\x31"]]);
} catch (JsonEncodingException | JsonDecodingException $e) {
    // handle JSON errors
}

After: catching native PHP JsonException

<?php

try {
    $client->index('books')->addDocuments([["title" => "\xB1\x31"]]);
} catch (\JsonException $e) {
    // handle JSON errors
}

⚠️ Breaking changes

🚀 Enhancements

🐛 Bug Fixes

⚙️ Maintenance/misc

Thanks to @Strift, @bpolaszek, @dependabot[bot], @norkunas, Benoit POLASZEK and dependabot[bot]! 🎉

See full changelog: v1.16.0...v2.0.0

Summary by CodeRabbit

  • Chores
    • Version updated to 2.0.0-beta.1, marking the transition to the next major release in beta.

@meili-bot meili-bot added the skip-changelog The PR will not appear in the release changelogs label Nov 18, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 18, 2025

Walkthrough

The pull request updates the public VERSION constant in the Meilisearch class from 1.16.1 to 2.0.0-beta.1, marking a major version bump to a beta release. No logic or control flow changes are present.

Changes

Cohort / File(s) Summary
Version Constant Update
src/Meilisearch.php
Updated public constant VERSION from '1.16.1' to '2.0.0-beta.1'

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • Strift

Poem

🐇 A rabbit hops with glee,
The version bumps to two-point-oh!
Beta whispers, bold and free,
New horizons, watch us grow!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating the package version constant to v2.0.0-beta.1, which is the primary and only modification in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch meili-bot/bump-version

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Strift Strift added this to the Meilisearch PHP v2 milestone Nov 18, 2025
@Strift Strift enabled auto-merge November 18, 2025 10:44
@Strift Strift added this pull request to the merge queue Nov 18, 2025
Merged via the queue into main with commit f82d8e8 Nov 18, 2025
9 checks passed
@Strift Strift deleted the meili-bot/bump-version branch November 18, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog The PR will not appear in the release changelogs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants