Chapters
57 Chapters
|
6:19:46
|
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!
01.
Turbo: Drive, Frames & Streams!
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": "*",
"composer/package-versions-deprecated": "1.11.99.1", // 1.11.99.1
"doctrine/annotations": "^1.0", // 1.13.1
"doctrine/doctrine-bundle": "^2.2", // 2.3.2
"doctrine/orm": "^2.8", // 2.9.1
"phpdocumentor/reflection-docblock": "^5.2", // 5.2.2
"sensio/framework-extra-bundle": "^6.1", // v6.1.4
"symfony/asset": "5.3.*", // v5.3.0-RC1
"symfony/console": "5.3.*", // v5.3.0-RC1
"symfony/dotenv": "5.3.*", // v5.3.0-RC1
"symfony/flex": "^1.3.1", // v1.21.6
"symfony/form": "5.3.*", // v5.3.0-RC1
"symfony/framework-bundle": "5.3.*", // v5.3.0-RC1
"symfony/property-access": "5.3.*", // v5.3.0-RC1
"symfony/property-info": "5.3.*", // v5.3.0-RC1
"symfony/proxy-manager-bridge": "5.3.*", // v5.3.0-RC1
"symfony/runtime": "5.3.*", // v5.3.0-RC1
"symfony/security-bundle": "5.3.*", // v5.3.0-RC1
"symfony/serializer": "5.3.*", // v5.3.0-RC1
"symfony/twig-bundle": "5.3.*", // v5.3.0-RC1
"symfony/ux-chartjs": "^1.1", // v1.3.0
"symfony/ux-turbo": "^1.3", // v1.3.0
"symfony/ux-turbo-mercure": "^1.3", // v1.3.0
"symfony/validator": "5.3.*", // v5.3.0-RC1
"symfony/webpack-encore-bundle": "^1.9", // v1.11.2
"symfony/yaml": "5.3.*", // v5.3.0-RC1
"twig/extra-bundle": "^2.12|^3.0", // v3.3.1
"twig/intl-extra": "^3.2", // v3.3.0
"twig/string-extra": "^3.3", // v3.3.1
"twig/twig": "^2.12|^3.0" // v3.3.2
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4", // 3.4.0
"symfony/debug-bundle": "^5.2", // v5.3.0-RC1
"symfony/maker-bundle": "^1.27", // v1.31.1
"symfony/monolog-bundle": "^3.0", // v3.7.0
"symfony/stopwatch": "^5.2", // v5.3.0-RC1
"symfony/var-dumper": "^5.2", // v5.3.0-RC1
"symfony/web-profiler-bundle": "^5.2", // v5.3.0-RC1
"zenstruck/foundry": "^1.10" // v1.10.0
}
}
What JavaScript libraries does this tutorial use?
// package.json
{
"devDependencies": {
"@babel/preset-react": "^7.0.0", // 7.13.13
"@fortawesome/fontawesome-free": "^5.15.3", // 5.15.3
"@hotwired/turbo": "^7.0.0-beta.5", // 1.2.6
"@popperjs/core": "^2.9.1", // 2.9.2
"@symfony/stimulus-bridge": "^2.0.0", // 2.1.0
"@symfony/ux-chartjs": "file:vendor/symfony/ux-chartjs/Resources/assets", // 1.1.0
"@symfony/ux-turbo": "file:vendor/symfony/ux-turbo/Resources/assets", // 0.1.0
"@symfony/ux-turbo-mercure": "file:vendor/symfony/ux-turbo-mercure/Resources/assets", // 0.1.0
"@symfony/webpack-encore": "^1.0.0", // 1.3.0
"bootstrap": "^5.0.0-beta2", // 5.0.1
"chart.js": "^2.9.4",
"core-js": "^3.0.0", // 3.13.0
"jquery": "^3.6.0", // 3.6.0
"react": "^17.0.1", // 17.0.2
"react-dom": "^17.0.1", // 17.0.2
"regenerator-runtime": "^0.13.2", // 0.13.7
"stimulus": "^2.0.0", // 2.0.0
"stimulus-autocomplete": "https://github.com/weaverryan/stimulus-autocomplete#toggle-event-always-dist", // 2.0.0
"stimulus-use": "^0.24.0-1", // 0.24.0-2
"sweetalert2": "^11.0.8", // 11.0.12
"webpack-bundle-analyzer": "^4.4.0", // 4.4.2
"webpack-notifier": "^1.6.0" // 1.13.0
}
}
24 Comments
Note that you can't build assets using node 18, but node 16 seems to work without issues.
Hey @jmsche!
It works ok for me on node 19 - just doing a
composer install,yarn install, andyarn watchall happen without any error onstart/andfinish/dir. It wouldn't surprise me if the build stopped working in newer Node versions (at least without updating your node deps), but I didn't hit any issues. Do you remember the problem you hit?Cheers!
Hi Ryan,
Ran commands using node 18.10.0 here (retrieved via nvm IIRC, not sure if that matters).
Here is the error I get when I run
yarn watchin thestartfolder:The error seems to be the same for the
finishdirectory.I had the same problem with node v20.11.1 I ran
export NODE_OPTIONS=--openssl-legacy-providerafter that I can run yarn watchHey Yevhen,
Thanks for sharing it with others!
Cheers!
I had the same problem:
Hey Waldifubu,
Thanks for confirming it helped to you :)
Cheers!
Hey Jmsche,
Thanks for mentioning this! It might be helpful for others. I think we need to add a note about it in the course
Cheers!
Answer for me came from this link...
error
Hey Stuart,
I suppose you're talking about this comment? https://symfonycasts.com/screencast/turbo/intro#comment-33200
Thanks for sharing your solution with others.
Cheers!
yes sorry
I had the same problem on a windows pc.
When I did yarn watch I would get the following error.
Node.js v22.6.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
added the following code to my webpack.config.js above Encore.
const crypto = require("crypto");<br />const crypto_orig_createHash = crypto.createHash;<br />crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);rerun the yarn watch and it compiled okay.
Change docker-compose.yaml to :
Change .env file and use:
DATABASE_URL="mysql://root:password@127.0.0.1:3306/root?serverVersion=8.0.32"then
docker-compose up -dnext
symfony console doctrine:database:createsymfony console doctrine:schema:update --forcesymfony console doctrine:fixtures:loadnext
symfony serve -dnext
export NODE_OPTIONS=--openssl-legacy-provider && yarn watchthis is how the installation is working on MacBook Air M2 / nodejs LTS (18.5.0 at the time of writing) / Docker Desktop Mac
would be nice if this help someone else to save 1 hour or so....
thx
The following change:
image: 'arm64v8/mysql:latest'should not be done on an intel machine.
And thanks for the great tips!
Hey Staatzstreich,
Thank you for such a detailed tip!
Cheers!
Hey 👋
You are welcome and i like your courses!!!
Best,
Michael
Hey staatzstreich,
Thank you! We're delighted to hear such feedback, it makes our day ❤️
Stay tuned for more content soon ;)
Cheers!
Hi there, if anyone has a problem with connecting to the database, don't worry. The .env file downloaded with the project is not working.
Change the:
to:
and you are good to go :)
Hey @kousaja1!
Thanks for posting this clear note! If you use the Docker database setup we describe in the README, you won't need this. But if you use your own MySQL instance without Docker (which is totally fine), then you're 100% correct 👍
Cheers!
Hi @weaverryan!
The thing is that the docker-compose provided (when you download the course code) uses mysql database, but the app is expecting posgresql database, so you need to change the .env file yourself.
Hey kousaja1!
If you're using the
symfonybinary, it'll detect the database container running and expose theDATABASE_URLfor you. So if you have this setup, theDATABASE_URLvalue isn't used. But if you don't use thesymfonybinary, then you'll definitely need to tweak that. We mention that in the README, but it might not be clear enough.Cheers!
Oh, that's lovely! I didn't know that the symfony binary is that smart! Thank you for the additional explanation. My bad.
Haha, no worries - it's a bit magic! And you were still right about needing to change .env if you don't use the full Docker AND symfony binary setup :).
"Houston: no signs of life"
Start the conversation!