PHP 8.2, deprecated dynamic property disabledOnServer

Created on 18 October 2023, about 1 year ago
Updated 9 November 2023, about 1 year ago

Respect the submission guidelines above! Drupal.org issue forks cause additional work for the project maintainer!

Setup

  • Solr version:
  • Drupal Core version:
  • Search API version:
  • Search API Solr version: 4.3.0
  • Configured Solr Connector:

Issue

With PHP 8.2 deprecating dynamic properties, got scanning over modules in general, and found that there's a \Drupal\search_api_solr\SolrConfigInterface::$disabledOnServer property claimed to exist, despite properties not being allowed in interface definitions:
https://git.drupalcode.org/project/search_api_solr/-/blob/8eead246cc8255...

Unsure how best to resolve. Thinking, one of:
- add directly to the AbstractSolrEntity ( https://git.drupalcode.org/project/search_api_solr/-/blob/4.x/src/Entity... ) class
- introduce a trait dealing with the property, with setter and accessor methods defined by an interface implemented in the trait, use the trait in AbstractSolrEntity. Also, change up code to make use of the setter and accessor methods, instead of touching the property directly.
- something else?

📌 Task
Status

Fixed

Version

4.0

Component

Code

Created by

🇨🇦Canada adam-vessey PE, Canada

Live updates comments and jobs are added and updated live.
  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024