Open-CSP / WikiSearch

Faceted search for Semantic MediaWiki.
GNU General Public License v2.0
5 stars 4 forks source link

WikiSearch is still not fully compatible with ES7... and PHP 8 #47

Closed bertrandgorge closed 7 months ago

bertrandgorge commented 7 months ago

Hello,

After further investigation, I understood what's stoping WikiSearch from working with PHP8.2 and ES 7. For some reason, when using PHP8.2, composer's autoloader uses the local installation of elasticsearch, which is still on 6.xx because of elasticsearch-dsl :

        "elasticsearch/elasticsearch": "^5.3|^6.0|^7.12",
        "ongr/elasticsearch-dsl": "~6.0",

If I downgrade to PHP7.4, the local verstion of the elasticsearch/elasticsearch is ignored, and it's the one on the core's vendor folder that is used (which happens to be 7.12).

I saw that in your es-810-mw-139 branch, you removed those two from composer.json, so I just tried that too, and it works :-)

Soo, another commit, with an updated composer.json that has those two entries removed, so that we can use WikiSearch with ES7 and PHP8 !

bertrandgorge commented 7 months ago

Update: the change I proposed did not work. It fixed the Special:Version page from breaking, but WikiSearch itself would not work.

What was missing was elasticsearch-dsl - which needs to be upgraded as well to a PHP8 compatible version. I found that the following works (as commited):

        "elasticsearch/elasticsearch": "^5.3|^6.0|^7.12",
        "ongr/elasticsearch-dsl": "~6.0|^7.2",
bertrandgorge commented 7 months ago

See https://github.com/Open-CSP/WikiSearch/pull/48