Problem/Motivation

\Drupal\fastly\Api::__construct is using the wrong type hint for the messenger service. Causing a fatal error when installing the Drupal Canvas module.

 TypeError: Drupal\fastly\Api::__construct(): Argument #10 ($messenger) must be of type Drupal\Core\Messenger\Messenger, Drupal\canvas\Messenger given in Drupal\fastly\Api->__construct() (lin  
  e 145 

Steps to reproduce

- Install Drupal Canvas
- or override the messenger service and rebuild container

Proposed resolution

Replace the type with \Drupal\Core\Messenger\MessengerInterface

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork fastly-3555387

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

marcusml created an issue. See original summary.

marcusml’s picture

Status: Active » Needs review
berdir’s picture

Status: Needs review » Reviewed & tested by the community

Types should always use interfaces, makes sense.

richo_au’s picture

I have also confirmed this does indeed fix the issue. Thank you for the patch!

I've reached out to our Fastly account team to ask them if this can please be reviewed and put in to a 4.0.5 release.

  • harmony7 committed b8ed99fb on 4.0.x-dev authored by marcusml
    Issue #3555387: TypeError when installing Drupal Canvas module
    
pameeela’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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