Update for Drupal 10/11.
Issue fork delete_users_csv-3524951
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:
Update for Drupal 10/11.
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
Comment #3
liam morlandComment #5
liam morlandWhat is the reason for using dependency injection and non-static methods for this? This way it will have to persist an instance of
DeleteUsersBatchin the batch process. I don't think that is an improvement.Comment #6
syam kumar commentedI agree with your point, and I would like to add a few observations:
1. Single Job Execution Issue:
In the current implementation, all users deletion activities are being executed within a single batch job operation. This design does not differ significantly from a traditional, monolithic deletion process. The primary advantage of batch jobs is to efficiently manage resources by breaking operations into smaller, manageable chunks.
2. Dynamic Service Loading:
The required Drupal services are currently being loaded dynamically, which is typically more suited for procedural code (e.g., within `.module` files). However, Drupal best practices recommend using Dependency Injection (DI), especially in object-oriented components such as services, controllers, and plugins. Additionally using DI, makes it significantly easier to write unit tests.
Comment #25
liam morland