This course is archived!
This tutorial uses Symfony 3, but all the concepts around PHP 7 are still ?valid.
05.
Void Types & Refactoring an Entire Class
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.
7 Comments
@ 4:00 when you set Collection, it went WAY too fast, that you actually used phpStorm Auto-complete to add use statement for Doctrine\Common\Collection.
Am I the only one, that thinks these tutoials sometimes write too fast? trying to keep up, I have to keep pausing video
+ Last step for Login, does not bring you to genus overview page.
Hey CISVHenriksen
I know, is not so easy to code along with the video without pausing, but maybe an extra monitor could help you get faster :)
About the login issue. I believe Ryan had in his session a redirection to the admin area after a successfully login. Symfony does it by default when you try to access a secured are when you are anonymous.
Cheers!
Yo MolloKhan!
I'll jump in here too... since I'm to blame ;). Yes, we often use that auto-complete PHP Storm trick. It's difficult because if we explain it each time, it will feel laborious after the first time... but if you haven't seen it before, it's surprising! I try to explain it when it makes sense, but it's quite imperfect :/.
About the speed, it may not always help (because when we're just talking, you may want full speed), but the video player also has a speed option. Oh, and one more thing! The code blocks are below the videos, so you can reference the code there too if it helps :).
Cheers!
Hi ! Thank you again for your great course. After years of PHP5, it's nice to have a nice way to keep updated !
I have one issue while loading the genus/new route.
Here is the SF error I got :
An exception occurred while executing 'INSERT INTO genus (name,
slug, species_count, fun_fact, is_published, first_discovered_at,
sub_family_id) VALUES (?, ?, ?, ?, ?, ?, ?)' with params ["Octopus5954",
"octopus5954", 30496, null, 1, "2068-03-23", null]:
Apparently, the SubFamily isn't correctly retrieve on line 44 in the GenusController. I also have a PhpStorm warning on this line, for the findAny() method, a method not found warning. In the SubFamilyRepository, I have aPhpStorm warning in the findAny() method as an unhandled UniqueResultException. At the end, I still don't get any result for a SubFamily in the GenusController, thus, I have this error.
Hey Virginie,
I think it's not a complete error you see, howeverI suppose you see it because sub_family_id value is null, but from the code I see nullable=false for Genus::$subFamily . So you need to find out why it is null. Is it intentionally? I think if you fixed the problem why it's null - the error will be gone.
Cheers!
I don't think it's intentional as it goes smoothly in the video, without any mention about any fix I should make for the code to run. It isn't blocking for the learning process, as I already knew SF, I could figure out why there was this issue, however, if someone who only wants to know about PHP7, without any prior knowledge on SF, has the same issue, I think he/she would be lost.
Hey Virginie,
Hm, let me see again... as I understand, you're mostly talking about this:
"Houston: no signs of life"
Start the conversation!