Consider replacing qr-code-bundle dependency with the base (non-Symfony) library

Created on 26 September 2023, about 1 year ago
Updated 25 October 2023, about 1 year ago

Problem/Motivation

Currently we are using the endroid/qr-code-bundle library which is a Symfony wrapper around the base library endroid/qr-code. The Symfony wrapper comes with a large number of additional dependencies that need to be installed:

  1. symfony/cache
  2. symfony/cache-contracts
  3. symfony/finder
  4. symfony/framework-bundle
  5. symfony/options-resolver
  6. symfony/property-access
  7. symfony/property-info
  8. symfony/twig-bridge
  9. symfony/twig-bundle
  10. symfony/var-exporter

None of these dependencies add any value for us as a Drupal module, but it does add to the maintenance burden.

Since the only actual code we are using from endroid/qr-code-bundle is the QrCodeResponse class which consists of 1 single line of code, maybe we can incorporate this into the module, and lose all the ballast?

Proposed resolution

  • Copy the 1 line of code from QrCodeResponse into our class QrImageResponse.
  • Change Composer dependency from endroid/qr-code-bundle to endroid/qr-code.
✨ Feature request
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia

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

Comments & Activities

Production build 0.71.5 2024