SymfonyWorld Online 2021 Winter Edition December 9 – 10, 2021 100% Online 25 talks and 10 workshops

Read The Fast Track book, updated for Symfony 5.2

If you have ever written a blog post, you probably understand why writing a 350 page long book like The Fast Track is a lot of work. Trust me when I say that updating such a book is an entirely different endeavor. Making sure that all code snippets work as expected is tedious. Updating screnshots is even more laborious. But reading an obsolete book is frustrating for users.

When it comes to updating a book like “The Fast Track” for a new version of Symfony, you’d better be prepared for long hours of work. Hopefully, I anticipated most of the problems before I even started to write the first line of the first chapter a year and half ago. So I was well prepared.

But still, it took me so many hours of not so glamourous work. I was not even able to release the book for Symfony 5.1. But I managed to finish everything for Symfony 5.2 and I’m very happy with the results. I’m so excited to share some more details about what’s new.

First, you must know that updating the book to Symfony 5.2 allowed me to find some bugs in Symfony before it was even released (the same happenned with the first version of the book). I like to think about the book as yet another end-to-end way to test the framework. Updating to Symfony 5.1 and then 5.2 early on also revealed some bugs and incompatibility in third-party bundles. Most of the time, I pinged people to ask them to allow PHP 8 and Symfony 5.2, but also to update their package dependencies. This is a process that takes a lot of time, waiting for problems to be resolved before being able to move to the next step.

Updating the book for Symfony 5.2 and using the latest best practices for that version was the main focus but I managed to do more than that:

  • The code was moved to PHP 8: Changing the version in composer.json and .symfony.cloud.yaml was easy enough, but I went a step further and switch to use PHP 8 native annotations whenever possible. If everything goes fine, I will be able to get rid of annotations in PHPDocs for Symfony 5.3 (I’m just waiting for some third-party to make the switch).
  • I’m always trying to find ways to ease the learning curve. The book is no exception. In the first version, I wanted to show how one can use many services easily for their project, using the best tool for the job (PostgreSQL for the main entity store, RabbitMQ for queues, Redis for cache, …). But it comes at a price. When you are learning Symfony, you don’t want to learn some adjacent technologies at the same time. In the 5.2 version, I’ve used another strategy. The book is using PostgreSQL for everything (which, by the way, is what I recommend for most projects), and a couple of chapters at the end of the book show how to use RabbitMQ and Redis. Best of both worlds!
  • Some third-party bundles released some major versions, so their chapters or sections were updated or rewritten accordingly; we now use EasyAdmin 3 and Panther 1.0 for instance.
  • All screenshots have been updated for Symfony 5.2. This one did not take me a lot of time as it’s all automated.
  • Talking about automation, I have a bot that reads the book, does everything that you should do when reading the book like running commands, applying patches, adding new files, … This has many advantages: ensuring that the code works, checking the impact of changing code in a chapter in all other chapters, having up-to-date screenshots, having a repository with the code as it should be at the end of each section of each chapter, and a few more. I have also updated my toolchain to manage multiple versions so that bumping to 5.3 should be a bit easier.
  • This version contains a lot of small and not so small tweaks in the text, with hopefully better explanations when I got feedback about confusing paragraphs, tips based on feedback, and missing notes from the first version. Two small examples: we were missing instructions about installation instructions for NodeJS and Yarn and we did not document how to switch to another environment on the CLI for Windows users.
  • I would have loved to write new chapters, but I think it is going to be for the next version. I did manage to add a whole section about using Xdebug for step debugging though as I realized that many developers are still using (like me) a bunch of print_r() and exit() calls in their code to debug them.

If you bought the PDF book via Leanpub or via the Symfony shop, you can download the new PDF version on Leanpub now.

Else, consider buying the book today to help Symfony or consider sponsoring me on Github.

You can also read it for free online as I’ve just published the English version on symfony.com.

Last, but not least, translation work will begin soon. As translators will “only” have to translate new paragraphs or paragraphs that changed, it should be a bit easier and faster than the first version.

Enjoy reading the book!

Help the Symfony project!

As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.

Comments

Awesome work Fabien! Love the way you (try to) automated the work, even though it took that many work. It's highly appreciated (anyway it should be)!
Awesome! Glad you switched everything to Postgresql! And ready for one more translation work :)
Have you considered grandfathering in people who backed the book on KickStarter?

Since I haven't heard back when reaching out via Twitter and Email, I have now bought the book twice.

It would be nice to accommodate everyone else who supported the first edition.

What do you think?
Hey!
Really happy about the update! The book is great!
Is it possible that the new version of the repo is not public on github yet? I am not able to clone the repo using `symfony new --version 5.2-1 --book guestbook` as stated in the book.
@Johannes I've fixed the repo issue.
Thxs for the update
Superb update! I think it is a good move you decided to simplify the "many services" approach. I'm starting to like PostgreSQL a lot :).

I would really like to see your implementation of the "bot that reads the book". Willing to share or open source it? Thanks

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.