Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Due to some hard dependencies, Search API Solr 1.x should be updated to Drupal 9 so people can make an easier transition to Search API 4.x
Below is the D9 patch.
Comment | File | Size | Author |
---|---|---|---|
#4 | 3181155-d9-compatibility-4.patch | 15.3 KB | japerry |
#2 | 3181155-d9-compatibility-2.patch | 14.69 KB | japerry |
Issue fork search_api_solr-3181155
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
Comment #2
japerryComment #3
mkalkbrennerThere's more to do in addition to this patch. Therefore I won't accept a patch that just declares compatibility and fixes the obvious findings in the code. Just to name the most important one: solarium and symfony incompatibilities regarding event dispatching.
Depending on your Solr setup you have two options for Drupal 9.
If you run Solr >=6.6 you can just upgrade to Search APi Solr 4.x following https://www.drupal.org/docs/8/modules/search-api-solr/search-api-solr-ho...
If you run Solr < 6.6 you need to additionally activate the seach_api_solr_legacy module which is part of Search APi Solr.
Comment #4
japerrySo TL;dr its for acquia search ;) And its current offering (3.5/4.5) is going to be around for a while. More importantly, the legacy module won't work because it requires a manual redeploy of the solrconfig for every customer upgrading to 4.x. That is not really desirable from a support perspective.
Thanks for the suggestion about Solarium, but there is no incompatibility with D9; At least from small amount of testing that I've done, with 3.x-dev, Drupal 9, and some test content (umami) with Acquia Search/Connector. The latest release is incompatible, but head of Solarium 3.x works just fine. It'd be nice if a tag for the latest code out of the 3.x branch was rolled.
This patch fixes one thing Drupal rector didn't find, but was caught when I tried to load the site status page. It also bumps the solarium requirement
Comment #5
ben.hamelin CreditAttribution: ben.hamelin at Oomph, Inc. commentedJust following here, same boat. Acquia hosted site being built in D9.
Comment #6
mkalkbrennerI understand that there's a wish to add support for Drupal 9 to 8.x-1.x.
But beside other organizational tasks, some more things are required to consider this patch to be committed:
Comment #7
mkalkbrennerI migrated the 8.x-1.x from travis to github actions:
https://github.com/mkalkbrenner/search_api_solr/actions
Currently the tests are using PHP 7.3 and pass. PHP 7.4 will immediately lead to errors because of solarium 3.
@japerry you can now start creating PRs on github for your patches, namely the port to solarium 6 and Drupal 9.
BTW the small adjustments to the Solr configs will not affect existing indexes!
Comment #8
mkalkbrennerComment #10
mkalkbrenner