Skip to content

Add field:base-info command#4930

Merged
weitzman merged 4 commits intodrush-ops:11.xfrom
DieterHolvoet:base-field-info
Dec 17, 2021
Merged

Add field:base-info command#4930
weitzman merged 4 commits intodrush-ops:11.xfrom
DieterHolvoet:base-field-info

Conversation

@DieterHolvoet
Copy link
Contributor

@DieterHolvoet DieterHolvoet commented Dec 12, 2021

This PR adds a command to show information about base fields, similar to #4928. It has already been used in multiple projects as part of the wmscaffold module and is in my opinion stable enough to be considered to be merged in Drush.

Remarks

Test scenarios

  • ./vendor/bin/drush bfi => Not enough arguments (missing: "entityType").
  • ./vendor/bin/drush bfi node => Lists the default columns
  • ./vendor/bin/drush bfi node --fields=field_name,field_type => Lists only the field name and field type columns

TODO

  • Add tests

@weitzman
Copy link
Member

weitzman commented Dec 17, 2021

  • Needs some updating as AskBundleTrait no longer exists
  • Lets keep using field as the command namespace IMO. So field:info-base (or field:base-info to go along with field:base-override).
  • I will finish tests once above are done.
  • One all field commands are in, lets move them and the traits to a new Drupal\Commands\field namespace. They are currently in Drupal\Commands\Core

+ change class type hints to interfaces
+ fix renamed traits
+ make entityType argument optional
@DieterHolvoet DieterHolvoet changed the title Add base-field:info command Add field:base-info command Dec 17, 2021
@DieterHolvoet
Copy link
Contributor Author

  • I will finish tests once above are done.

I did the changes.

@weitzman weitzman merged commit 8730cdb into drush-ops:11.x Dec 17, 2021
@DieterHolvoet DieterHolvoet deleted the base-field-info branch December 18, 2021 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants