A New Book About Symfony2: A Year With Symfony

Posted on by Matthias Noback

As you may have heard, I'm working on a book for Symfony2 developers. Besides The Book, which is the user documentation for building Symfony applications, some book-like websites and just a few e-books, there are currently no books for intermediate or advanced Symfony developers. My new book, called A Year With Symfony is exactly that.

If you have been reading the documentation and maybe some blog posts, you will want to know how you can get one step further. You wonder how you could structure your application, for it to be maintainable for more than a month. You ask yourself what it would take to write good bundles, which guidelines you and your team should define and follow. You may also question the built-in security measurements and you or your manager would like to know what needs to built on top of them to make a real secure application. A Year With Symfony will help you find an answer to all these questions.

You will find more information about the book below and on the page for this book hosted by Leanpub: https://leanpub.com/a-year-with-symfony.



Introduction offer

I will present the first edition of the book at the Dutch Symfony Usergroup meetup on September 4th. From then on it will be for sale, via Leanpub (downloadable in EPUB, MOBI and PDF format) for 25 dollars.

If you sign up with your email address on the Leanpub page, I will send you a coupon code, which will give you a discount of 10 dollars. This means you only pay 15 dollars.

Contents of the book

The book starts with an in-depth introduction to all the steps that the Symfony kernel takes when it tries to convert an HTTP request to an appropriate response. This part will cover any events and event listeners involved in this process. I will show you how you can hook into the low-level process, and override the outcome of any intermediate step.

Then the focus shifts to the thing that makes Symfony projects so particularly advanced: the dependency injection container. In the part called Patterns of Dependency Injection I will show you many ways in which you can modify service definitions, tags and arguments to hook the entire graph of services together in the way you want it to be, using container extensions, bundle configuration and compiler passes.

After showing you how things work, and how you can modify existing application flows, the next part of the book will be about project structure - showing you how to lay out the elements of your application: starting from a controller, working towards deeper service layers, demonstrating and defending the use of form handlers, domain managers and event listeners.

Next up is a part about security: Symfony has lots of security measures in place and enabled by default. However, the security of your application and your data is something you should always be very much concerned with. At the moment you doze off while leaning on the framework, you need to have someone to wake you up, in order to prevent bad things from happening. This part of the book will be your wake-up call!

The final part of the book is called Being a Symfony developer. In it I discuss what it takes to be a good Symfony developer. Unsurprisingly: it will take a lot of knowledge about the inner workings of the Symfony components, bridges and bundles. More surprisingly: with all this knowledge, you should then strive for the lowest coupling of your code to framework-specific concepts and classes. This will result in the highest reusability. Whether you will open-source your code or not: it will be better off anyway. In the end, being a Symfony developer means: being a developer, who knows how to integrate his PHP libraries with a Symfony application.

Book PHP Symfony2 A Year With Symfony Leanpub reuse
This website uses MailComments: you can send your comments to this post by email. Read more about MailComments, including suggestions for writing your comments (in HTML or Markdown).
Caim Astraea

Hello! Trying to find more documentation is this book relevant to symfony 2.7?

gmail aanmaken

Hi there, good information. I'm really bussy at the moment, I will buy your book when I have some free time! Peace :)



I have a coupon, but it doesn't work anymore It is possible that coupon has expired already?


Hi Matthias - same question - is the promo coupon avaiable?

Matthias Noback

Not anymore, sorry.


Hello Matthias! I would like to buy your book. Is the coupon promo still available?

tom traan

I already register but still don't get the coupon to buy this book. Did I make something wrong in register process?

Matthias Noback

You should have received the coupon code when the book was published. Could you send me a mail about this (matthiasnoback@gmail.com)?

Francisco Santamaria

I just bought it! Thanks for your dedication Matthias, I appreciate all the effort you put into this book.
Eager to start reading the first pages.


Khaled Attia

Hello Matthias,
How can I get the coupon code?

Thanks for sharing your experience :)

Matthias Noback

Sorry Khaled, the introduction offer is not available anymore.


I already purchased your book! Maybe i am first. Thank you for great effort Matthias :)

Matthias Noback

Thanks, you're welcome!


Just purchachaded your book, just went througha chapter .. already enjoying the book .
will write a review later .

Matthias Noback

Thanks, I would be happy to know what you think of it. Would you please add a link to your review here?


and forms should be a huge chapter, or a small (435345345pages) book :)

Matthias Noback

I have been thinking about adding a forms chapter but indeed, I think it would require a separate book. Maybe some day ;)


Great! I can't wait to see your book

Matthias Noback

Thanks, it's almost done!


Great news!
waited for ever for a sf2 book!


I signed up in Leanpub page but doesn't received the cupon.

An idea for next book: one of my dificulties with Symfony2 was how to resolved the 10 tipical input forms in a web application.
It would be very very interesting to see all that resolved and explain in a book.

Sorry about my english.

Matthias Noback

Hi Marcelo,
Maybe that was not clear: the coupon code will follow later - only when the book has become available.
Which typical input forms do you mean? Can you send me a link?
Forms is definitely a thing on my list to write about!


what version of Symfony will you use in your book?

Matthias Noback

Hi Jose,
Things I write in the book will be applicable to version 2.1 to 2.3.


Great! looking forward for it :)


Hi Matthias,

cant wait to get my hand on the book , but unfortunately the website is down


Matthias Noback

Great! Well, I didn't notice any problem - but the site is working now.

Heiko Krebs

Great, looking forward to it!

Maciej PyszyƄski

Already signed up:D

Matthias Noback

Good! :)

Tony Lemke

Just signed up on leanpub and hope to get you book as soon as possible.

P.S.: Thanks for not writing a book for rookies, but for advanced developers. You are completely right: Finding advanced arcticles like yours or cordovals is hard!

Matthias Noback

Thanks Tony!


hi there, nice article news, i will get it right away thanks