meilisearch / meilisearch-php

PHP wrapper for the Meilisearch API

Home Page:https://meilisearch.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DX - Drop support for PHP 7.4 & 8.0

stloyd opened this issue · comments

Description

This library supports still PHP 7.4, but that version is not maintained anymore, it lost support in November 2022(!).

Having still this version it is not really useful, as well it blocks of usage nice new features that PHP 8 provides.

I would request to drop the minimum version of PHP to 8.1 (version 8.0 is already being EOLed with just security support active)

Hi @stloyd yes I'm aware of that deprecation! In fact, in most of our SDKs, we tend to have "old" minimum requirements because we want to onboard as many people as possible, even if that means we don't have the best tooling to maintain the SDK.

We will stay in PHP 7.4 until Q1 next year (or until a Meilisearch v2, whatever comes first). For a couple of reasons:

  • Meilisearch PHP alongside JS are our biggest Meilisearch adopters, so I'm playing conservative here! 😅
  • PHP 7.4 still has a pretty good market share, so even being not supported anymore, most of our users are there.
  • We just reached a certain level of stability, and we would like to keep that, so it will also give time for the developers who adopted Meilisearch in the past to update their apps and then move forward with us.
    Also, the new minimum requirement should be directed to 8.2 and not 8.0.

I'm constantly watching resources like https://stitcher.io/blog/php-version-stats-january-2023, to be informed about that subject.

Just wanted to add that I'm using Meilisearch with WordPress based sites. Running the latest version of PHP isn't always possible due WP itself and 3rd party plugins that can take a while to update. Keeping support for slightly older versions of PHP is appreciated. Currently for new sites I'm limited to running PHP 8.0

@Enchiridion did you create a module for WordPress? We're considering working on a project like this in the future. Can you share some details about it? It would be appreciated!

Nothing generic/reusable like a module, but custom ajax endpoints in one off site specific plugins for specific needs. Usually it's doing the search with PHP, customizing it with per user data, then passing it to the front end. Right now I'm working on one for a realty site that's using multiSearch() to get the options for 12 facets that are always displayed.

good numbers hint available here also https://packagist.org/packages/meilisearch/meilisearch-php/php-stats to help maintainers takes decision
perhaps not "abandon" v<8.1, but perhaps create a new branch where the min is php v>=8.1, and adapt codebase accordingly :)

(reminds me my issue #179)