S
S
stainer2021-10-28 11:29:43
PHP
stainer, 2021-10-28 11:29:43

How to combine elasticsearch and php 7.0?

Good day!
Given: a large project on php 7.0 + elasticsearch 7.15.1.
There was a problem, the official elasticsearch / elasticsearch libraries and a couple of popular third-party libraries want php >= 7.3 to work.
(Elastic is just being introduced, not already built in)

Options:
1) Convert the project to php 7.3
The project is complex and I want to understand how difficult it is to update to 3 versions.
2) Use the old version of elastic (~2019)
The latest version of the lib that supported php 7.0 is v6.7.2. I would like to understand how relevant it is now
3) Write a custom lib
Write your own rest api client.

I would like to understand the difficulties of each of the options.
Thanks a lot!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ipatiev, 2021-10-28
@Fockker

> I would like to understand how difficult it is to update 3 versions.
Not difficult. The differences are minimal. Within the framework of one major version, there are no problems at all. Here the question is not even in difficulties, but in the fact that staying at 7.0 is not an option at all.
You just need to move to 7.4, because support for 7.3 ends in a month.
And in general, the version should be tightened up not when a fried cock pecks in the ass, but according to plan.

D
Dmitry Gordinskiy, 2021-10-28
@DmitriyGordinskiy

I would like to add to the answer above - you won't have to rewrite the code directly because of the move from PHP 7.0 version. But updating PHP may entail updating other libraries whose integrations or interfaces may have changed over the years.
But even in this case, the first option should be a priority - they have turned a blind eye to updating the code base for 4 years already, you should not aggravate the situation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question