- Issue created by @IT-Cru
I got the same message:
[success] Finished performing updates.
PHP Fatal error: Declaration of Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::__sleep() must be compatible with Drupal\search_api\Backend\BackendPluginBase::__sleep(): array in /var/www/html/web/modules/contrib/search_api_solr/src/Plugin/search_api/backend/SearchApiSolrBackend.php on line 5077Fatal error: Declaration of Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::__sleep() must be compatible with Drupal\search_api\Backend\BackendPluginBase::__sleep(): array in /var/www/html/web/modules/contrib/search_api_solr/src/Plugin/search_api/backend/SearchApiSolrBackend.php on line 5077
[warning] Drush command terminated abnormally.
Failed to run drush updb: exit status 1
albertho ~/Documents/uw-deohs-web [06-27] $ ddev drush ws
PHP Fatal error: Declaration of Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::__sleep() must be compatible with Drupal\search_api\Backend\BackendPluginBase::__sleep(): array in /var/www/html/web/modules/contrib/search_api_solr/src/Plugin/search_api/backend/SearchApiSolrBackend.php on line 5077Fatal error: Declaration of Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::__sleep() must be compatible with Drupal\search_api\Backend\BackendPluginBase::__sleep(): array in /var/www/html/web/modules/contrib/search_api_solr/src/Plugin/search_api/backend/SearchApiSolrBackend.php on line 5077
[warning] Drush command terminated abnormally.
Failed to run drush ws: exit status 1
albertho ~/Documents/uw-deohs-web [06-27] $ ddev drush cr
PHP Fatal error: Declaration of Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::__sleep() must be compatible with Drupal\search_api\Backend\BackendPluginBase::__sleep(): array in /var/www/html/web/modules/contrib/search_api_solr/src/Plugin/search_api/backend/SearchApiSolrBackend.php on line 5077- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
See the fix in Search API OpenSearch ๐ Handle missing return type in __wakeup() Fixed
- Status changed to Needs review
5 months ago 12:58pm 18 June 2024 - Status changed to Needs work
5 months ago 8:21am 20 June 2024 - ๐ซ๐ฎFinland sokru
I think we need to add the return type also in __wakeup() like in ๐ Handle missing return type in __wakeup() Fixed
- ๐ซ๐ทFrance berramou
It works for me without implementation __wakeup(), it doesn't seems necessary because the parent BackendPluginBase already implementing __wakeup method.
/** * Implements the magic __wakeup() method. * * Reloads the server entity. */ public function __wakeup(): void { parent::__wakeup(); if ($this->serverId) { $this->server = Server::load($this->serverId); $this->serverId = NULL; } }
- Status changed to Closed: duplicate
5 months ago 9:26am 21 June 2024 - ๐ซ๐ฎFinland sokru
This is already committed on ๐ Add a return type hint to SearchApiElasticsearchBackend::__sleep() Fixed , I'll make a new release soon.