PackageTrack
Sign in Get early access

meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

v1.17.0 19M downloads/mo #630 most downloaded on Packagist meilisearch/meilisearch-php

What this package is like to depend on

Last release 19 days ago

04 Aug 2026

Release timing varies

gaps range from 8 days to 3 months

Rarely documented

notes for 3 of 71 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

79 releases · first in 2020

10 releases in the last 12 months

see the full history below

Release timeline

78 releases · Jan 2020 to Aug 2026
2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 79
  1. v2.0.0-beta.7 22 Jul 2026 pre-release
    Release notes

    ⚠️ Breaking changes

    • Typehint HandlesSystem::health return type (#927) @Strift

    🧪 Experimental

    • Breaking: Make Dynamic Search Rules API compatible with Meilisearch v1.50 (#933) @Strift

    🚀 Enhancements

    • Add method to get task documents (#895) @mvanhorn
    • Add PHPDoc return type for HandlesDocuments::getDocument. (#926) @Strift
    • Improve HTTP client types (#930) @Strift
    • Make Dynamic Search Rules API compatible with Meilisearch v1.50 (#933) @Strift

    ⚙️ Maintenance/misc

    Thanks to @Strift, @dependabot[bot], @mvanhorn, Matt Van Horn and dependabot[bot]! 🎉

    See full changelog: v2.0.0-beta.6...v2.0.0-beta.7

    Open source →
  2. v2.0.0-beta.6 28 Apr 2026 pre-release
    Release notes

    Migration guide

    If you're migrating from v1.x, read the complete migration guide.

    API keys API now uses typed query and result objects

    API key methods no longer accept array-based write payloads or return plain list shapes. They now use CreateKeyQuery and UpdateKeyQuery for requests, KeysResults for lists, and KeyAction for actions.

    // Before (v1.x)
    $key = $client->createKey([
        'description' => 'tenant token key',
        'actions'     => ['*'],
        'indexes'     => ['tenant*'],
        'expiresAt'   => '2055-10-02T00:00:00Z',
    ]);
    
    // After (v2.x)
    $key = $client->createKey(new CreateKeyQuery(
        actions:    [KeyAction::Any],
        indexes:    ['tenant*'],
        description: 'tenant token key',
        expiresAt:   new DateTimeImmutable('2055-10-02T00:00:00Z'),
    ));

    The client updateKey method accepts an UpdateKeyQuery, which works similarly. It allows clearing the key name or description by passing null.

    Additionally, KeysResults::count() was removed; use count($keysResults) instead.

    Type improvements

    • SimilarDocumentsQuery, FacetSearchResult, and SearchResult are now final

    🧪 Experimental features

    ⚠️ Breaking changes

    • Refactor Keys API to use typed query and result objects (#903) @norkunas

    These other changes only pertain to PHPStan type hints improvements:

    🚀 Enhancements

    🐛 Bug Fixes

    • Use array_key_exists instead of isset in Task::offsetExists (#870) @norkunas
    • Fix uninitialized properties in TasksQueryTrait (#875) @norkunas

    ⚙️ Maintenance/misc

    Thanks to @QDenka, @Strift, @curquiza, @mvanhorn and @norkunas! 🎉

    See full changelog: v2.0.0-beta.5...v2.0.0-beta.6

    Open source →
  3. v2.0.0-beta.5 04 Feb 2026 pre-release
    Release notes

    Note

    This replaces the incorrect v2.0.0-beta.4 release tagged from the wrong branch.

    Migration guide

    If you're migrating from v1.x, read the full migration guide instead.

    🟠 Task methods now return types (Impact: moderate)

    $client->getTasks() and $index->getTasks() now return a TaskResults object.

    // Before (v1.x)
    $tasks = $client->getTasks();
    $results = $tasks['results']; // Accessing as array
    
    // After (v2.x)
    $tasks = $client->getTasks(); // Returns TaskResults
    $results = $tasks->getResults(); // Returns an array of Task objects

    Additionally

    • The internal task manager all() method now returns an array of Task objects.
    • The TaskResults class is now final

    ⚠️ Breaking changes

    • Wrap data with Task before passing to TasksResults (#864) @norkunas

    🚀 Enhancements

    • Add raw data to Task and implement ArrayAccess (backward compatibility) (#863) @norkunas
    • Use environment flag to allow all network IPs in tests (#867) @Strift

    ⚙️ Maintenance/misc

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

    See full changelog: v2.0.0-beta.3...v2.0.0-beta.5

    Open source →
  4. v2.0.0-beta.4 06 Jan 2026 pre-release
    Release notes

    Deprecated

    Warning

    This release was incorrectly tagged from the wrong branch.
    Please use v2.0.0-beta.5 instead.

    Open source →
  5. v2.0.0-beta.3 23 Dec 2025 pre-release
    Release notes

    Migration guide

    🟢 Improved exception types DX (Impact: minor)

    The custom $message property has been removed from custom exceptions. Use the getMessage() method instead:

    try {
        // ...
    } catch (\Meilisearch\Exceptions\ApiException $e) {
       // Before (v1.x)
        echo $e->message;
        // After (v2.x)
        echo $e->getMessage();
    }

    Also:

    • Exception classes are now final
    • Exception public properties are now read-only and strictly typed.
    • The rethrowWithHint static method now returns a \RuntimeException instead of a generic \Exception.

    ⚠️ Breaking changes

    🚀 Enhancements

    • Update experimental Network API for Meilisearch v1.30 compatibility (#853) @Strift

    ⚙️ Maintenance/misc

    Thanks to @Strift and @norkunas! 🎉

    See full changelog: v2.0.0-beta.2...v2.0.0-beta.3

    Open source →
  6. v2.0.0-beta.2 11 Dec 2025 pre-release
    Release notes

    Migration guide

    Database stats now return a typed Stats object

    $stats = $client->stats();
    
    // Before (v1.x) - accessing stats as array
    $databaseSize = $response['databaseSize'];
    $usedDatabaseSize = $response['usedDatabaseSize'];
    // etc...
    
    // After (v2.x) - use getter methods
    $databaseSize = $stats->getDatabaseSize();
    $usedDatabaseSize = $stats->getUsedDatabaseSize();

    Version is now a typed Version object

    $version = $client->version();
    
    // Before (v1.x) - access as array
    $commitSha = $version['commitSha'];
    $commitDate = $version['commitDate']; // String
    $pkgVersion = $version['pkgVersion'];
    
    // After (v2.x) - use getter methods
    $commitSha = $version->getCommitSha();
    $commitDate = $version->getCommitDate(); // \DateTimeImmutable
    $pkgVersion = $version->getPkgVersion();

    Removed legacy MeiliSearch namespace

    We removed MeiliSearch (capital S) namespace.

    // Before (v1.x) - MeiliSearch with capital S
    use MeiliSearch\Client;
    
    // After (v2.x) - Meilisearch without capital S
    use Meilisearch\Client;

    Removed Indexes::parseDate() public method

    This only affects you if you were using this utility method directly.

    // Before (v1.x) - If you used this method in your code
    $dateTime = \Meilisearch\Endpoints\Indexes::parseDate('2021-01-01T01:23:45.123456Z');
    
    // After (v2.x) - Use native PHP instead
    $dateTime = new \DateTimeImmutable('2021-01-01T01:23:45.123456Z');

    ⚠️ Breaking changes

    🐛 Bug Fixes

    ⚙️ Maintenance/misc

    Thanks to @Strift, @bpolaszek, @dependabot[bot], @norkunas, @tacman, and @walkwizus! 🎉

    See full changelog: v2.0.0-beta.1...v2.0.0-beta.2

    Open source →
  7. v2.0.0-beta.1 18 Nov 2025 pre-release
    Release notes

    While we recommend against production usage due to breaking changes, the code is stable. Please consider whether you can afford the potential upcoming breaking changes before upgrading.

    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

    • Cast federation payload explicitly to an object (#757) @norkunas

    ⚙️ Maintenance/misc

    Thanks to @Strift, @bpolaszek, and @norkunas! 🎉

    See full changelog: v1.16.0...v2.0.0-beta.1

    Open source →
  8. v1.17.0 04 Aug 2026
    Release notes

    🚀 Enhancements

    ⚙️ Maintenance/misc

    Thanks to @Junaid-PK, @Strift, @dependabot[bot] and dependabot[bot]! 🎉

    See full changelog: v1.16.1...v1.17.0

    Open source →
  9. v1.16.1 18 Sep 2025
    Release notes

    What's Changed

    This PR adds support for sorting to the documents endpoint.

    🚀 Enhancements

    • chore: backport document sorting to v1.x (#802) @Strift

    🐛 Bug Fixes

    Thanks to @Strift, and dependabot[bot]! 🎉

    See full changelog: v1.16.0...v1.16.1

    Open source →
  10. v1.16.0 10 Sep 2025
    Release notes

    This release makes the SDK compatible with features release in Meilisearch 1.16.

    🚀 Enhancements

    🐛 Bug Fixes

    ⚙️ Maintenance/misc

    Thanks again to @Strift, @bpolaszek, @brunoocasali, and @norkunas! 🎉

    Open source →
  11. v1.15.0 10 Jun 2025

    Nothing published for this version

  12. v1.14.0 14 Apr 2025

    Nothing published for this version

  13. v1.13.0 17 Feb 2025

    Nothing published for this version

  14. v1.12.0 23 Dec 2024

    Nothing published for this version

  15. v1.11.0 28 Oct 2024

    Nothing published for this version

  16. v1.10.1 15 Sep 2024

    Nothing published for this version

  17. v1.10.0 26 Aug 2024

    Nothing published for this version

  18. v1.9.1 25 Jul 2024

    Nothing published for this version

  19. v1.9.0 01 Jul 2024

    Nothing published for this version

  20. v1.8.0 06 May 2024

    Nothing published for this version

  21. v1.7.0 11 Mar 2024

    Nothing published for this version

  22. v1.6.1 16 Feb 2024

    Nothing published for this version

  23. v1.6.0 15 Jan 2024

    Nothing published for this version

  24. v1.5.0 20 Nov 2023

    Nothing published for this version

  25. v1.4.1 25 Oct 2023

    Nothing published for this version

  26. v1.4.0 25 Sep 2023

    Nothing published for this version

  27. v1.3.0 31 Jul 2023

    Nothing published for this version

  28. v1.2.1 06 Jun 2023

    Nothing published for this version

  29. v1.2.0 05 Jun 2023

    Nothing published for this version

  30. v1.1.1 03 Apr 2023

    Nothing published for this version

  31. v1.1.0 no date

    Nothing published for this version

  32. v1.0.0 06 Feb 2023

    Nothing published for this version

  33. v0.27.0 10 Jan 2023

    Nothing published for this version

  34. v0.26.1 16 Dec 2022

    Nothing published for this version

  35. v0.26.0 28 Nov 2022

    Nothing published for this version

  36. v0.25.1 26 Nov 2022

    Nothing published for this version

  37. v0.25.0 03 Oct 2022

    Nothing published for this version

  38. v0.24.2 16 Aug 2022

    Nothing published for this version

  39. v0.24.1 09 Aug 2022

    Nothing published for this version

  40. v0.24.0 11 Jul 2022

    Nothing published for this version

  41. v0.23.3 21 Jun 2022

    Nothing published for this version

  42. v0.23.2 09 May 2022

    Nothing published for this version

  43. v0.23.1 17 Mar 2022

    Nothing published for this version

  44. v0.23.0 14 Mar 2022

    Nothing published for this version

  45. v0.22.0 14 Feb 2022

    Nothing published for this version

  46. v0.21.0 12 Jan 2022

    Nothing published for this version

  47. v0.20.0 17 Nov 2021

    Nothing published for this version

  48. v0.19.3 16 Nov 2021

    Nothing published for this version

  49. v0.19.2 12 Oct 2021

    Nothing published for this version

  50. v0.19.1 13 Sep 2021

    Nothing published for this version

  51. v0.19.0 24 Aug 2021

    Nothing published for this version

  52. v0.18.3 30 Jun 2021

    Nothing published for this version

  53. v0.18.2 01 Jun 2021

    Nothing published for this version

  54. v0.18.1 24 May 2021

    Nothing published for this version

  55. v0.18.0 29 Apr 2021

    Nothing published for this version

  56. v0.17.2 26 Apr 2021

    Nothing published for this version

  57. v0.17.1 12 Apr 2021

    Nothing published for this version

  58. v0.17.0 02 Mar 2021

    Nothing published for this version

  59. v0.16.0 21 Jan 2021

    Nothing published for this version

  60. v0.15.1 04 Nov 2020

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive