Problem/Motivation

I would appreciate it if we could use drush code generator to generate the boilerplate for new services. I'd be happy to provide a basic implementation, which others could build on top of to make it more sophisticated, then.

Is that something the maintainers of this module would consider merging?

CommentFileSizeAuthor
#7 3385117-7.patch3.23 KBaronne
#6 3385117-5-interdiff.patch1.01 KBaronne
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jurgenhaas created an issue. See original summary.

aronne’s picture

Hi @jurgenhaas
yes we'd gladly merge that feature if you're gonna open a MR

Regards,
aronne

jurgenhaas’s picture

Status: Active » Needs review

I've added a first generator with templates which can be called with drush http_client_manager:service. The user gets asked a couple of questions and then a set of files is being created from the given answers.

Note: this is built for the latest version of the code generator, so Drush version 12 is required in this case.

This approach only covers a fraction of the possibilities that this amazing module provides, but it may be an easy starting point for new users. Of course, providing such a code generator generates some sort of default, which users are going to assume is THE way to use this module. I know, this can be opinionated and therefore, the review should really determine, if the output is what you want to deliver as a recommended way of usage.

Whether we want to make the code generator more sophisticated or leave it on its intro level is totally up to the maintainers. For my own use case, where I use it for ECA TV live sessions to show how http client manager and ECA can work together. this is sufficient.

  • jurgenhaas committed 6bc0245a on 9.3.x
    Issue #3385117: Add support for drush code generator
    
aronne’s picture

StatusFileSize
new1.01 KB

I'm gonna upload the interdiff for the latest version.

aronne’s picture

StatusFileSize
new3.23 KB

And this is the whole patch.

  • aronne authored 74e335ab on 9.3.x
    Issue #3385117 by jurgenhaas, aronne: Add support for drush code...
aronne’s picture

Status: Needs review » Fixed
aronne’s picture

Thank you @jurgenhaas for your valuable contribution.
Regards,
aronne

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.