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!
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
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
}
}
11 Comments
Hi,
When I had deployed my project to Platform.sh it's styles didn't work until I changed the line in templates/base.html.twig:
After that all work well.
Did I do something wrong?
My build section in .platform.app.yaml looks like
Hey @Yuri-D
Your issue is you named the final CSS file
app.tailwind.cssthat's why it didn't work until you changed it in your template. You can keep it as is or update your deployment hookCheers!
How can I increase the execution time for the Tailwind build?
Hey Piotr,
It might be so that you need to increase PHP execution time, or what do you mean? You're not enough of default 30 seconds of execution? Could you provide more information on your specific use case, please?
Cheers!
When I run process cloud:deploy and when tailwind compiles, I get this error and the deploy process is interrupted.
Hey Piotr,
I see it now, thanks for sharing more information about it! Yeah, and I also noticed your issue here: https://github.com/SymfonyCasts/tailwind-bundle/issues/48
Seems you have a big project if you hit the timeout of 60s 🙈 But if your Tailwind project isn't that big, that sounds like the process somehow just hangs in the middle :/ I personally haven't hit that problem yet. Do you have some time to debug that case? Any PRs about fixes/improvements are warmly welcome on that repo!
Maybe try to run that specific command manually on your project, from the error message I suppose it should be:
I see you're on the latest v3.4.1 version. I wonder if before it worked for you and now the newest version causes this problem?
And try to stopwatch the time of execution. Does it really last more than 60s? Does it finish without errors?
Cheers!
Hello, I tried to run this command as profiles above, I even used 3 different versions of tailwindcss-linux-x64 but the compilation time was always very similar, around 41 seconds. I don't know why it is so long since my css file is only 80 lines long. Previously it took a fraction of a second.
I started removing some JS libraries and checking them. Well, I got down to 5 seconds, which still seems slow to me, maybe my config file is incorrect and it generates something that is completely unnecessary.
But anyway, everything is within the time limit now.
Thank you for your help.
PS.
But I still think that an optional increase in process execution time would be nice ;).
Hey Piotr,
Glad to hear you were able to make it working with a workaround. Thanks for sharing the solution with others. If more people encountered that problem - yeah, definitely something that would be nice to have out of the box
Cheers!
This not works for me.
I getting this error:
An I'm not sure how I can fix this.
my hooks section looks that:
Even if I will change
php bin/console tailwind:buildto:result it's this same.
Hey @piotrwasilewski!
Right now, using TailwindBundle with the platform.sh Symfony deploy is a bit annoying. It's something we need to improve (I know how, we just need to do it). The problem is that, inside of that
symfony-buildcommand, it runsimportmap:installthenasset-map:compile. But you don't have an opportunity to put thetailwind:buildin the middle of it.To work around this, you can tell the
symfony-buildscript not to do ANYTHING related to AssetMapper. Then run all the commands after on your own.Let me know if this helps!
Cheers!
Yes, that helps.
Thank you.
"Houston: no signs of life"
Start the conversation!