Problem/Motivation
I ran modules/contrib/bibcite/modules/bibcite_import/tests/src/Kernel/ImportBasicTest.php locally and got a deprecation notice:
Defining Drupal\bibcite_entity\Normalizer\ContributorNormalizer::supportedInterfaceOrClass property is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use getSupportedTypes() instead. See https://www.drupal.org/node/3359695
Since this module already aims to be compatible with Drupal 11, I am setting the Priority to Major.
I have not tested on Drupal 11.
Steps to reproduce
Proposed resolution
- Implement
getSupportedTypes()as described in the change record https://www.drupal.org/node/3359695. - Remove the deprecated property
supportedInterfaceOrClass.
Remaining tasks
User interface changes
None
API changes
The deprecated property is protected, so it is not part of the API.
The new method is public, but it is implemented in the base class since Drupal 10.1.0, so I do not think this counts as an API addition.
Data model changes
None
Issue fork bibcite-3585052
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
benjifisherIn fact,
getSupportedTypes()was added in #3362645: Declaration of Drupal\bibcite_bibtex\Encoder\BibtexEncoder::encode($data, $format, array $context = []) must be compatible with Symfony\Component\Serializer\Encoder\EncoderInterface::encode(mixed $data, string $format, array $context = []): string. All we have to do now is remove the deprecated property.While I was at it, I replaced the class with the interface.
Comment #4
benjifisherComment #5
mark_fullmerSince https://www.drupal.org/node/3359695 specifies that the new logic was introduced in Drupal 10.1, and that "Modules may want to implement both methods for compatibility with Drupal 10.0 and 9.5," I think that we would either need to update Bibcite's minimum compatibility from Drupal 10.0 to 10.1, or if the presence of these classes that are removed in Drupal 11.0 aren't causing errors, postpone the removal of the backwards compatible methods until something else forces the update of Bibcite's minimum compatibility.
I'm tentatively feeling we can let this ride until Drupal 12 is released later this year, at which point I would be fine setting new Bibcite releases' minimum Drupal compatibility to 11.0.
Comment #6
benjifisherThis issue targets the 3.0.x branch, and I already see
in
bibcite.info.yml.Comment #7
mark_fullmerThanks! I was looking at the 3.0.1 release. Merged!
Comment #8
mark_fullmer