-
Notifications
You must be signed in to change notification settings - Fork 3
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
Class naming convention #12
Comments
That sounds very cool! I don't think that's the case though -- generator classes need to be in the |
That doesn't seem to be correct. A generator in a Drupal module has to be in the An example of a working generator can be found at https://git.drupalcode.org/project/eca/-/blob/2.0.x/modules/development/src/Drush/Generators/ActionGenerator.php?ref_type=heads If we rename the class from |
Ah. You're in the wrong code generator project -- that's Drush code generator stuff. BTW, this code generator, Drupal Code Builder, probably already can generate what you want -- it can generate any type of plugin OOTB. |
Oh, never realized that there are 2 different ones. Thanks for the heads-up. So |
Yup, drupal-code-builder/drupal-code-builder is the code generating library, and Module Builder and this package are just UIs. I don't do very much with this package because I personally prefer the Module Builder UI, but I thought I'd fixed that bug -- maybe I need to make a release or push some code from my local. |
Prompted by your reminder that this package exists, I've updated it for the latest DCB and improved the UI. Try the latest release -- it will already support ECA plugins OOTB. |
Hmm, it looks like this breaks differently now:
This happens for any drush command, since I've update to v10 or this package. When I remove that directory from the code base, Drush works again. |
What version of Drush are you on? It's working fine for me with Drush 12. |
I'm on Drush 12.4.3.0 |
Same version here. |
No backtrace, it's failing in Drush immediately. But yes, I'll dig deeper and open a new issue. |
We're building code generators for some of our Drupal modules (e.g. ECA, DRD and others) and we just found out, that the class name needs to follow the
*Generator
name pattern.Is that really necessary or could that requirement be removed?
I mean, the classes are properly namespaced and come with all the PHP attributes to declare and make them discoverable. Enforcing the generator being part of the class name feels redundant, doesn't it?
The text was updated successfully, but these errors were encountered: