-
-
Notifications
You must be signed in to change notification settings - Fork 423
[make:crud] Rename add
method of repository to save
.
#1169
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
Conversation
This PR was merged into the 1.0-dev branch. Discussion ---------- Add `make:twig-component` maker Adds a maker for `symfony/ux-twig-component`/`symfony/ux-live-component`. **Creating a _standard_ twig component:** ```bash bin/console make:twig-component The name of your twig component (ie NotificationComponent): > Notification Make this a live component? (yes/no) [no]: # (defaults to yes if symfony/ux-live-component installed) > no created: src/Twig/Components/NotificationComponent.php created: templates/components/notification.html.twig Success! ``` ```php // src/Twig/Components/NotificationComponent.php <?php namespace App\Twig\Components; use Symfony\UX\TwigComponent\Attribute\AsTwigComponent; #[AsTwigComponent('notification')] final class NotificationComponent { } ``` ```twig {# templates/components/notification.html.twig #} <div{{ attributes }}> <!-- component html --> </div> ``` --- **Creating a _live_ twig component:** ```bash bin/console make:twig-component --live # fails if symfony/ux-live-component is not installed The name of your twig component (ie NotificationComponent): > Notification created: src/Twig/Components/NotificationComponent.php created: templates/components/notification.html.twig Success! ``` ```php // src/Twig/Components/NotificationComponent.php <?php namespace App\Twig\Components; use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\DefaultActionTrait; #[AsLiveComponent('notification')] final class NotificationComponent { use DefaultActionTrait; } ``` ```twig {# templates/components/notification.html.twig #} <div{{ attributes }}> <!-- component html --> </div> ``` Ref: symfony/ux#108 Commits ------- acde364 add make:twig-component maker
@bdaler I just merged in a few CI fixes, can you do a rebase please? |
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.
Looks good to me, we just need passing tests that are related to this PR.
…o renameControllerMethod.1138
IMHO "add" is more consistent with the concept of collection, but I don't have anything against "save" |
The commit history looks a bit mashed up in this PR. Closing in favor of #1204 which contains cherry-picked changes from this PR. |
add
method of repository tosave