Skip to content

Commit

Permalink
Add missing limit option to entity:save (#6169)
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman authored Nov 22, 2024
1 parent 344ffc9 commit f206216
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Commands/core/EntityCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public function doDelete(string $entity_type, array $ids): void
#[CLI\Option(name: 'bundle', description: 'Restrict to the specified bundle. Ignored when ids is specified.')]
#[CLI\Option(name: 'exclude', description: 'Exclude certain entities. Ignored when ids is specified.')]
#[CLI\Option(name: 'chunks', description: 'Define how many entities will be loaded in the same step.')]
#[CLI\Option(name: 'limit', description: 'Limit on the number of entities to save.')]
#[CLI\Option(name: 'publish', description: 'Publish entities as they are saved. ')]
#[CLI\Option(name: 'unpublish', description: 'Unpublish entities as they are saved.')]
#[CLI\Option(name: 'state', description: 'Transition entities to the specified Content Moderation state. Do not pass --publish or --unpublish since the transition state determines handles publishing.')]
Expand All @@ -119,7 +120,7 @@ public function doDelete(string $entity_type, array $ids): void
#[CLI\Usage(name: 'drush entity:save user', description: 'Re-save all users.')]
#[CLI\Usage(name: 'drush entity:save node --chunks=5', description: 'Re-save all node entities in steps of 5.')]
#[CLI\Version(version: '11.0')]
public function loadSave(string $entity_type, $ids = null, array $options = ['bundle' => self::REQ, 'exclude' => self::REQ, 'chunks' => 50, 'publish' => false, 'unpublish' => false, 'state' => self::REQ]): void
public function loadSave(string $entity_type, $ids = null, array $options = ['bundle' => self::REQ, 'exclude' => self::REQ, 'chunks' => 50, 'publish' => false, 'unpublish' => false, 'state' => self::REQ, 'limit' => null]): void
{
if ($options['publish'] && $options['unpublish']) {
throw new \InvalidArgumentException(dt('You may not specify both --publish and --unpublish.'));
Expand Down

0 comments on commit f206216

Please sign in to comment.