CodeReviewVideos.com Forum

How Symfony 4 Makes You A Better Developer

We've covered a lot of topics in just a few short videos, and you're now well on your way towards a better understanding of Symfony 4.


This is a companion discussion topic for the original entry at https://codereviewvideos.com/course/symfony-4-beginners-tutorial/video/symfony-4-makes-you-a-better-developer

Hello Chris and thank you for your detailed post. Quick question, how do you actually have renderView working in a service ? I understand i have to inject the twig or templating service into my Emailer service but I can’t make it work. I asked a question on SO with more details if needed.

Thank you for your time!

Sorry for the slow reply @KodR. The SO post replies should resolve your issue.

Pretty much any time you need anything, you need to inject it. This is usually as easy as creating a __construct method, and using type hints to tell Symfony what it is you need. Things get a little more complex than this if there are multiple instances of the same interface, and things like that, but at this stage, autowiring will see you right most of the time.

Hi Chris,

Thank you for the tutorial. Followed the whole tut and have some comments I faced as a symfony noob. A lot of times the text is not in sync with the video which add an extra layer of confusion that we as noobs do not need :wink:

While you where using the symphony master resository (4.something) and I was using the 4.2.* branch and the web skeleton already implemented a lot of the changes you suggested. I do not know what will be the best to do here but it was strange in a way.

Keep up the good work, you helped me getting my head into Symfony (15 years ago php was a different beast…)

Thanks @bwakkie

I see what you mean about the text being out of sync. I try my best, but am not perfect :slight_smile: Unfortunately I lost all my old videos originals when my time machine disk died, so not much I can do about it. Sucks tho.

Good to hear they have implemented the suggested changes. It’s hard to keep a tutorial in sync with fast moving projects.

I agree, modern PHP apps are totally different. It’s still the same old friendly welcoming language underneath though :slight_smile: Just with some nice improvements.

Sorry for any headaches caused, and thanks for your feedback.