Yeah, unfortunately that course is not re-written with the latest Symfony 6 yet so that's why it's missing in the Symfony 6 track. Thanks for this reference, might be useful indeed :)
I believe Rufnex is referring to the project's folder and files icons. I was having the same question. But I found it's the Atom Material Icons plugin, which can be installed via the Marketplace.
No problem! It's still might be useful for some users ;) But I'm happy to hear you were able to figure out the steps yourself. If you ever have any problems following our tutorials - feel free to leave a comment and our support team will help you :)
I dived right into this course, downloaded the code, downgraded to php 8.1, did the composer install and think i have everything rolling but then... the database! Where can I find an SQL dump with the tables/data from this course at start?
When you download and unzip the course code, you will find the README file inside. Follow the instructions there to start the project locally :) Specifically for this course, we do recommend to use Docker for the DB:
Read the README for more details. But if you don't want to use Docker - you can run those commands directly in your CLI if you have MySQL installed, just make sure you update the DB credentials in your .env.local. :)
But if you still have any problems starting the project - let us know!
I downloaded the course code and follower the instructions in the README, but my site looks like this screenshot right now. What do I need to do to fix it?
Seems you have problems with assets. Did you have composer install command finished without any errors?
Also, could you try to run the next commands:
yarn install
yarn encore dev --watch
Do you see any errors in the output or did they finish OK? Please, reload your website again, does it help?
Also, do you use symfony serve command to spin your website or did you configure a real web server like Apache/Nginx? Could you try to run the website via symfony serve?
Also, you can open Chrome dev tools and in the Network tab watch for the errors regarding the assets, it may contain some hints.
Could you tell me what migrations are missing? I don't see any migrations being generated in this tutorial. You only need to create the database and then run bin/console doctrine:schema:update - check out the README file
Thank you so much, @MolloKhan ! I fixed it. For now I encountered a new problem: my assets won't show up. I ran bin/console assets:install, and the build directory has appeared in public, but files like app.css, app.js return a 404 error.
Doesn't work :( Still got messages in the chrome console: GET http://localhost/build/app.css net::ERR_ABORTED 404 (Not Found) I run the following commands: yarn install and yarn encore dev A build directory has appeared, files are present in the public directory, but I'm still getting 404 errors.
I got it. The issue was with the Docker containers: NGINX and PHP-FPM. NGINX uses fastcgi_pass to redirect PHP files to PHP-FPM, but the assets from the build directory are not present in the NGINX container.
Interesting that configs for nginx and php-fpm work like a charm for Symfony 7, but not for Symfony 6.2. I mean assets, because I had no problems in version 7.
Don't get the project started on Mac with Docker. "composer install" and "docker compose up -d" finished without errors, but "symfony console doctrine:database:create --if-not-exists" throws: [critical] Error thrown while running command "doctrine:database:create --if-not-exists". Message: "An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused"
First of all, make sure you install all the dependencies, i.e. Composer install should finish successfully. The error about the DB sounds like DB server is down. Probably try to restart the Docker completely, run the docker compose up again and make sure no errors. Let us know if you still have the same DB error
25 Comments
If you're on the Symfony 6 track and feel like you're missing a course between "Doctrine, Symfony 6 & the Database" and this one, you are. It's this one: https://symfonycasts.com/screencast/doctrine-relations
Hey Ryan-L,
Yeah, unfortunately that course is not re-written with the latest Symfony 6 yet so that's why it's missing in the Symfony 6 track. Thanks for this reference, might be useful indeed :)
Cheers!
I believe Rufnex is referring to the project's folder and files icons. I was having the same question.
But I found it's the Atom Material Icons plugin, which can be installed via the Marketplace.
yeah, you found a correct package =)
Hey there! forget about my stupid question earlier about the database. OF COURSE should i run a make:migration and then migrate
duh!
sorry sorry sorry - do not publish my post please ;)
Hey Pieter,
No problem! It's still might be useful for some users ;) But I'm happy to hear you were able to figure out the steps yourself. If you ever have any problems following our tutorials - feel free to leave a comment and our support team will help you :)
Cheers!
Hi,
I dived right into this course, downloaded the code, downgraded to php 8.1, did the composer install and think i have everything rolling but then... the database! Where can I find an SQL dump with the tables/data from this course at start?
Hey Pieter,
When you download and unzip the course code, you will find the README file inside. Follow the instructions there to start the project locally :) Specifically for this course, we do recommend to use Docker for the DB:
Read the README for more details. But if you don't want to use Docker - you can run those commands directly in your CLI if you have MySQL installed, just make sure you update the DB credentials in your
.env.local. :)But if you still have any problems starting the project - let us know!
Cheers!
I downloaded the course code and follower the instructions in the README, but my site looks like this screenshot right now. What do I need to do to fix it?
Here is the link to my GitHub repository, if that's useful.
Hey Alex,
Seems you have problems with assets. Did you have
composer installcommand finished without any errors?Also, could you try to run the next commands:
Do you see any errors in the output or did they finish OK? Please, reload your website again, does it help?
Also, do you use
symfony servecommand to spin your website or did you configure a real web server like Apache/Nginx? Could you try to run the website viasymfony serve?Also, you can open Chrome dev tools and in the Network tab watch for the errors regarding the assets, it may contain some hints.
Cheers!
I downloaded course files, but there are no migrations.
@Victor @MolloKhan Guys, can you fix that?
Hey @Jared
Could you tell me what migrations are missing? I don't see any migrations being generated in this tutorial. You only need to create the database and then run
bin/console doctrine:schema:update- check out the README fileLet me know if I'm missing something. Cheers!
Thank you so much, @MolloKhan ! I fixed it.
For now I encountered a new problem: my assets won't show up. I ran
bin/console assets:install, and thebuilddirectory has appeared inpublic, but files likeapp.css, app.jsreturn a404error.Yea, this course uses Webpack instead of Asset Mapper. You need to run
yarn install(ornpm install) and thenyarn encore devCheers!
Doesn't work :( Still got messages in the chrome console:
GET http://localhost/build/app.css net::ERR_ABORTED 404 (Not Found)I run the following commands:
yarn installandyarn encore devA
builddirectory has appeared, files are present in thepublicdirectory, but I'm still getting404errors.I got it. The issue was with the Docker containers: NGINX and PHP-FPM. NGINX uses
fastcgi_passto redirect PHP files to PHP-FPM, but the assets from the build directory are not present in the NGINX container.Thank you @MolloKhan , problem is solved!
Interesting that configs for nginx and php-fpm work like a charm for Symfony 7, but not for Symfony 6.2.
I mean assets, because I had no problems in version 7.
Ha! That's interesting. I suppose they improved Docker integration in Symfony 7
Cheers!
Don't get the project started on Mac with Docker.
"composer install" and "docker compose up -d" finished without errors, but "symfony console doctrine:database:create --if-not-exists" throws:
[critical] Error thrown while running command "doctrine:database:create --if-not-exists". Message: "An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused"
I get the exact same error message was this resolved?
Hey Iqpal,
I bet it was, it's a connection problem which means you most probably have invalid credentials configured. Have you followed my advice in the comment below? https://symfonycasts.com/screencast/doctrine-queries/dql#comment-31434
Cheers!
Hey Thilo,
First of all, make sure you install all the dependencies, i.e. Composer install should finish successfully. The error about the DB sounds like DB server is down. Probably try to restart the Docker completely, run the
docker compose upagain and make sure no errors. Let us know if you still have the same DB errorCheers!
Hey, side question ;o) What phpstrom UI do you use? Greetings.
Hey Rufnex,
Are you talking about PhpStorm theme? If so, we use Darcula in our videos :)
Cheers!
"Houston: no signs of life"
Start the conversation!