[Request for opinions] Customize "cascade", add additional attribute node for relations, support trait manipulation
Hello,
I'm using the ClassSourceManipulator to add a ManyToMany relation on generated classes (actually traits).
I need things that seems not possible for now :
- Adding an ORM\JoinTable and ORM\InverseJoinColumn close to the ORM\ManyToMany attribute node https://github.com/symfony/maker-bundle/pull/1318
- Specifying cascade: ['persist'] https://github.com/symfony/maker-bundle/pull/1323
- Manipulate a trait (I actually replace the "trait" string with "class" before instantiate ClassSourceManipulator and replace back after getting the manipulated source code) https://github.com/symfony/maker-bundle/pull/1319
I cloned the repository and made three pull requests on the fork here : https://github.com/trislem/maker-bundle/pulls
Do you think it can be useful to add those possibilities to the Maker bundle so I can prepare clean pull requests ?
Cheers
Hi!
That seems reasonable, as long as the code that maker generates doesn’t change and we get some nice tests:). The manipulator IS internal, so not intended to be used directly, and because it’s internal, we don’t guarantee BC. However, as long as you know that, I’m not against adding a few things to make your life easier :).
cheers!
Hi,
Understood for the internal advice. Anyway, it's a pretty awesome tool ! The three PR were made, waiting for CI to complete eventually.
Cheers !