Skip to content

Commit

Permalink
Add field:create command (#4853)
Browse files Browse the repository at this point in the history
* Add field:create command

* Code style

* Refactor field:create command

* Remove empty legacy command

* phpcs

* Add validators so the new annotations are functional

* Fix some issues + small refactor

- Fix issues when command is called non-interactively
- Improve handling of entity types without bundles

* Improve various prompts

* Add LinkHooks

* Apply phpcs fixes

* Add tests, and misc unrelated improvements

* PHPCS

* Try getSimplifiedErrorOutput()

* Fix UserCancelTest

* Less string

* Revert unneeded test case changes.

Co-authored-by: Moshe Weitzman <weitzman@tejasa.com>
  • Loading branch information
DieterHolvoet and weitzman committed Dec 2, 2021
1 parent 3d29582 commit 0b5ab2b
Show file tree
Hide file tree
Showing 13 changed files with 978 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .ddev/config.yaml
Expand Up @@ -17,4 +17,4 @@ composer_version: ""
disable_settings_management: true
web_environment:
- UNISH_DB_URL=mysql://root:root@db
- PHP_EXTENSIONS_DISABLE=uploadprogress
- DRUSH_OPTIONS_URI=$DDEV_PRIMARY_URL
4 changes: 4 additions & 0 deletions .ddev/web-build/Dockerfile
@@ -0,0 +1,4 @@
# See https://stackoverflow.com/a/67092243/265501
ARG BASE_IMAGE
FROM $BASE_IMAGE
RUN echo 'export PATH="$PATH:/var/www/html"' > /etc/bashrc/commandline-addons.bashrc
12 changes: 0 additions & 12 deletions src/Commands/LegacyCommands.php
Expand Up @@ -129,18 +129,6 @@ public function download()
{
}

/**
* field-create has been removed. Please try `generate field` command.
*
* @command field:create
* @aliases field-create
* @hidden
* @obsolete
*/
public function field()
{
}

/**
* core:execute has been removed. Please try `site:ssh` command.
*
Expand Down
1 change: 0 additions & 1 deletion src/Commands/ValidatorsCommands.php
Expand Up @@ -12,7 +12,6 @@
*/
class ValidatorsCommands
{

/**
* Validate that passed entity names are valid.
* @see \Drush\Commands\core\ViewsCommands::execute for an example.
Expand Down

0 comments on commit 0b5ab2b

Please sign in to comment.