This issue is for version 3 of the project, which I understand is still receiving bug fixes. V4 already had this issue corrected via a bulk coding standards improvement in #3018715: Coding standards.
Problem/Motivation
\Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGenerator\SitemapGeneratorBase
and \Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\ArbitraryUrlGenerator
classes currently typehint the default ModuleHandler class instead of the interface. This prevents custom overrides of ModuleHandler, for example by https://drupal.org/project/hux
Steps to reproduce
Install Hux and Simple Sitemap.
Navigate to a page which triggers either class to be instantiated.
Result: Uncaught WSOD/Exception.
Proposed resolution
Typehint the property with interface.
Remaining tasks
Review and commit.
User interface changes
Nil.
API changes
Nil.
Data model changes
Nil.
Issue fork simple_sitemap-3264420
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 #3
dpiI dont have the bandwidth to update to V4 at this time, and this issue is blocking internal improvements, so this MR has been created.
Comment #5
gbyte CreditAttribution: gbyte as a volunteer and at gbyte commentedNot a bug and I'm not a fan of putting non-critical effort into 3.x anymore as - as you say - 4.x does it correctly, but I've commited it.
Comment #6
dpiWell, normal customisations to Drupal were breaking because of this ;)
Thanks anyhow <3