Chapters
23 Chapters
|
2:07:02
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!
Subscribe to download the code!
-
This Video
Subscribe to download the video!
Subscribe to download the video!
-
Subtitles
Subscribe to download the subtitles!
Subscribe to download the subtitles!
-
Course Script
Subscribe to download the script!
Subscribe 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.2",
"ext-ctype": "*",
"ext-iconv": "*",
"babdev/pagerfanta-bundle": "^4.0", // v4.2.0
"doctrine/doctrine-bundle": "^2.7", // 2.10.0
"doctrine/doctrine-migrations-bundle": "^3.2", // 3.2.4
"doctrine/orm": "^2.12", // 2.15.2
"knplabs/knp-time-bundle": "^1.18", // v1.20.0
"pagerfanta/doctrine-orm-adapter": "^4.0", // v4.1.0
"pagerfanta/twig": "^4.0", // v4.1.0
"stof/doctrine-extensions-bundle": "^1.7", // v1.7.1
"symfony/asset": "6.3.*", // v6.3.0
"symfony/asset-mapper": "6.3.*", // v6.3.0
"symfony/console": "6.3.*", // v6.3.0
"symfony/dotenv": "6.3.*", // v6.3.0
"symfony/flex": "^2", // v2.3.1
"symfony/framework-bundle": "6.3.*", // v6.3.0
"symfony/http-client": "6.3.*", // v6.3.0
"symfony/monolog-bundle": "^3.0", // v3.8.0
"symfony/proxy-manager-bridge": "6.3.*", // v6.3.0
"symfony/runtime": "6.3.*", // v6.3.0
"symfony/stimulus-bundle": "^2.9", // v2.9.1
"symfony/twig-bundle": "6.3.*", // v6.3.0
"symfony/ux-turbo": "^2.9", // v2.9.1
"symfony/web-link": "6.3.*", // v6.3.0
"symfony/yaml": "6.3.*", // v6.3.0
"twig/extra-bundle": "^2.12|^3.0", // v3.6.1
"twig/twig": "^2.12|^3.0" // v3.6.1
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4", // 3.4.4
"symfony/debug-bundle": "6.3.*", // v6.3.0
"symfony/maker-bundle": "^1.41", // v1.49.0
"symfony/stopwatch": "6.3.*", // v6.3.0
"symfony/web-profiler-bundle": "6.3.*", // v6.3.0
"zenstruck/foundry": "^1.21" // v1.33.0
}
}
4 Comments
I have (or is it "am in") a dillema. I see you updated the script with a link to the sassbundle (https://symfony.com/bundles/SassBundle/current/index.html). BUT on that page there is a tip that says: "While this bundle is great, you may not need to use Sass!". Development goes fast so i understand the 'overthinkings'. What would you recommend now to do? I would like to use Bootstrap with Assetmapper in my Symfony 7 project, what would be the best practice?
Hey @lexhartman
Good discovery on that note! It mostly depends on how you use Sass in your project, I mean, what exactly features from Sass you're using in your project. I would recommend you to read this blog post: https://gomakethings.com/is-it-time-to-drop-sass/ - to see what you can do with the latest CSS and what you can't do (i.e. what features are only available in Sass). So, in short, if you don't need those extra features that are available only in Sass, or you can just get rid of them in favor of a simpler CSS way - then you don't need Sass in your project at all, and so you don't need that bundle too - just write plain CSS files. But if you need them - we covered you with this Sass bundle, use it :)
I hope this helps!
Cheers!
In installed bootstrap via composer:
php bin/console importmap:require bootstrap
app.css(background-color {skyblue}) not working
app.css working:
If I add one more css file:
app.css purple.css overwrites default app.css(skyblue):
It seems that later files overwrites the former ones. Am It is what it is or the way i'm including css is not recommended ?
Hey John,
Good research! The order of included files is indeed important, and as you can see the latter included file will override previous properties if there will be a conflict, i.e. if you declare the same in both files with different values, so you just need to keep it in mind. And yeah, usually you may want to include all the third-party CSS files like Bootstrap one, and only then your own custom styles that will help you to override some defaults from those files, that's the correct strategy :)
I hope this helps!
Cheers!
"Houston: no signs of life"
Start the conversation!