Joyful Development with Symfony 3

Ready to get serious with Symfony? You've come to the right place!

Get your first application off on the right foot by coding along with a real application, using the right tools and learning the best practices from the lead author of the Symfony documentation. These fundamentals will get you ready for everything else you'll need to do with Symfony in the future.

In this screencast, we start building an application from the ground-up, exploring the most fundamental parts of the application:

  • Installation and Setup
  • Route Essentials
  • Mastering Controllers & Response
  • Services and the Container
  • Twig
  • JSON Responses
  • Configuration and Environments

... and other goodies mixed in.


Your Guides

Ryan Weaver Leanna Pelham

Questions? Conversation?

  • 2016-12-05 weaverryan

    Hi Kalpesh!

    Ah, I think I can help explain this! Symfony is a low-level framework for building customer software by developers. So, it's a bit different than something like Wordpress or Drupal, which can be used by developers, but is also meant to be installed by non-technical (or less technical end-users. If you're building something where Symfony is an appropriate tool, then you will need to use the terminal for various tasks. In fact, many developers prefer to use the terminal versus other methods. So actually, Symfony *does* have an installer, but it's done via the terminal, because that's the preferred way by most Symfony devs. If you're coming from another technology, I realize this might seem strange to you. But my best advice is to embrace the terminal - it's really a necessary tool for developing things in Symfony or with similar tools.

    The official Symfony documentation has a few Windows-specific instructions which you might find helpful :) http://symfony.com/doc/current...

    Cheers!

  • 2016-12-05 Kalpesh Desai

    Hi thanks so much for reply. I am trying to install symfony in window by comand line. please suggest any forum discussion link steps are given to install symfony in window. apart from this can I ask your development team, why is it like anybody have to install symfony by command promp only? Why symfony installation is not available via browser with some user interface ? most of the application in this industries have a installation process with userinterface and very easy unlike symfony.

  • 2016-12-05 weaverryan

    Cheers Yahya! Thanks for the very nice words - and I'm thrilled about your success! I think you have a point about ReactJS - it's included here in part because we could have chosen anything, but also because React is exciting, so it gets people excited. But jQuery would certainly have been easy to understand. I'm glad it didn't mess you up too badly!

    Keep going and good luck!

  • 2016-12-05 weaverryan

    Hi Kalpesh!

    Symfony also works well on Windows :). But, we *do* show everything being done on a Mac, and sometimes (especially in Windows) things are slightly different. The most important thing in Windows is to make sure that you get a reliable terminal, like cygwin or "git bash". If you have a good terminal, then there should be very few - if any - differences when using Symfony in Windows: you'll download it the same way, you can use the built-in PHP web server in the same way (or use Nginx or Apache if you'd like) and you'll run commands from the terminal in the same way.

    I'm not a Windows expert, but if you run into some specific issues or questions, please feel free to ask them - we'll do our best!

    Cheers!

  • 2016-12-05 weaverryan

    Good idea! Doing exactly that right now :). Cheers back!

  • 2016-12-04 Yahya A. Erturan

    weaverryan Thank you for the course. I was keeping my distance on with Symfony for "past" obvious reasons but finally diving in Symfony with a smile on my face. Your edits on the video (with modal boxes, diagrams, samples) helps a lot to understand it. I did manage to run a demo app with your tutorial based on TV series to alter the code and play around. It worked well. If I may, I have only one suggestion to improve the course. Using React.js made me a little confused as I never used it before. Maybe with a more common library, ok not more common but more easy on starter-level, like jQuery would keep my mood up till the end. Because I attached the latest versions of React and Babel-Core from CDN but it gives error about browser keys. When I replaced them to your exact versions, it worked. Thank you so so much for this tutorial.

    Meanwhile, this tutorial works like a charm with Symfony 3.2

  • 2016-12-04 Kalpesh Desai

    what about window's user ? In tutorial video not mention about windows system.

  • 2016-12-03 Nabil Hichri

    Oh Man !! I didn't see it !! it wasn't really so clear may be it shoud be a "btn btn-success btn-lg" download button. Cheers. :)

  • 2016-12-03 weaverryan

    Hey Nabil!

    Ah. thanks man! It does mean a lot to us, seriously :).

    About the code download, you can download it on any video page (e.g. https://knpuniversity.com/scre... - click "Download" in the upper right, then click"Course Code" below that. This will contain a zip file with a "start" and "finish" directory. Anyone (subscriber or not) can download the code for this course (because it's free), but only subscribers can download code for other, non-free courses.

    Let me know if that helps! And Cheers!

  • 2016-12-03 Nabil Hichri

    Hi , There . First of all , i would thank you for your ecxellent courses , You're doing an awesome work ( dont be shy ... :p ) . Second , to follow your courses i need to download your code, i did a lot of search to find it but without result. Could you help please !!! Thx .

  • 2016-11-29 weaverryan

    My pleasure :). And thanks for the kind words!

    P.S. Your English seems pretty great to me!

  • 2016-11-29 Abou

    This is exactly what I supposed.
    Thank you...

    By the way I wanted to thank you so much for beeing so kind ! I mean IT !
    You spend so much time to find solutions and answers for everyone ! You saved me soooo much time and YOU gave me access to the Symfony World.
    I promise I will subscribe to a yearly account at next january !

    You are a bright example of what should be the Open Source Community.

    Cheers !
    Abou

    P. S. : I'm so sorry for my poor english... I'm a moroccan who lives in France...

  • 2016-11-29 weaverryan

    Hi Abou!

    YES it is POSSIBLE ;). First, the installer isn't anything special - it's just a small utility that downloads a Symfony app. You will only ever use it once, to start your project. Then, you can safely transfer your files anywhere you want afterwards! Everything exists in your one directory (there is really nothing "installed" - it's all in your project directory).

    So, absolutely - you can upload your local Symfony project to your remote server :). However, there are a lot of files, so FTP is probably a pretty slow way to do it. And also, not having SSH access is far from ideal - I would recommend finding a host that *does* have SSH if possible. The reason is that after you upload your files, there are a few tasks you should run: http://symfony.com/doc/current.... If you *really* don't have SSH access, then you can try just doing this:

    1) Uploading all the files
    2) Emptying the var/cache directory (this is basically the same bin/console cache:clear --env=prod)

    And that's it! Of course, there are a few other small details, like making sure your var/cache directory is writeable. And, you won't be able to use the normal Doctrine migrations system (since you need SSH access to run that command)... but yes, it is possible. But, better that you find a server with SSH!

    Cheers!

  • 2016-11-29 Abou

    Hi Ryan,

    I'm wondering if it is possible to install symfony without the installer.
    I mean let's suppose I have the next situation to handle :

    1 - I only have an ftp access to a remote linux server.
    2 - I can tweak and handle the apache config to set the virtualhosts.

    So is it possible to upload a local symfony project (created according to the standard way) to my remote web server and hit the road :) ?...

    I suppose I will have to modify some pathes, some config para...

    I am asking because I want to use Symfony on server where I have no admin right, I don't even have an ssh access

    Best regards,
    Abou

    P. S. : Please say YES it is POSSIBLE ...

  • 2016-11-28 Hakim Ch

    Your the best! thank you <3

  • 2016-11-28 weaverryan

    Yo Hakim Ch!

    Cool question :). I would always says if you're learning so that you can program something or be valuable for the job market, use the latest version of Symfony. If you use Symfony 3.2 for example (which will be released in a few days), then you will be equally qualified to work on a Symfony 3 project or Symfony 2.8, if you find a company using it. You could then study our upgrade guide (http://knpuniversity.com/scree..., but in reverse to know what what the old changes are. But if you know Symfony 3, you are fully qualified to work on Symfony 2.8 - and you can tell them I said so :p.

    Cheers!

  • 2016-11-27 Hakim Ch

    Hi! i have a question!
    wich the best version for job market needs. 2.8 LTS or 3 Stable ?

  • 2016-11-03 Victor Bocharsky

    You're welcome!

    Cheers!

  • 2016-11-03 Женя Федоров

    Thank you very much!

  • 2016-11-01 Vince Liem

    I can not thank you enough for also giving an example of JSON and reactJS, totally loving it.

  • 2016-10-18 weaverryan

    Hey Jurgen!

    I can hopefully give you a few tips at least :). First, technically, you can run Symfony just fine on Windows. I say "technically", because there are a few subtle things that will be different... which are no big deal... except that they can definitely trip you up while you're learning. If you're hitting some issues, I would be happy to help you through those.

    But, having a VM is obviously a really nice way to go as well. But, it can be tricky in its own way. I would recommend trying out Homestead: it's a really nice VM that works with Symfony, Laravel and other PHP environments really well: https://laravel.com/docs/5.3/h.... It will still possibly be tricky - things are always a bit different on Windows. Treehouse has a tutorial about Homestead in Windows (though it's a bit out of date): http://blog.teamtreehouse.com/....

    As always, feel free to posts questions here! Unfortunately, I don't have enough Windows experience to be able to give you an exact, best path. But, while using Windows isn't the most-common use-case, many people pull it off just fine (but setup *can* be frustrating).

    Cheers!

  • 2016-10-18 Jurgen Verhasselt

    Hi, does anyone have a truly virtual machine with windows 7 or later with phpstorm and symfony and everything, I have setup a W7 machine but half of the course (like routing and other things) i cannot pratice as my environment is not setup properly and I am too much a newbie, spent already more time trying to fix the setup than learning to program, anybody can help me?

  • 2016-09-27 Thierno Diop

    Thx a lot

  • 2016-09-26 weaverryan

    Hi Thierno!

    I never worry about performance for frameworks - they're all optimized and can be optimized. Your app will be slow or fast because of the code your write :). So, I can tell you that Symfony is really fast, but so is Rails :).

    Second, about rapid-application-development, I'm not sure because I don't have a lot of experience in Rails. Symfony is not the most RAD framework, however, it gives more emphasis to "best practices" so that you can build a codebase that's maintainable and has less WTF-moments. There's definitely a trade-off between RAD and a framework that is predictable.

    Cheers!

  • 2016-09-26 Thierno Diop

    Hi ryan what do you think about the comparaison of symfony and rails in term of performance and rapidy of développement thxxx

  • 2016-07-19 Luciano Marinho

    Thank you Victor =)

  • 2016-07-19 Victor Bocharsky

    Hey Luciano!

    Yes, you can check the Symfony Fundamentals: Bundles, Configuration & Environments next.
    A list of all subsequent courses is here: https://knpuniversity.com/trac... .

    Cheers!

  • 2016-07-16 Luciano Marinho

    There is a continuation of this tutorial ? Can I give me url to this ? I'll to learn more about symfony and I love this tutorial

  • 2016-07-16 Luciano Marinho

    I can see it. Thanks

  • 2016-07-16 weaverryan

    Hey Luciano!

    If you're a subscriber, you'll see a Download link on the upper right of every video page - for the code. After you unzip the code, there will be a "start" and "finish" directory - both contain the tutorial directory. If you're not a subscriber, you can find the start code here: https://github.com/knpuniversi...

    I hope that helps!

  • 2016-07-15 Luciano Marinho

    I'm in 9.1 where speak about 'tutorial' directory...but, where is the download link to that files ?

  • 2016-06-26 weaverryan

    Yea, that makes really good sense - and I bet others would also like this! I've added it to our internal list - but it probably won't make it onto the schedule anytime soon, unfortunately - so many things to get to :)

    Thanks for the details on this!

  • 2016-06-24 Reynier Pérez Mira

    Hi there weaverryan the problem is not the link getting old but poor information. This video is only for Routing stuff but what about databases? configuration? everything else? I've been looking around for a while and I did found a few links from StackOverflow and OctiviLabs (http://labs.octivi.com/databas... ) and also, maybe, some helpful bundles https://github.com/tahoelimite... but is not helpful at all. I would like to see something for newbies a simple application sharing same code but multi-tenancy databases in order to understand how to handle this part using Symfony. What do you think?

  • 2016-06-24 weaverryan

    I think we might be able to do this :). Tell me, this link is a bit old, but how far does this go to help you? Or are you after something else entirely? https://knpuniversity.com/scre...

  • 2016-06-23 Reynier Pérez Mira

    weaverryan would be possible to have kind of tutorial for a multi-tenancy application using Symony2|3? That would be great and I am looking to it but so far docs on Internet are not good enough, so what you think?

  • 2016-06-23 Victor Bocharsky

    Great! I'm glad it works. :)

    OK, I'll look at it too.

  • 2016-06-23 Sudhir Gupta

    hey Victor Bocharsky
    thanking for replying.
    its working fine now.
    your knp tutorials are awesome.

    however i have posted one another question at https://knpuniversity.com/screencast/fosuserbundle-ftw/fos-user-bundle
    would you like to answer pls?

  • 2016-06-23 Robert

    I have managed to fix this, for some reason the cache was not clearing as it supposed to. In such scenarios it is then necessary to delete the whole folder var/cache/prod.

    Regards,

    Robert

  • 2016-06-23 Victor Bocharsky

    Hey, Sudhir!

    For example, you have a file "app.js" in your directory structure like: web/vendor/FOSUserBundle/Resources/JS/app.js. Please, check one more time you are doing it right.

    To include this file in your template, you need to build a correct link to it. The "asset()" twig function helps you here. Put the next code somewhere in your HTML code (probably somewhere in <head> or before a closing </body> tag ):

    <script type="text/javascript" src="{{ asset('vendor/FOSUserBundleResources/JS/app.js') }}"></script>


    NOTE: You don't need to use "web/" prefix in the path, asset() function handle it for you.

    To ensure it works, In your "app.js" you need to write only one single line like:

    alert('Hello FOS!');

    Go to the page where you include this app.js file and let me know if you still don't see the "Hello FOS" alert.

    Cheers!

  • 2016-06-23 Victor Bocharsky

    Hey, Robert!

    You can just do php bin/console cache:clear && php bin/console cache:clear --env=prod. By default, you have the DEV environment in Symfony console.

    It's a bit weird if page works in DEV env and doesn't work in PROD on remote server. Could you try to remove cache folders manually (var/cache/prod and var/cache/dev) instead of using console command? Please, ensure that these folders are gone from cache directory. Does it help?

    From logs I can see that script unable to create "var/sessions/prod" folder. Could you create it manually and see if it helps? Also ensure that "var/sessions/prod" folder is created and you don't have any permission errors.

  • 2016-06-23 Sudhir Gupta

    yeah.. sounds very logical.
    so for better directory structure and convenience for UI developer, i make a folder hierarchy as

    web/vendor/FOSUserBundleResources/JS and
    web/vendor/FOSUserBundleResources/ css

    i don't know why.. everything is file but my javascript is not executing. Even i test alert('Hello FOS') but still no response.
    i am still debugging..

  • 2016-06-22 weaverryan

    Hi Sudhir!

    Ok, good question! A few things:

    1) You can't actually edit the FOSUserBundle in your vendor directory - this is 3rd party code - if you modify this directory, you may lose those changes when you upgrade that library in the future (you also typically do *not* commit the vendor/ directory to version control - e.g. git)

    2) But, in general, you have described a very valid question: "How can I put CSS/JS into my bundle, and add a link to it?". I don't recommend doing this anymore - I keep thing simple and put my CSS/JS in the web directory. But, this is entirely subjective: you are certainly free to put CSS/JS into your bundle. The problem - of course - is that your web server sees the web/ directory as your document root. Put simply: nothing outside of web/ is publicly accessible to your user. Fortunately, Symfony has a built-in workaround for this. We talk about it in our Symfony2 series actually: http://knpuniversity.com/scree...

    So yes, it is possible!

  • 2016-06-22 Robert

    Dear Victor,

    Thank you for your hint. I have zipped the directory and unzipped it on the server. Once that is being done I get a blank page when the app.php runs in prod environment with debug being set to false.

    Before putting everything onto the server, I have cleared cache via php bin/console cache:clear & php bin/console cache:clear --env=prod & php bin/console cache:clear --env=dev --no-debug.

    The error log that I am getting is of this manner:

    [22-Jun-2016 12:32:49 America/Denver] PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Session Storage was not able to create directory "/home2/howtowit/public_html/howtowit\app/../var/sessions/prod"' in /home/domain/public_html/subdirectoryvendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php:52
    Stack trace:
    #0 /home/domain/public_html/subdirectory/var/cache/prod/appProdProjectContainer.php(2163): Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler->__construct('/home/domain...')
    #1 /home/domain/public_html/subdirectory/var/bootstrap.php.cache(2118): appProdProjectContainer->getSession_HandlerService()
    #2 /home/domain/public_html/subdirectory/var/cache/prod/appProdProjectContainer.php(2202): Symfony\Component\DependencyInjection\Container->get('session.handler')
    #3 /home2/howtowit/public_html/howtowit/var/bootstrap.php.cache(2118): appProdProjectContainer->getSession_Storage_NativeService()
    #4 /home2/howtowit/public_html/howtowit/var/cache/prod/appProdPro in /home2/howtowit/public_html/howtowit/vendor/twig/twig/lib/Twig/Loader/Filesystem.php on line 94

    Using the dev environment everything works fine on the remote server. Similarily, using prod configuration with debug being set false on my localhost works fine.

    What do you suggest?

    Thank you for your input,

    Robert

  • 2016-06-22 Sudhir Gupta

    Hi weaverryan

    Please look this scenario.
    in my symfony 2.8 project i have FOSUserBundle under vendor (as we had already discussed in PRE_1 and PRE_2).
    in that bundle i want to put a public folder, which will content my all css and js file (only related to FOSuserbundle) (i want to use this css and js globally for another bundle also )

    i want to reference these js and css in base.html.twig under FOSuserbundle. But unfortunately all link which i am providing is linking to "web" folder. (web/css and web/js)

    i don't want to use this directory. i want to put all my css and js under vendor / pubic/ css and /js

    is it possible ?

  • 2016-06-22 Victor Bocharsky

    Hey, Robert!

    I can give you some advices.

    1) Yes, Symfony has a lot of dependencies, so you can try to zip all files locally, transfer it to the production, and unzip them. But this way you can stuck with server recourses limitation (memory, free disc space, etc). The another option is to transfer all files except "/vendor/" dir and after that run "composer install" on production. Composer installs dependencies more quickly (some packages loads from cache). You could do it even faster, if you have cloned Git repository of your project on production, then you just need to pull changes which need to be deployed and run "composer install" and maybe few more command after it (i.e. run migrations, load or compile your assess, etc.).

    You also can take a look at other deploy tools like Capistrano, but they're more complex to configure. If you are interesting in a more ways to deploy a Symfony application, check How to Deploy a Symfony Application article from Symfony docs.

    2) Yes, you can delete it, but the better option is to make a proper configuration of your production web server (it's possibly Nginx or Apache). You need to point all requests handling with /web/app.php front controller. There're few Symfony docs examples that shows you how to configure it. It you configure it properly, then each request to the "app_dev.php" will be handled with "app.php".

    I hope I help with it.

    Cheers!

  • 2016-06-21 Robert

    Hi Ryan,

    I would like to ask for your thoughts about deploying a ready application from a dev into production on a hosting. The basic Symfony has close to 7000 files in its basic form. It takes 1-2h to transfer it via FTP. Is there any better way of doing this?

    Secondly, in order to disable the dev environment shall I simply delete the app_dev.php once the application is uploaded on the server or is there a different method of doing it?

    Thank you,

    Robert

  • 2016-06-14 weaverryan

    Well, you just made my day! I'm *so* happy you found the tutorials useful and fun *and* that the scripts were helpful! It's really important to us to make those available :). Good luck on your journey - becoming a webdev is not an "easy" task, which is why it's so rewarding.

    Cheers!

  • 2016-06-12 Karlola

    I just flooded another thread here with an unneeded panicking comment, so I want to leave some positivity too :) I am an English-Polish translator desperately trying to morph into a web devel. This course is priceless help after I struggled to understand OOP and SF during a weekend course AND to keep my job. Also, I am a hard-of-hearing person with very little auditory training in English but I absolutely get what you are saying in the witty videos! Thank you for caring about the sound quality and providing the script for those of us who don't even see a point in having headphones at home :)

  • 2016-06-03 Dan Costinel

    Yep, now all things are clear! Thank you!

  • 2016-06-03 weaverryan

    Hi Dan!

    Yes, I know *exactly* why you are confused :). Here's what happened

    1) In all versions of Symfony, there is a web/.htaccess file that tells Apache to *always* use app.php (the prod environment) unless app_dev.php is in the URL. This explains why you would go to http://example.com (after clearing the prod cache) and see your app in the prod environment (with no web debug toolbar).

    2) However, if you use the built-in PHP web server instead of Apache while developing, then Symfony tells the web server to use app_dev.php by default, instead of app.php. So, when you go to localhost:8000, it is actually executing localhost:8000/app_dev.php - this gives you the web debug toolbar.

    So actually, this isn't a difference between Symfony 2 and Symfony 3, however I *do* show the built-in web server a lot more now than I used to :). The basic point is this: if you execute app.php then you are in the "prod" environment. If you execute app_dev.php you are in the dev environment. And if you don't include *either* of these in your URL, then it's up to your web server to decide which to use by default. The built-in PHP web server uses app_dev.php. But you should configure Apache (which will happen automatically thanks to the .htaccess file) or Nginx to use app.php by default in real-life.

    I hope that clarifies!

  • 2016-06-03 Dan Costinel

    Hi Ryan. Can you please answer a question? Before Symfony 3, to access the app in dev mode, I used /app_dev.php/ in front of any exiting and non-existing route, and the web profiler was there to help. When I needed to see the app in prod mode, I deleted the app_dev.php part, I received a 500 Internal Server Error, I cleared the cache for prod env, and then I could see the page in prod mode w/o probs. But now, the things had changed. In the sense that, even if I proceed with those things, when I access the app, in prod mode, the web profiler is still there! And another problem is that if I use a Symfony version < 3, the behaviour is still the same! (the web profiler is still present in prod mode). Any advice?
    Thank you!

  • 2016-06-01 Shairyar Baig

    yup thats what I ended up doing, thanks.

  • 2016-05-31 weaverryan

    Yep, it's likely because of the localhost part - most email providers (like gmail) I believe like to download that image themselves and proxy it to you, so that would fail. Honestly, we often hardcode our production URL for assets in emails (e.g. https://knpuniversity.com/...).

    Cheers!

  • 2016-05-25 Shairyar Baig

    I am working on localhost and the email is being generated via controller, for example when a user registers a welcome email is sent and in that email i am trying to add a logo if i

    dump {{ absolute_url(asset('images/logo.jpg')) }} 

    i see a complete path http://127.0.0.1:8000/images/logo.png but i see no image in email, even if i don’t use an image variable and hardcode the path still i don’t see the image.

    I am guessing it could be because i am on http://127.0.0.1:8000

  • 2016-05-25 weaverryan

    Hey Baig!

    Are you sending the emails via a console command? If so, check this out: http://symfony.com/doc/current...

    If not, can you see what URL is being generated for your image? Is the hostname correct?

    Cheers!

  • 2016-05-24 Shairyar Baig

    Hi Ryan,

    Is there anything special we need to do when we want to embed image in an email?

    For example if I do

    {{ absolute_url(asset('images/logo.jpg')) }}

    and when i get email all i see is the image holder that generally appears when the image is missing, I looked into the symfony documentation and its doing the same thing so what am i missing here?

    Regards,
    Baig

  • 2016-05-23 kokers

    <3

  • 2016-05-19 Jonathan Keen

    Just a recommendation, cause it drives me nuts sometimes, would be to have a 'PHPStorm setup and go' tutorial for Symfony. Something that goes through path mapping for the built in web server and setting up XDebug. Sometimes I feel like I spend more time getting XDebug to work right then actually using it. Perhaps this could include setting up PHPUnit tests to use XDebug as well.

    Anyways, just a thought. Something you probably do daily but it at times drives me crazy because I feel like I'm never doing it right. lol

  • 2016-05-11 weaverryan

    Ah, thank you and cheers mate!

  • 2016-05-11 weaverryan

    Ah, thank you Paulo! Now go kick butt at your job ;)

  • 2016-05-11 Oussama Ziat

    I'm a beginner in symfony. and so far , You make the best tutorials ! like really keep up the work :D ( plus it's fun )

  • 2016-05-11 Paulo Gouveia

    Mr. Weaver, your course is amazing. The content I've learned here, will really help my job. Thank you very much!

  • 2016-05-02 weaverryan

    We're thinking about "sub-titling" in English, so it's very easy to see the English words along with the video. After that, if there's enough demand, we may make it possible to translate those captions into other languages :).

    Cheers!

  • 2016-05-01 Ленур

    and other langs(russia for example) :)

  • 2016-04-24 weaverryan

    Hi Andrés!

    Great idea :). This is something we are planning to implement in a few months actually - I think it will be really cool!

    Thanks for nice words about the courses!

  • 2016-04-23 Andrés Vr

    Hello Ryan

    I'm Andrés, your courses are really awsome, but i'm latin american, and in some of videos I need a subtitles to understand in 100% of the tutorial, sorry for my english it is not pretty well!!!!

  • 2016-04-01 weaverryan

    Hey!

    I haven't used those tools specifically, but I might check them out for a future tutorial. Currently, I use platform.sh for some of my applications (it's young, but is quite interesting) - it's a PAAS, so it handles deployment. For other smaller apps, I have - in the past - used simple git pulls to deploy (not a great long-term situation, but quick to start). I would also suggest looking at Laravel Forge - it comes from the Laravel world, but is not just a tool for Laravel.

    Cheers!

  • 2016-03-30 Bettinz

    2 weeks trying with deployer (deployer.org) and Magallanes (magephp.com) without results. I can't find a tutorial about how to configure that tools because everyone speaks about capifony :( Please, guide me

  • 2016-03-30 Patrick van Beck

    All right, I will check CloudFlare out :) . If the token storage does not work, I have a plan b with a session value that gets set when the user is logged in. Thanks!

    Update: You will not have access to the token storage within the authenticator, but the trick with using a session variable is working like a charm.

  • 2016-03-29 weaverryan

    Hi Patrick!

    Yes, you're right that if you exclusively use Guard authenticators, then you should have full control :). I *think* (though have never tried) that you should be able to determine if the current user is logged in or not from inside an authenticator (you may need to inject the entire container, then fetch the security.token_storage service to do this... or maybe not - try it out!).

    Almost none of us are security experts, but I don't see the attack vector here. If you were worried about someone trying to brute-force the login form (to try a bunch of usernames and passwords), then they could just logout and then try that. And while this style of attack is possible, it's not an attack that effects many people: you probably need to be hiding *very* high value data in order for someone to care enough to do this. Like always, deciding your level of security is a bit subjective. You might also look into CloudFlare - they can detect many bad requests and also prevent DDOS /brute force situations I believe.

    Cheers!

  • 2016-03-29 Patrick van Beck

    Hey Ryan, thanks for you reply! You are right, I meant the "direct post request" of the Login route. I always try to develop of an "attackers" point of view, I m no pro in web attacks but I just thought that there may come the point where the session gets "crashed" or even worse mixed up a bit, maybe this could lead to a security concern / hole. I think I found a solution that was developed by you :) when using guard custom authentication, I should be able to control all regarding the authentication / authorization process including the security check for post requests that might come from an attacker when he is already logged in an account. Is this too much overhead? I don't like scenarios where I don't have full control and at the same time I also don't know what kind of security risks may appear due to that. I hope I explained it a bit more comprehensible now :) regards, Patrick

  • 2016-03-29 weaverryan

    Hi Patrick!

    Sorry for my late reply! Do you simply want to prevent him from going to /login? Or - is there some really important security reason why the user can't be allowed to login again (meaning you need to actually protect some clever user from POST'ing to /login_check). On KnpUniversity.com - just for user convenience - we simply check if the user is authenticated in the controller that renders the /login page, and redirect them elsewhere. This doesn't prevent an clever user from POST'ing directly to /login_check, but I can't see a reason why we would need to avoid this. Can you tell met a bit more?

    Cheers!

  • 2016-03-23 Patrick van Beck

    Hey Ryan, I have a "huge" question that I cannot resolve for weeks now . . When a user is already authenticated on the system - but e.g. he has another tab of the login form in his browser opened - how can I prevent him from logging into another account? I tried all listeners (kernel.request, higher priority than firewall listener) and read the docs, but I just don't get it on how to intercept the symfony login process handler that gets fired when calling the route "/login_check"..? Is there any way I can check if a user is already logged in when he tries to authenticate (to prevent that he logs in multiple times)? Regards and thanks a lot for your help! :)

  • 2016-03-21 weaverryan

    A few people have been having that - this should *not* happen, but there's something about the way we're introducing new template files that is confusing Symfony cache this one time. It might just be that the files you copy have an older "last modified date" - so when you copy them in place, Symfony thinks that those modified templates contain *old* changes - not new changes that require a cache refresh. It's a special circumstance from the tutorial :).

    Cheers!

  • 2016-03-20 Beenelvi Godoy Lunazco

    Thanks! I think there was a cache problem... like i told you, i already had solve it changing the name of the directory but trying to test your recommendations, I changed the name again (to knp and knpu) and there wasn't any problem then i suppose there was just cache. Some wierd but it is ok .. now i know what to do if something similar occur again. (y)

  • 2016-03-20 weaverryan

    Hi there!

    Thanks for the nice words :). Renaming the project director my shouldn't be a problem. First, try making *any* change to base.html.twig and refresh. If there are any weird caching problems, that would fix them. If that doesn't work, view the HTML source on your page. Do you see link tags? If you do, then the Teig template is ok, but the CSS files might be in the wrong place. If you don't, the problem is in Twig somewhere.

    Cheers!

  • 2016-03-20 Beenelvi Godoy Lunazco

    Hi congratulations for your videos i really like them and are easy to understand... I have a question...in the "loading css & JS Assets" video. I copied all the things you copied in the right order, but when i refreshed the page it did not show the images and the "note" section...what i did was change the name of the project directory from "knp" to "aqua_note"(like you) my question is why this happened? this has to do with assets? In the previous videos all was ok. Thanks for your time.

  • 2016-03-15 Bettinz

    I manage my own vps right now so I can enable ssh but a lot of hosting providers disable ssh by default. So I think is helpful to cover all possibilities.
    I've looked into capistrano, for example, but I'm not comfortable with ruby, and a lot of plugins like capifony are for symfony and symfony 2 ;)

  • 2016-03-15 weaverryan

    We will *definitely* do that - there are a lot of neat ways to deploy. But, having ssh access will make your life *much* easier no matter how you deploy. Do you have a host that doesn't have ssh access?

    Cheers!

  • 2016-03-15 Bettinz

    Hello, I want to suggest a new chapter about "after the project". I mean how to deploy to a webserver and how to get the site ready (example disabling dev environment), and how to deploy without ssh access (example uploading to a "public_html" the /web folder). There aren't so much informations online about deploy a symfony project. Thank you

  • 2016-03-11 Carlos Reyes

    thank you, i have the code, great tutorial Cheers!

  • 2016-03-10 weaverryan

    Hi Carlos!

    I think I can help! On any video page, there is a "Download" button in the upper right. Click that and then click "Course Code". Once you unzip the download, look for a "start/tutorial" directory. Let me know if you have any issues!

    Cheers!

  • 2016-03-08 Carlos Reyes

    Hi i'm from mexico, and i have a problem, everything was fine until Chapter 9 because I can not find the "tutorial" directory i don't know where I have to download the code of this project, could you help me? thanks for your time

  • 2016-03-08 Diego Aguiar

    Hey Ryan!
    I had a twist on my career and jumped into Node.js and javascript for a while, but now I'm planning to return where I was and continue learning symfony.

    Sounds great what you are planning to do, keep up the good work! :]

  • 2016-03-08 weaverryan

    Hi Diego!

    Welcome back! Where have you been ;). And great question. We are releasing a whole new giant (even bigger than before) Symfony 3 series right now (http://knpuniversity.com/track.... But, if you *are* going through the Symfony 2 screencasts, they're still relevant. Yes, you will sometimes be using deprecated features and sometimes "older" best practices. However, usually the new, non-deprecated ways of doing things in Symfony 3 are very similar - so you'll still absolutely learn the most important concepts. But if what you're looking for has already been released in the Symfony 3 series, then definitely go there. In your case, the login form stuff has not been released yet, and this has not changed in any significant way (a few things were just renamed mostly). Also, if you have a complex security situation - check out the new "Guard" component - that's something we'll cover heavily in the new tutorial, but it's already documented and I have some presentations out there about it.

    We're planning to release the security episode a few months from now.

    Cheers!

  • 2016-03-07 Diego Aguiar

    Hello Ryan, after a year I came back to symfony and realized that symfony3 has been released. I'm wondering if your other videos for Symfony2 are still good to follow or there are some deprecated/old features that are not recommended to keep using.

    I specially refer to the Login Form part

    Thanks for your time!

  • 2016-03-03 Jaroslav Mohila

    I want more! great tutorial ! :)

  • 2016-02-28 Andrei Pall

    Great tutorial. Thanks! :)

  • 2016-02-25 weaverryan

    Hey Léo! There will be soon: http://knpuniversity.com/scree.... Cheers!

  • 2016-02-23 Léo Li

    Hello, it there any upgrade for the part of login form and security in Symfony 3?

  • 2016-02-22 weaverryan

    That's beyond the scope of this tutorial (I wanted to only *touch* React), but it's definitely a good suggestion for a possible future tutorial that talks more about React itself :). Cheers Trent!

  • 2016-02-20 Trent Steel

    I'd love to see an example of this without babel and have the js compiled using something like webpack.

  • 2016-02-11 Niel Shine

    Thanks :)

  • 2016-02-08 weaverryan

    Hi Miguel!

    You're doing fine - in the JSON Responses + Route Generation chapter, we remove the `$notes` variable in the render call in showAction(), and this temporarily breaks the "show" page (while we're working on the JSON endpoint). But, we fix this in the last chapter by removing that variable in the Twig template and populating it dynamically with JavaScript.

    I hope that helps - I didn't mean to confuse anyone :)

  • 2016-02-05 Miguel Ángel Purriños Vera

    Hi, I´m having an error when I follow the steps on video: JSON Responses + Route Generation.

    The error is Variable "notes" does not exist in genus\show.html.twig at line 25
    500 Internal Server Error - Twig_Error_Runtime

    I can´t solve it. I copy the docs from the tutorial. Can you give me some clue?

  • 2016-02-01 Levan Lomia

    ah thank you very much!

  • 2016-02-01 weaverryan

    Hey Niel!

    I'm not sure I understand your question - I like using VichUploaderBundle for uploading items to the site, but there is also some information about uploading on Symfony.com. I'm not sure what you mean by yml configuration - but please feel free to clarify :)

    Cheers!

  • 2016-01-31 Niel Shine

    How to upload an image in symfony with configuration as yml?

  • 2016-01-26 weaverryan

    Hey Vladimir!

    Yes, if you buy the individual Symfony 2 tutorials, then you would need to pay again for the Symfony 3 tutorials - the new ones are completely re-created from scratch. The first Symfony 3 tutorial is already (and free!) and we hope to start getting the additional Symfony 3 tutorials out over the next month so that you won't have to choose - apologies for that :). If you have a subscription, then you'll of course get access to everything that is out while you have your membership.

    Cheers!

  • 2016-01-26 weaverryan

    You nailed it - I have JSONView installed - it makes my JSON look pretty :).