- Issue created by @trickfun
- ๐ต๐ฑPoland besek
I had the same issue and I've installed patch from https://www.drupal.org/project/search_api_solr/issues/3449292 ๐ Fatal error Declaration of Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::__sleep() Fixed
After installing patch, the error changed to:PHP Fatal error: Declaration of Drupal\Core\DependencyInjection\DependencySerializationTrait::__wakeup() must be compatible with Drupal\search_api\Backend\BackendPluginBase::__wakeup(): void in /var/www/html/web/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php on line 74 Fatal error: Declaration of Drupal\Core\DependencyInjection\DependencySerializationTrait::__wakeup() must be compatible with Drupal\search_api\Backend\BackendPluginBase::__wakeup(): void in /var/www/html/web/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php on line 74
- ๐ฉ๐ชGermany jurgenhaas Gottmadingen
This update also breaks elasticsearch_connector โ . It's bad practice to change declarations within a minor update, for BC that needs to be a major update.
Core 10.2 & 10.3 does not have __sleep() :array & __wakeup() :void changes (return type is not set) into "DependencySerializationTrait", just has it core 11 (it was included but reverted into 3425537), making a patch just for the transition time for core 10 for those using search api solr.
https://git.drupalcode.org/project/drupal/-/blob/10.3.x/core/lib/Drupal/...
https://git.drupalcode.org/project/drupal/-/blob/10.3.x/core/lib/Drupal/...https://git.drupalcode.org/project/drupal/-/blob/11.0.x/core/lib/Drupal/...
https://git.drupalcode.org/project/drupal/-/blob/11.0.x/core/lib/Drupal/...Patch from comment ๐ Declaration of Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::__sleep() must be compatible Active fixes the issue alongside with patch from the related issue.
- ๐ต๐ฑPoland besek
Thanks @CRZDEV
Patch from #7 ๐ Declaration of Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::__sleep() must be compatible Active works well. Although its name is bit confusing, because it suggests patch is form search_api_solr, while it is for search_api :)After upgrade of Search API to 8.x-1.35 I could get everything to work correctly after applying two patches:
https://www.drupal.org/project/search_api_solr/issues/3449292 ๐ Fatal error Declaration of Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::__sleep() Fixed for Search API SOLR
https://www.drupal.org/project/search_api/issues/3454939#comment-15642321 ๐ Declaration of Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::__sleep() must be compatible Active for Search APILooks like both modules needs to be released to have those issues covered in Drupal<11
Yeah srry for that, i was not sure if that fix was going to work also for other module combinations like opensearch or elasticsearch, that was the only reason for using that name. Thanks for checking anyway!
- ๐ซ๐ทFrance Julien Tekrane
Julien Tekrane โ made their first commit to this issueโs fork.
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
This was fixed in Search API OpenSearch by overriding
\Drupal\Core\DependencyInjection\DependencySerializationTrait::__wakeup()
to add a return type. See ๐ Handle missing return type in __wakeup() Fixed - ๐ฉ๐ชGermany jan kellermann
For D10 I need these 3 patches:
Issue #3454939 (search_api):
- https://www.drupal.org/files/issues/2024-06-17/3454939-search-api-solr-c... โ
- https://git.drupalcode.org/project/search_api/-/merge_requests/148.diff (Commit #eb63433e4a229613836c24811d7aa82b37ff7db4)Issue #3449292 (search_api_solr):
- https://www.drupal.org/files/issues/2024-06-17/search-api-solr-fatal-err... โ - ๐ซ๐ทFrance duaelfr Montpellier, France
Following the lead of Search API OpenSearch shown in #14 I opened an issue on Search API SolR queue: ๐ Declaration of Drupal\Core\DependencyInjection\DependencySerializationTrait::__wakeup() must be compatible Needs review
- ๐ฉ๐ชGermany mkalkbrenner ๐ฉ๐ช
Not all patches mentioned here are the correct ones for Search API Solr.
I'm preparing a new Search API Solr release. - ๐ฌ๐งUnited Kingdom 2dareis2do
rolling back solr_api from 1.35 to 1.34 seems to fix the issue for me for now.
- ๐ฎ๐ณIndia bala_28 Chennai
A temporary fix until search_api_solr fixes from its end.
- Status changed to RTBC
6 months ago 2:25pm 18 June 2024 - Status changed to Needs work
6 months ago 4:06pm 18 June 2024 - ๐ฉ๐ชGermany mkalkbrenner ๐ฉ๐ช
This patch in #20 can't be applied. It would break the Drupal 11 compatibility which is already declared in composer.json and info.yml.
- Status changed to Fixed
6 months ago 4:32pm 18 June 2024 - ๐ฉ๐ชGermany mkalkbrenner ๐ฉ๐ช
Search API Solr should be compatible to Search API 1.35 and to Drupal 10 & 11
https://www.drupal.org/project/search_api_solr/releases/4.3.4 โ Automatically closed - issue fixed for 2 weeks with no activity.