Craig Marvelley

Software and such

Resources for Learning Symfony2

I’ve been asked a few times what the best resources are for learning Symfony2. With the project still relatively young there aren’t yet (to my knowledge, anyway!) any books (physical or otherwise) on Symfony2 available, but there is a good amount of information in the form of manuals and tutorials on the web to get on with.

This question on Stack Overflow lists most of them; specifically:

  • The Book: The official documentation, also available as a PDF download from the same location. The best place to start, and covers most of Symfony’s functionality, but doesn’t have many ‘real-world’ examples, as opposed to…
  • The Cookbook: Complements The Book by providing some more complicated examples of how Symfony2 can be used – sometimes the example you’re desperately searching for doesn’t feature, but on the whole it’s necessary reading to understand what Symfony2′s capable of and the best ways to use it.
  • It’s not strictly a Symfony2 resource, but Fabien Potencier’s ‘Build your own framework’ series of articles use the same components that make up Symfony2 to construct a similar framework, and as such are a really good way to familiarise oneself with the building blocks often become invaluable when trying to accomplish anything complex with Symfony2.

That’s it in terms of ‘official’ resources. There are some really good community efforts too, including:

  • A series of screencasts at KnpUniversity which introduce the key features of Symfony2, from installation and configuration through to security, forms, and using Doctrine to work with data sources. These cost $$$, and I haven’t tried them myself, but KnpLabs have been very involved with the development of Symfony2 so they’re probably well worth a look.
  • The Symblog tutorial is an excellent step-by-step guide to building a blog in Symfony2, covering most of the essential topics, in the spirit of the Jobeet tutorial from the original Symfony framework. Each part of the tutorial points to related articles in the official documentation, so it’s a nice way to work through that while building something tangible.
  • Speaking of the Jobeet tutorial, there’s also a companion tutorial for Symfony2. Like the Symblog tutorial, this explains the MVC approach to development with Symfony2 and dips into functional/unit testing too.
  • I’ve found the PHP and Symfony blog to be one of the best for learning about less common features of the framework, the sort of topics that are crucial when going beyond building the simple blog apps.
  • Richard Miller‘s blog is also excellent for the same reason.

Each of those resources will probably give anyone with decent PHP experience enough information to start building applications with the framework. Questions will inevitably arise, in which case go to the following places for help:

  • The Symfony2 Google Group is handy because often the problem you have has been answered already, so it’s a good resource as well as somewhere to get help from others using the framework.
  • The Symfony2 IRC Channel is good for real-time assistance, and is populated with both experts and newbies. Following the chat is a great way to pick up hints and tips for problems you have yet to encounter.

If there are other good resources that I’ve missed, please let me know and I’ll add them. I’ll try to keep this article up to date in future as new resources emerge.