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.

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dpi created an issue. See original summary.

dpi’s picture

Assigned: dpi » Unassigned
Status: Active » Needs review

I dont have the bandwidth to update to V4 at this time, and this issue is blocking internal improvements, so this MR has been created.

  • gbyte committed 3711a37 on 8.x-3.x
    Issue #3264420 by gbyte, dpi: Simple Sitemap should typehint...
gbyte’s picture

Category: Bug report » Task
Status: Needs review » Fixed

Not 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.

dpi’s picture

Well, normal customisations to Drupal were breaking because of this ;)

Thanks anyhow <3

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.