Chapters
21 Chapters
|
2:23:48
|
Login to bookmark this video
-
Course Code
Login or register to download the code!
Login or register to download the code!
-
This Video
Login or register to download the video!
Login or register to download the video!
-
Subtitles
Login or register to download the subtitles!
Login or register to download the subtitles!
-
Course Script
Login or register to download the script!
Login or register to download the script!
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"symfony/asset": "6.0.*", // v6.0.3
"symfony/console": "6.0.*", // v6.0.3
"symfony/dotenv": "6.0.*", // v6.0.3
"symfony/flex": "^2", // v2.4.5
"symfony/framework-bundle": "6.0.*", // v6.0.4
"symfony/monolog-bundle": "^3.0", // v3.7.1
"symfony/runtime": "6.4.3", // v6.4.3
"symfony/twig-bundle": "6.0.*", // v6.0.3
"symfony/ux-turbo": "^2.0", // v2.0.1
"symfony/webpack-encore-bundle": "^1.13", // v1.13.2
"symfony/yaml": "6.0.*", // v6.0.3
"twig/extra-bundle": "^2.12|^3.0", // v3.3.8
"twig/twig": "^2.12|^3.0" // v3.3.8
},
"require-dev": {
"symfony/debug-bundle": "6.0.*", // v6.0.3
"symfony/stopwatch": "6.0.*", // v6.0.3
"symfony/web-profiler-bundle": "6.0.*" // v6.0.3
}
}
17 Comments
Hi Ryan,
I wrote a comment on Stackoverflow about why fontawesome is not working out of the box
it's here : https://stackoverflow.com/a...
And fun fact this is actually you that explained why in one of your video, so all the credit is on you ;)
Hey Kaizoku!
Haha, OMG, did I really? I have a famously bad memory 😆. I wish FontAwesome would fix that to make things easier! And thanks for posting that answer on Stackoverflow for others - that's very cool of you.
Cheers!
I knoooow I'm early - But my `~bootstrap` isn't working and throws an error on compiling (not found).
If I use `import "../node_modules/bootstrap"` anything works well.
Do you have any hint to fix this?
Hey DSKZPT!
Ha! That's ok that you're early :). Hmm, that is super odd. You have this inside of
assets/styles/app.css?Let me know :).
Cheers!
yeah... my fault, i added it to the app.js 🤦🏻♂️
The good thing in making mistakes - you learn something!
The more mistakes you make, the smarter you get :D
Thanks for your answer and these great tutorials!
Hey DSKZPT!
Ah, awesome! Np. Bootstrap is a weird one... since it provides both JavaScript AND CSS. If you put that import in app.js, it knows to import the Bootstrap JavaScript. But then that SAME import in a CSS file tells Webpack to import the CSS. Pretty cool and pretty smart. But also, a bit magical ;).
Cheers and thanks for the nice words!
Hi I'm running
yarn add bootstrap --devand I get the error below. I'm running this just after runningcomposer require encore:1.14.0(andyarn watch, both ran fine). I'm backtracking steps as in the next lecture when I add<div data-controller="hello"></div>to homepage.html.twig it does not show up on my site.Error when running
yarn add bootstrap --devHey @CindySymf!
Well that is not a fun error! Honestly, it looks like something failed to download - it's super odd. One of the node vendor packages you downloaded is referring to another vendor file... which doesn't appear to be there! That just... shouldn't happen - I can't think of how this could be something that your code is causing.
Try these 2 things:
1) Remove the
node_modules/directory by hand. Then runyarn installagain. Then try it again.2) If that doesn't work, then try
yarn upgradeto upgrade the dependencies. It's possible things are just out-of-date enough that it's causing some weird issue.And let me know how it goes :)
Cheers!
Hello, I've imported Quilljs text styling library:
@import "~quill";But it didn't build.(16:3) node_modules\quill\dist\quill.js Unclosed bracketHow can I solve that? Or isn't Quill compatible with Symfony? Thanks!
Hey Sahetmyrat,
I don't know that library, but it has nothing to do with Symfony, although it may not be compatible with NodeJS. Try importing the JS and CSS files from a JS file. In your
app.jsfile (or any other) add thisCheers!
Hey folks, has there been a change in recent Symfony/Twig versions that would cause variables passed to a Twig template not to be updated on calling render() after a form submit?
That's what I'm seeing when trying to use CraueFormFlowBundle and the lack of variables sent to Twig updating is breaking things. I've validated using logging and {{ dump() }} that the value being sent on render() SHOULD be updated but isn't.
I'm guessing disabling caching might fix this but surely that isn't the best solution.
thanks that was a great course, wishful thinking => can we have the js part in typescript ? :)
Hey @weaverryan
Awesome stuff. Can I use this material to teach my students about introducing Symfony 6?
I am looking forward to your answer.
Hi Santosh kalwar!
Absolutely! This tutorial is totally free and open to anyone. Feel free to use it for your students in any way that you want - that would be great :). If you have any questions, let us know.
Cheers!
Thank you!
Hey there,
I'm not sure why but when using SCSS, if you import vendors in your scss files, vendor styles get compiled into the app.css file instead of in a vendor file. I've been having this problem since the first versions of Encore. The easy fix was to import these vendor scss file from javascript instead but I was wondering if there was a way to do that from the scss files and still get that nice vendor css file?
<br /># app.scss<br />@import '~bootstrap';<br />@import '~@fortawesome/fontawesome-free/scss/fontawesome';<br />@import '~@fontsource/roboto-condensed';<br />Hey julien_bonnier!
Oh really, that's very interesting! This is not something I've noticed before. So, to make sure I understand correctly, when you import from app.scss, Webpack does NOT split the vendor CSS into some node_modules~bootstrap~fortawsome...css type of file, but instead of compiles it straight into app.css with your custom JavaScript. Correct? Hmm. If that's the case, that sounds like some weird, deep behavior: something that would be difficult to track down. My guess is that the SCSS system imports all of that vendor stuff BEFORE webpack becomes aware of it. So by the time Webpack sees all of the content, it's all "coming from app.scss", which is incorrect.
So, unfortunately, I don't have an answer. My best advice is to stick with your workaround, but that's unfortunate!
Cheers!
"Houston: no signs of life"
Start the conversation!