Drush command should use interfaces.

Created on 23 March 2023, over 1 year ago
Updated 20 April 2023, over 1 year ago

Problem/Motivation

Currently the Drush command file is using classes instead of interfaces in its constructor:

public function __construct(FileSystem $file_system, ModuleHandler $module_handler) {

Using the FileSystem class especially can cause problems when other modules override the file system with their own classes, such as how the S3 File System module allows for.

Proposed resolution

Switching FileSystem and ModuleHandler references to interfaces retains the same functionality but makes it much more extensible. That's what the attached patch does.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jacobbell84

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

Comments & Activities

Production build 0.71.5 2024