Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add field:base-info command #4930

Merged
merged 4 commits into from Dec 17, 2021
Merged

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.

None yet

2 participants