Created on 8 April 2024, 3 months ago
Updated 9 April 2024, 3 months ago

It would be super nice if this module either hijacked the drush generate bundle-class maybe with an --attributes-only flag, or had its own drush command to:

  1. Avoid writing the hook that the current command does
  2. Put attributes on the generated class
✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @darvanen
  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    It doesn't appear that there is a clean way to hook in to drush generators. You can see the generator was added in Add bundle classes generator #4903, we'd probably need override the service class, or possibly decorate it with a symfony service decorator. I don't really want to maintain the logic for that and twig files for generation. Ultimately if ✨ Define bundle classes via attributes Needs work made it in to core then we could shift this responsibility to Drush, therefore this is probably "won't fix" but will leave it open for discussion for now.

  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    Yeah fair enough, if this module is primarily a p.o.c. to support the core feature request it makes sense.

    In the long run though as this is a DX-focussed module I figured it would make sense to ask for this :)

    Happy to wait for that to go through, doesn't seem like there's any opposition to it, just hoops to jump through.

    If I get really bothered by it maybe I'll make my own module to bring them together.

Production build 0.69.0 2024