Problem/Motivation
#3016388: Manual cleanup process for obsolete composite entities provides a way to remove obsolete composite entities in a batch process through the user interface. It would be nice to have an option to trigger such operation via Drush.
Proposed resolution
Implement a Drush command to remove obsolete composite entities in a batch process.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 3081700-10.patch | 5.85 KB | chr.fritsch |
| #4 | err-drush-command.patch | 6.44 KB | moshe weitzman |
Comments
Comment #2
mbovan commentedPostponed until #3016388: Manual cleanup process for obsolete composite entities gets committed.
Comment #3
berdirComment #4
moshe weitzman commentedQuite easy now that the service is there. Thanks for that.
Comment #5
richardbporter commentedThe patch in #4 worked well for us.
Comment #6
berdirI suppose the addition of the composer.json file somehow breaks dev dependencies, even though they seem to be still added?
Lets add diff as a require-dev dependency and remove the test_dependencies key in .info.yml to see if that helps.
why this change? Seems to be causing coding standard errors.
Comment #7
moshe weitzman commentedYou can omit the composer.json and doxygen change if you want. You do have to
Remove the array type hint since drush passes an iterable object and not an array during batch processing.
Comment #8
berdirHm, that seems a bit unfortunate change in drush if it's not compatible then with core batch handling :)
anyway, we can remove the type hint, but we need to have a type or multiple types in the @param docs, otherwise phpcs complains.
Comment #9
moshe weitzman commentedDrush has passed an Iterable for years. It didn't matter back then since nobody used type hints! A module can type hint on Iterable if it only supports PHP 7.1+. See https://steemit.com/php/@crell/php-never-type-hint-on-arrays. And yes, the whole situation is slightly unfortunate.
As for the Doxygen, it would be valid to use
Iterable|arrayor justIterableComment #10
chr.fritschRemoved the composer.json changes and changed the doc comment.
Comment #11
manu manuWorks well for me, thanks !
RTBC +1
Comment #13
berdirThanks, committed.