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 store, 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!

                Sponsor the Symfony project.

http://feedproxy.google.com/~r/symfony/blog/~3/dF85jA5cfCc/read-the-fast-track-book-updated-for-symfony-5-2

Utworzony 4y | 8 lut 2021, 09:20:07


Zaloguj się, aby dodać komentarz

Inne posty w tej grupie

New in Symfony 7.3: DX Improvements (part 1)

Symfony 7.3 includes many small improvements aimed at making developers' lives easier and more productive. This blog post highlights some of the most useful DX (Developer Experience) features added in

28 maj 2025, 09:50:15 | Symfony
New in Symfony 7.3: Validator Improvements

Symfony 7.3 introduces several enhancements to the Validator component, focusing on developer experience, better configurability, and more expressive constraint definitions.

Allow to Disable Translat

27 maj 2025, 08:30:20 | Symfony
New in Symfony 7.3: Serializer Improvements

Symfony 7.3 adds a new JsonStreamer component as a high-performance, low-memory JSON encoding and decoding utility. However, the Serializer component still has many valid use cases, even for JSON cont

26 maj 2025, 09:20:09 | Symfony
Symfony 7.3.0-RC1 released

Symfony 7.3.0-RC1 has just been released. This is a pre-release version of Symfony 7.3. If you want to test it in your own applications before its final release, run the following commands:

26 maj 2025, 00:10:10 | Symfony
A Week of Symfony #960 (May 19–25, 2025)

This week, development activity focused on putting the final touches on Symfony 7.3 in preparation for its stable release next week. In addition, we published a security fix for a potential vulnerabil

25 maj 2025, 10:10:12 | Symfony
New in Symfony 7.3: New Bridges and Improved Integrations

Symfony's bridge packages integrate third-party services, such as mailers, notifiers, and translation providers, into Symfony applications. With more than 120 bridges available today, Symfony supports

23 maj 2025, 09:30:04 | Symfony
New in Symfony 7.3: Messenger Improvements

Symfony Messenger component keeps evolving to meet the needs of complex, modern applications. In Symfony 7.3, we're introducing several powerful features to it.

Run Process Using the Shell… https://s

22 maj 2025, 07:50:11 | Symfony