PDF gnerators can't be managed by the service container

Created on 28 July 2021, over 3 years ago
Updated 10 November 2023, about 1 year ago

Problem/Motivation

When resolving mpdf from the service container you'll get the following error

Mpdf/MpdfException with message 'Cannot write to an undeclared property Mpdf/Mpdf::$_serviceId'

Steps to reproduce

Drupal::service('mpdf');

Proposed resolution

Remove it from services.yml

Remaining tasks

Going to create a PR

User interface changes

None

API changes

There shouldn't be any API changes since 99.9% of users would be instantiating mpdf themselves with their config. This is what this module is doing in MpdfGenerator too, so should be fine to remove it.

Data model changes

None.

πŸ’¬ Support request
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024