Problem/Motivation

The module registered its Drush commands through drush.services.yml, the legacy mechanism that modern Drush deprecates in favor of PSR-4 discovery of attribute-annotated Symfony Console commands under src/Drush/Commands. All three content commands also lived in one monolithic BlueprintCommands class.

Separately, now that blueprint operations enforce access against the current user, the schema and deserialize commands matter on the CLI: Drush bootstraps as the anonymous user, under which building a schema or saving a deserialized entity would be denied. There is no global --user switch in current Drush to override that.

API changes

  • Removed drush.services.yml (base and entity_blueprint_ai) and the Drupal\entity_blueprint\Commands\BlueprintCommands class.
  • New command classes under Drupal\entity_blueprint\Drush\Commands and Drupal\entity_blueprint_ai\Drush\Commands, plus the reusable RunsAsSelectedUserTrait.
  • New --user option on the schema and deserialize commands.
  • Requires a Drush version that supports PSR-4 attribute-based command discovery (Drush 12+).

Comments

tim bozeman created an issue. See original summary.

tim bozeman’s picture

Issue summary: View changes

  • tim bozeman committed ce2c301c on 1.0.x
    task: #3595056 Move Drush commands to PSR-4 attribute discovery
    
    By: tim...
tim bozeman’s picture

Status: Reviewed & tested by the community » Fixed

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.