Problem/Motivation

The entity:delete Drush command could use some special handling when the Trash module is installed.

Proposed resolution

I propose adding the following option to the entity:delete Drush command through the use of hooks:
--skip-trash: Permanently delete entities instead of moving to the trash. This includes already trashed entities.

It would be nice to have the possibility to only permanently delete new entities instead of both new and already trashed entities, but it seems like this isn't possible by only switching contexts.

Issue fork trash-3569649

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

dieterholvoet created an issue. See original summary.

dieterholvoet’s picture

Status: Active » Needs review
amateescu’s picture

Status: Needs review » Needs work

I like the approach here, left some comments on the MR.

I assume this works with the 3.x branch as well (which still supports Drupal 10.3), right?

dieterholvoet’s picture

Status: Needs work » Needs review

I assume this works with the 3.x branch as well (which still supports Drupal 10.3), right?

Looks like the 3.x has the same minimum Drush version, so yes.

amateescu’s picture

Status: Needs review » Fixed

Merged into 3.1.x and backported to 3.x, thanks!

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.