Problem/Motivation

The algolia/algoliasearch-client-php package has had a version 4 for a while. This module still requires version 3.

Proposed resolution

Update the module to use version 4 by following the upgrade guide.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dieterholvoet created an issue. See original summary.

dieterholvoet’s picture

Issue summary: View changes

dieterholvoet’s picture

Status: Active » Needs review
damienmckenna’s picture

Just to keep this cleaner, it might be worth moving the coding standards changes into a separate issue.

jlenni’s picture

FYI (mail from Algolia):

Hello,

We’re reaching out because you’re currently using our API Client.

We have noticed you recently used the following version(s) of the client which is scheduled to reach end of support and SLA coverage on August 14, 2026.

API Client Version(s):
php 3.4.2

After this point, you will need to be on a later supported version of the client in order to be eligible for Support and any SLA you have with Algolia (if applicable).

You can see which versions are supported and when they expire here: https://www.algolia.com/doc/libraries/sdk/v1/versions
You can find a guide for how to upgrade your API client here: https://www.algolia.com/doc/libraries/sdk/upgrade/
If you are using our Instant Search front end, you can upgrade using this guide: https://www.algolia.com/doc/guides/building-search-ui/upgrade-guides/js

davps’s picture

Assigned: Unassigned » davps
Status: Needs review » Needs work

@dieterholvoet, thanks for contribution. I agree with @damienmckenna that code style changes should be moved to a separate task.

I’ll clean up the codebase and keep only the API client update. I’ll assign the issue to myself and move it to the “Needs work” while working on it.

@jlenni, I can’t provide an exact ETA, but I’ll try to get it done soon.

davps’s picture

Assigned: davps » Unassigned
Status: Needs work » Needs review

The MR 32 is ready for testing. I've checked it manually, and all the basic functions are working. I'd like someone else to check it as well. I'd appreciate your help.

I'm waiting for feedback before I proceed with the merge and the new release.

adelgado12’s picture

Tested with this in my composer.json

{
      "type": "vcs",
      "url": "https://git.drupalcode.org/issue/search_api_algolia-3511165.git"
},
"drupal/search_api_algolia": "dev-3511165-update-the-php as 3.1.x-dev",

it works :)

ben.hamelin’s picture

Status: Needs review » Reviewed & tested by the community

I've tested this locally and it's working fine for me.
Note that I also used the composer repo approach like @adelgado12.
In my case I had to place

{
      "type": "vcs",
      "url": "https://git.drupalcode.org/issue/search_api_algolia-3511165.git"
},

above

{
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },

as I received composer error The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.

I was able to delete indexed items, re-index, and execute the drush search_api_algolia:delete --batch-size=100 command.
I also did a quick code review and it looks good.
Thanks!

ben.hamelin’s picture

Just noting that I performed this same update on another D10 site using Algolia, and it looks fine there as well.

jlenni’s picture

Confirming this works well on our end. Tested it on Drupal 11.3.x (PHP 8.4).
To pull in the MR I used:

...
"repositories": {
  "drupal": {
    "type": "composer",
    "url": "https://packages.drupal.org/8",
    "exclude": ["drupal/search_api_algolia"]
  },
  "drupal/search_api_algolia": {
    "type": "git",
    "url": "https://git.drupalcode.org/issue/search_api_algolia-3511165.git"
  }
}
...

composer require "drupal/search_api_algolia:dev-3511165-update-the-php" "algolia/algoliasearch-client-php:4.46.3"

Verified without issues:
Content sync: node create / update / delete all propagate to Algolia correctly
Index status reporting
Clear index
Full reindex

Everything behaves as expected 👍🏻

Thanks for the MR and for the cleanup and getting it review-ready

  • davps committed ce3c2551 on 3.0.x authored by dieterholvoet
    task: #3511165 Update the PHP API client to v4
    
    By: dieterholvoet
    By:...
davps’s picture

Status: Reviewed & tested by the community » Fixed

 Thanks all for contribution. Merged and tagged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • davps committed 44fc9627 on 3.2.x authored by dieterholvoet
    task: #3511165 Update the PHP API client to v4
    
    By: dieterholvoet
    By:...