-
-
Notifications
You must be signed in to change notification settings - Fork 364
Symfony UX Turbo: content negotiation and Doctrine integration #64
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
refactor: decouple Broadcast from Twig and Mercure
ci: add PHP-CS-Fixer and PHPStan
* test: add UI tests * Fix @nicolas-grekas' review
This will make it so that an invalid form is rendered correctly
* /Users/dunglas/workspace/hotwire-bundle: prepare merge in symfony/ux tweaking how the cloned form is used in the docs (symfony#12) updating stream media type to match changes in Turbo (symfony#11) ci: setup GitHub Actions (symfony#8) fix: regressions introduced in #5 (symfony#7) Relax minimum php version (#5) fix: various quality improvements (symfony#6) test: add UI tests (#4) ci: add PHPStan ci: add PHP-CS-Fixer refactor: broadcast template conventions and config refactor: decouple Broadcast from Twig and Mercure feat: initial implementation
jdreesen
reviewed
Mar 2, 2021
soyuka
reviewed
Mar 3, 2021
jdreesen
reviewed
Mar 3, 2021
Co-authored-by: Antoine Bluchet <[email protected]>
Tweaks and review
Add $options to BroadcastListener::broadcast()
* 'turbo' of github.com:dunglas/ux: Add $options to BroadcastListener::broadcast() - Tweaks and review
Add generic TwigBroadcaster
chalasr
approved these changes
Mar 29, 2021
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 solid!
|
||
if ($this->doctrine && $em = $this->doctrine->getManagerForClass($entityClass)) { | ||
return $em->getClassMetadata($entityClass)->getIdentifierValues($entity); | ||
} |
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.
nice :)
chalasr
added a commit
to symfony/symfony
that referenced
this pull request
Mar 30, 2021
…r to generate fragments URL (dunglas) This PR was squashed before being merged into the 5.3-dev branch. Discussion ---------- [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix n/a | License | MIT | Doc PR | todo This PR adds a new helper to generate raw fragment URL. Fragments will be useful to generate lazy frames with Symfony UX Turbo (symfony/ux#64). This will also be convenient when using hinclude, ESI etc in case you want full control over the generated HTML. This is also more in sync with the new best practices we apply in the form component (generate the HTML by yourself instead of using Twig helpers hiding the HTML elements). Example: ```html <turbo-frame id="set_aside_tray" src="{{ fragment_uri(controller('Symfony\Bundle\FrameworkBundle\Controller', {template: "foo.html.twig"})) }}"> <img src="/icons/spinner.gif"> </turbo-frame> ``` Commits ------- 5d29d76 [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL
symfony-splitter
pushed a commit
to symfony/http-kernel
that referenced
this pull request
Mar 30, 2021
…r to generate fragments URL (dunglas) This PR was squashed before being merged into the 5.3-dev branch. Discussion ---------- [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix n/a | License | MIT | Doc PR | todo This PR adds a new helper to generate raw fragment URL. Fragments will be useful to generate lazy frames with Symfony UX Turbo (symfony/ux#64). This will also be convenient when using hinclude, ESI etc in case you want full control over the generated HTML. This is also more in sync with the new best practices we apply in the form component (generate the HTML by yourself instead of using Twig helpers hiding the HTML elements). Example: ```html <turbo-frame id="set_aside_tray" src="{{ fragment_uri(controller('Symfony\Bundle\FrameworkBundle\Controller', {template: "foo.html.twig"})) }}"> <img src="/icons/spinner.gif"> </turbo-frame> ``` Commits ------- 5d29d76612 [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL
symfony-splitter
pushed a commit
to symfony/framework-bundle
that referenced
this pull request
Mar 30, 2021
…r to generate fragments URL (dunglas) This PR was squashed before being merged into the 5.3-dev branch. Discussion ---------- [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix n/a | License | MIT | Doc PR | todo This PR adds a new helper to generate raw fragment URL. Fragments will be useful to generate lazy frames with Symfony UX Turbo (symfony/ux#64). This will also be convenient when using hinclude, ESI etc in case you want full control over the generated HTML. This is also more in sync with the new best practices we apply in the form component (generate the HTML by yourself instead of using Twig helpers hiding the HTML elements). Example: ```html <turbo-frame id="set_aside_tray" src="{{ fragment_uri(controller('Symfony\Bundle\FrameworkBundle\Controller', {template: "foo.html.twig"})) }}"> <img src="/icons/spinner.gif"> </turbo-frame> ``` Commits ------- 5d29d76612 [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL
symfony-splitter
pushed a commit
to symfony/twig-bridge
that referenced
this pull request
Mar 30, 2021
…r to generate fragments URL (dunglas) This PR was squashed before being merged into the 5.3-dev branch. Discussion ---------- [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix n/a | License | MIT | Doc PR | todo This PR adds a new helper to generate raw fragment URL. Fragments will be useful to generate lazy frames with Symfony UX Turbo (symfony/ux#64). This will also be convenient when using hinclude, ESI etc in case you want full control over the generated HTML. This is also more in sync with the new best practices we apply in the form component (generate the HTML by yourself instead of using Twig helpers hiding the HTML elements). Example: ```html <turbo-frame id="set_aside_tray" src="{{ fragment_uri(controller('Symfony\Bundle\FrameworkBundle\Controller', {template: "foo.html.twig"})) }}"> <img src="/icons/spinner.gif"> </turbo-frame> ``` Commits ------- 5d29d76612 [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL
* turbo-mercure: run yarn tests for all workspaces - - - fix cs fix build re-add main package.json Fix JS Move Mercure integration to a dedicated bridge
Continued in #71 |
tgalopin
added a commit
that referenced
this pull request
Mar 30, 2021
…ation (dunglas) This PR was merged into the main branch. Discussion ---------- Symfony UX Turbo: content negotiation and Doctrine integration | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | Tickets | Fix #64 | License | MIT Same as #64, just squashed. See there for details and history. Commits ------- 95d5f00 Symfony UX Turbo: content negotiation and Doctrine integration
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces an integration of Hotwire Turbo with Symfony. It has been developed and tested over the past few months by @tgalopin, @nicolas-grekas, @chalasr, @weaverryan and me. It is complementary with #61 (#61 focuses on the integration with Twig while this one focuses on higher level features, #61 will have to be rebased on top of this one).
The best way to discover the features provided by this new component is to read the provided README file. To summarize, it provides:
TODO: