Chapters
22 Chapters
|
2:28:56
|
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": "^3.7", // v3.7.0
"doctrine/doctrine-bundle": "^2.7", // 2.7.0
"doctrine/doctrine-migrations-bundle": "^3.2", // 3.2.2
"doctrine/orm": "^2.12", // 2.12.3
"knplabs/knp-time-bundle": "^1.18", // v1.19.0
"pagerfanta/doctrine-orm-adapter": "^3.6", // v3.6.1
"pagerfanta/twig": "^3.6", // v3.6.1
"sensio/framework-extra-bundle": "^6.2", // v6.2.6
"stof/doctrine-extensions-bundle": "^1.7", // v1.7.0
"symfony/asset": "6.1.*", // v6.1.0
"symfony/console": "6.1.*", // v6.1.2
"symfony/dotenv": "6.1.*", // v6.1.0
"symfony/flex": "^2", // v2.4.5
"symfony/framework-bundle": "6.1.*", // v6.1.2
"symfony/http-client": "6.1.*", // v6.1.2
"symfony/monolog-bundle": "^3.0", // v3.8.0
"symfony/proxy-manager-bridge": "6.1.*", // v6.1.0
"symfony/runtime": "6.4.3", // v6.4.3
"symfony/twig-bundle": "6.1.*", // v6.1.1
"symfony/ux-turbo": "^2.0", // v2.3.0
"symfony/webpack-encore-bundle": "^1.13", // v1.15.1
"symfony/yaml": "6.1.*", // v6.1.2
"twig/extra-bundle": "^2.12|^3.0", // v3.4.0
"twig/twig": "^2.12|^3.0" // v3.4.1
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4", // 3.4.2
"symfony/debug-bundle": "6.1.*", // v6.1.0
"symfony/maker-bundle": "^1.41", // v1.44.0
"symfony/stopwatch": "6.1.*", // v6.1.0
"symfony/web-profiler-bundle": "6.1.*", // v6.1.2
"zenstruck/foundry": "^1.21" // v1.21.0
}
}
28 Comments
Hi:
I run localhost:8000 for the first time and receive the following error message:
Environment variable not found: "GITHUB_TOKEN".
Problem solved. Install:
composer require paragonie/sodium_compatHey Giorgiocba,
Thanks for this tip. Could you please elaborate on what exactly the problem was that was fixed by installing that package? It's not clear from your comment. Or are you talking about this comment?
Cheers!
Hi Victor. I install de package, I follow the instructions in the readme.md file, but when I try to run the project for the first time on localhost:8000, the error mentioned above appears.
Hey giorgiocba,
Thanks for sharing more details on the error and your solution with others. I'm happy to hear it helped you.
Cheers!
Hello there! HELP!
Recently I've migrated from Symfony 5.4 to Symfony 6.4 (64.10), with this upgrade doctrine/orm and doctrine/doctrine-migrations-bundle also have been upgraded:
The problem is when I try to validate the schema:
php bin/console doctrine:schema:validate -vI got this error:
DROP TABLE doctrine_migration_versions;I've found an open issue in GitHub: https://github.com/doctrine/migrations/issues/1406
But I would like to know is someone else could fix the issue and how?
Hey @SoftwareDevs ,
There's a workaround on that thread you linked, probably you will need to go with that. I personally didn't have that issue, so I don't have a better workaround. It sounds like an issue in a specific version. You can track the status of the issue on that thread I think.
Cheers!
Hello there !
when I try to open the downloaded source files I get this error from Symfony: Environment variable not found: "GITHUB_TOKEN". I'm not sure how to fix it
Hey @Ted
Could you corroborate you got that error from the code project of this tutorial? Also, does it happen on both directories (start, finish)? I'm asking because I just checked this course project and there are not any references to such environment variable
yes from the code project of this tutorial, it actually happens on both (start and finish) it also happens on the projects I tried to download form the next episodes in this tutorial, I followed along with Ryan since the first course and I started getting this error around the last episodes of the last course and I couldnt't solve it since. I'm following along with two computers to do the work twice and understand better but now I'm getting the error on both computers.
That's odd, I just gave it a try and could install the
startdirectory of this project without any problems. This makes me think there's something going on in your local machine. Let's try to find where is that env var being used, run:git grep GITHUB_TOKENAs a workaround, just define the env var in the
.envfile and try againIt's odd, i had the same issue today.
Interesting, thank you for reporting it @Stanislaw
I'll look deeper and fix the tutorial's code, in the meanwhile, you can go with my workaround
Cheers!
it is quite odd indeed, defining the variable in the .env file did the work. thank you
Hi there!
The env var is used in
config/packages/framework.yamlwhen you download the course code - so that part isn't surprising. So then, where is it defined? In the previous episode, we added it to the "secrets vault" - and the dev (and prod) secrets vault IS included in the download - e.g. it'sconfig/secrets/dev/dev.GITHUB_TOKEN.28bd2f.php. You should be able to see the secret by running:Anything in your secrets vault becomes an environment variable. So, this part is the mystery I think: why the
GITHUB_TOKENseems to be missing? Do you see it in the list when you run the above command (it should actually be the only env var returned in the list)? I have a feeling that your system may be missing the "sodium" PHP extension, which is normally part of core php, but I think some Linux distros may ship PHP without it (and then you can install it manually). Let me know if that's the case!Cheers!
I had the same issue and installed the sodium extension by running
composer require paragonie/sodium_compat
It worked!
Hello there!
I got a weird problem I don't know how to solve. Working on Symfony's project in version 6.2, and PHP 8.2 after running
composer require doctrineerrors occur:And more...
I know what that means, but do you have any ideas on how to solve that in a different way than downgrading my PHP version?
When I run
composer require "symfony/orm-pack:^2.3", another errors are shown:Thanks!
Hey Bartlomeij,
I don't think there're any other robust solutions. You can try to ignore platform requirements with
--ignore-platform-reqsflag, but I'd not recommend it because it may cause issues in your code as it will use the new PHP syntax that will just not work on your PHP version.So, you need either downgrade your PHP version or upgrade those required packages to a newer (most probably major) version. You can leverage https://packagist.org/ to see what version of the package requires what PHP version.
I hope this helps!
Cheers!
Hi there,
It is not clear for me if the composer install should be run inside the "start" directory or outside
When I install it inside the directory it works better than outside.
Howdy Benoit -
This made me chuckle :) But to answer your question, yes - run
composer installinside thestartdirectory.From this point on, you'll be doing everything from within the
startdirectory. Thefinishdirectory is how your code should look at the end of the tutorial - assuming you're coding along with Ryan throughout the course.Enjoy!
Yes, I think it would make me chuckle as well if I would read something like that :)
Could you take into consideration the way it is presented in the ReadMe file ?
Step 1 : (in whatever directory you are you should check that composer is installed properly)
So I would say that you should already mention that you are in the directory of your project at this stage.
In the Readme you are saying that you should only move to the directory later : "once on your system.
Then, to start the web server, open a terminal, move into theproject, and run ...":
Make sure you have Composer installed
and then run:
You may alternatively need to run
php composer.phar install, dependingon how you installed Composer.
Start the Symfony web server
You can use Nginx or Apache, but Symfony's local web server
works even better.
To install the Symfony local web server, follow
"Downloading the Symfony client" instructions found
here: https://symfony.com/download - you only need to do this
once on your system.
Then, to start the web server, open a terminal, move into the
project, and run:
The problem is also that when I run git status I have a lot of files that are displayed and that should not be, right ?
Sorry for the slow reply,
Once you've extracted and moved into the
startdirectory, you should be able togit initto initialize that directory as a git repository.git add .thengit commit -m "starting the tutorial"to add and commit everything instartto the repo. Now when you runcomposer install, you will see a few files change - likecomposer.lockand possibly see a couple files added/changed due to Symfony's Flex recipe system. Those changes are ok to commit after running composer. Thanks to.gitignoreyou shouldn't see anything ingit statusrelated to sayvendor/and the like.Does that sound about right for what you're seeing?
Hi when following along, git status doesn't work because of course there is no git repo... I'm thinking we should run git init after composer install and before composer require "doctrine:^2.2"
Hey Markchicobaby!
Ha! Of course! I've been saying this type of thing for years without thinking about this fact! The hope is that you will initialize the git repository when you start via
git init, but you're absolutely right that I don't say this. I'm going to be more careful with my language afterwards.Cheers!
Hey! The audio stops at 5:22 and the video froze too!
Hey Craig,
We're sorry to hear you're experiencing problems with our video player! I just double-check it, the video plays well for me around those 5:22, so it might be an internet connection issue on your laptop and so the video was not able to load from the server. Or, it might be a temporary outage of Vimeo video service - our video hosting provider. Please, try again today and let us know if the problem still persist. In this case, as a temporary workaround, I'd recommend you to download the video and watch it locally.
I hope this helps.
Cheers!
The video player still doesn't work for me in the website. The downloaded video works great. I don't have any trouble with any other videos on the site (I've watched dozens), so I assumed it was an issue with this video specifically.
Hey Craig,
Glad to hear you were able to watch the downloaded video in full locally. I'd recommend you to try a different browser, or probably a Chrome Incognito mode might help as well. But since you already watched it locally, you may just ignore :)
I still can't reproduce it for myself, so I think it should be good and most probably it's something local.
Cheers!
"Houston: no signs of life"
Start the conversation!