Problem/Motivation

Various classes typehint the injected date.formatter service with the default implementation rather than the interface.This leads to problem like when modules try to decorate or override the service.

Steps to reproduce

Decorate or replace date.formatter with a different class.

Proposed resolution

Typehint constructor with interface, not concrete implementation.

User interface changes

Nil

API changes

Nil

Data model changes

Nil

Issue fork diff-3313385

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:

Comments

dpi created an issue. See original summary.

dpi’s picture

Assigned: dpi » Unassigned
Status: Active » Needs review
acbramley’s picture

Status: Needs review » Reviewed & tested by the community

Nice one

acbramley’s picture

Any chance of getting this committed?

  • acbramley committed 077bdf2c on 8.x-1.x authored by dpi
    Issue #3313385 by dpi, acbramley: Diff should typehint DateFormatter...
acbramley’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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