-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
[make:*] Fluent setters bundle configuration option #436
base: main
Are you sure you want to change the base?
Conversation
Are you going to finish it @prugala? |
@maks-rafalko oh I forgot about it. Yes I will finish it. I will try to add tests and update docs this week. |
c4e119d
to
88e8116
Compare
OK I added tests and updated doc section. |
Any news about this PR? |
@AlboCode I see conflicts, I will fix it tomorrow and will ask about merge :) |
Thanks 👍 |
# Conflicts: # src/Maker/MakeUser.php # src/Resources/config/makers.xml # tests/Doctrine/EntityRegeneratorTest.php # tests/Maker/FunctionalTest.php
Sorry for ping but PR is old and I forgot to end it before. Now its ready with tests. @nicolas-grekas @weaverryan and docs change so @javiereguiluz :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Besides what I reviewed in your code, I think that your forgot to update one maker, the MakeRegistrationForm.
https://github.com/symfony/maker-bundle/blob/master/src/Maker/MakeRegistrationForm.php#L309 : Here it can update a user class with a isVerified property and its setter that is fluent by default.
I think something like that should do the trick:
$userManipulator = new ClassSourceManipulator(
file_get_contents($classDetails->getPath()),
true,
true,
$generator->getFluentSetters()
);
Jérémy.
@@ -0,0 +1,55 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with the test for this bundle, but I can't figured out where this file is used (The others fixtures files are used in \Symfony\Bundle\MakerBundle\Tests\Maker*).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I forgot about test, added.
This is just what I have been looking for. A must if we want to use maker in applications that have already defined non-fluent interfaces to implement on our entities (Sylius). |
@BatsaxIV thank you again for review. I've added missing parameter there and in few other places. Now All "Manipulators" |
Is there something holding this PR back? |
I resolve conflicts today later and I think all should be ready to merge :) |
Any chance to move this forward? Guys from my team refuse to use maker for entities because of forced fluent interface, which brings whole bunch of new troubles. Yea, it is more about people than code, but this Thanks! |
Since its been some time with this PR, I'd like to take the chance and un-necro it before it gets stale over a year again. I'd love to see this configuration being pushed to prod so that we can go back to non-fluent setters. Thanks everyone involved pushing this forward. |
Sorry to ping again. @prugala just in case you're still contributing to the project, I believe that many people would be happy to see your changes. If not, please let us know so that maybe someone else can take over from here on. 🙏 |
@NopeNopeNope sorry for lack of activity. I'll update PR to current code base today or tomorrow :) |
Based on #297
At the moment we cannot decide that we want to generate fluent or not fluent setters.
I read the discussion in an issue and I added global configuration option: