Problem/Motivation
From #3123491: make it easier to instantiate ConfigImporter:
> I want to avoid swapability at all costs here. Supporting alternate implementations of the ConfigImporter and StorageComparer makes me feel very uneasy. [SNIP]
> I wish \Drupal\Core\Config\StorageComparerInterface did not exist. Perhaps we can move all the docs to the StorageComparer and change the typehint on \Drupal\Core\Config\ConfigImporter::__construct() to StorageComparer|StorageComparerInterface and deprecate the interface.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3410037
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
wim leersComment #3
bircherAh excellent! We discussed this on slack the other day and concluded that it should never have been an interface.
Comment #5
chris_tomasso commentedHello,
I will work on this one!
Comment #8
binoli lalani commentedHello,
I fixed the Phpunit testcases error. Please review the MR.
Thanks!
Comment #9
bircherI think that this is not correct.
Because with this MR the comparer doesn't implement the interface this will break custom or contrib code which typehints the interface but then passes in a normal comparer. Also this MR does not add the deprecated tag on the interface.
I don't know of the top of my head what other interfaces have been deprecated but looking for one and following the example would be good.
Comment #10
binoli lalani commentedHello,
Thank you for reviewing the MR.
I added a deprecated tag in the interface and found 2 issues where an interface is deprecated and it's removed from the class where it implements.
Reference issues: https://www.drupal.org/project/drupal/issues/3354584, https://www.drupal.org/project/drupal/issues/2266817
I updated the code in the MR. Please review.
Thanks!
Comment #11
smustgrave commentedWill need a change record and that's what deprecation link should point to
Probably need a deprecation test too
May want to see if we are good to deprecate though.
Comment #12
chris_tomasso commentedHello,
I've removed an unnecessary @trigger_error that I didn't believe was required.
I hope this change aligns with your expectations.
You can review the changes here: Merge Request #6902.
Additionally, I’ve included the test and change record as requested by smustgrave.
Let me know if there's anything.
Comment #13
karimb commentedComment #14
joachim commentedThe version needs updating, but apart from that looks good.