Chapters
33 Chapters
|
3:02:08
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!Compatible PHP versions: ^7.2.0
Subscribe to download the code!Compatible PHP versions: ^7.2.0
-
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!
03.
All about Event Bubbling
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!
This tutorial uses an older version of Symfony... but since it's a JavaScript tutorial, the concepts are still ? valid!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": "^7.2.0",
"symfony/symfony": "3.1.*", // v3.1.10
"twig/twig": "2.10.*", // v2.10.0
"doctrine/orm": "^2.5", // v2.7.1
"doctrine/doctrine-bundle": "^1.6", // 1.10.3
"doctrine/doctrine-cache-bundle": "^1.2", // 1.3.2
"symfony/swiftmailer-bundle": "^2.3", // v2.4.0
"symfony/monolog-bundle": "^2.8", // 2.12.0
"symfony/polyfill-apcu": "^1.0", // v1.2.0
"sensio/distribution-bundle": "^5.0", // v5.0.22
"sensio/framework-extra-bundle": "^3.0.2", // v3.0.16
"incenteev/composer-parameter-handler": "^2.0", // v2.1.2
"friendsofsymfony/user-bundle": "~2.0@dev", // dev-master
"doctrine/doctrine-fixtures-bundle": "~2.3", // v2.4.1
"doctrine/doctrine-migrations-bundle": "^1.2", // v1.2.1
"composer/package-versions-deprecated": "^1.11", // 1.11.99
"friendsofsymfony/jsrouting-bundle": "^1.6" // 1.6.0
},
"require-dev": {
"sensio/generator-bundle": "^3.0", // v3.1.1
"symfony/phpunit-bridge": "^3.0" // v3.1.6
}
}
8 Comments
Sorry for the non technical comment, but that 'Top of the morning' killed me 🤣
I'm not sure what I'm doing wrong, but when I download the course code and install like the README says, everything is fine until I make changes to the index.html.twig file, the changes aren't showing in the web browser. I've downloaded other course scripts before and never had any issue. If I make a change to base.html.twig none of the changes are presented as well. Like I simply change the title from Find Something to Lift! to Test and it doesn't change. Any suggestions? If I make changes to RepLog.php, those changes happen. Any suggestions?
Hey Brandon!
Sorry about the issues! Let's see if we an get things worked out! From what you're telling me, it sounds like you're loading the site in "prod" mode (instead of "dev" mode), which would explain why you see things, but things never change (prod mode caches everything). And this might be simply because the version of Symfony that this tutorial is built on is getting old. In Symfony 3, in order to access "dev" mode, you need to execute the
web/app_dev.phpfile. That usually means you need to go to<http://localhost:8000/app_dev.php- if you don't have the app_dev.php part, then index.php is executed, which runs Symfony in the prod environment. This is how Symfony used to do environments.But, you've probably noticed that I do NOT have the app_dev.php part in the URL in this tutorial. That's because if you use Symfony's built-in web server (i.e.
bin/console server:run) then it configures itself so that app_dev.php is executed, even if it's not in the URL.Phew! That's a long way to say that I think I know the problem and you can either solve it by (A) using the Symfony built-in web server or (B) add app_dev.php to the end of the URL.
Let me know if that helps!
Cheers!
Ryan,
Thank you for getting back to me. I've included app_dev.php at the end of the URL but it says You are not allowed to access this file. Check app_dev.php for more information. In my situation, I can't use the local PHP server, I'm on a work computer using Windows and I don't have MySQL installed on it, and when I try to access MySQL from my Linux server on my local network it doesn't connect. I spent a better part of a day trying to get that to work. I access the Linux server from a shared folder and then access Apache by typing the IP of the server in my browser on the Windows computer. Is it possible to run the local web server from Linux and access it over the network without affecting a web site that Apache is serving that needs to remain up? When I try to run the local web server it gives me the error: The child node "from_email" at path "fos_user" must be configured. I'm planning on running through the entire java script courses, and it looks like there are others that use Symfony 3. I've only started learning and using Symfony at version 5 so I don't know much about version 3
Hey Brandon
You can do a couple of things to workaround the
You are not allowed to access this fileproblem. First, you can edit theapp_dev.phpfile and remove that check, or include your IP, so your computer is allowed to run that fileSecond, you can configure your Apache virtual host config to point to
app_dev.phpso you don't have to include it your pathI hope it helps but it not, let me know. Cheers!
Diego,
Sorry to be a pain on this.
When I add my server IP address, I still get the error can't access the file. When I add my computer's IP address, I get the error, and when I add my WAN address, I get the error as well. When I remove the check, I get the error:
The child node "from_email" at path "fos_user" must be configured. I did configure Apache to point to the file so I don't have to type it in every time, which is a big help.
Oh, yes, you mentioned the "fos_user" error in your previous comment. I forgot to talk about it. That error comes from
FOSUserBundle, it's telling you that you need to configure thefrom_emailoption in order to work. What you need to do is:and that's it! If you have more problems let me know :)
Diego, thank you so much for your help, I got it working by doing the following in case someone else runs into the same problem:
//app/config/config.yml
Under fos_user I added
`from_email:
"Houston: no signs of life"
Start the conversation!