PHP

· Lars Nielsen

Doctrine proxies are going away: PHP 8.4 lazy objects explained

If you have ever wondered why Doctrine entities cannot be final, this is the article that answers it. And the answer stops being true in PHP 8.4.

This is the largest change in the Symfony 8 and Doctrine 4 move, and it is not really a framework change at all. It is a PHP language feature removing the need for a fifteen-year-old workaround.

Read article Doctrine proxies are going away: PHP 8.4 lazy objects explained
· Lars Nielsen

Symfony 6.4 to 7.4: the upgrade to do before November 2026

Symfony 6.4 stops receiving bug fixes in November 2026. Security fixes continue for another year, until November 2027, but after that the version is done.

If you are on 6.4, this is your window. And the good news is that the upgrade is much less work than the version numbers suggest, provided you understand what Symfony is actually asking you to do.

Read article Symfony 6.4 to 7.4: the upgrade to do before November 2026
· Lars Nielsen

Dependency inversion in Symfony: what autowiring made easy, and what it made optional

Autowiring is one of the better things to happen to PHP. Typehint a class in a constructor, and Symfony finds it, builds it, and hands it over. No configuration, no factory, no container gymnastics. A generation of PHP developers now writes dependency injection without ever thinking about it, which is exactly what good tooling should achieve.

Read article Dependency inversion in Symfony: what autowiring made easy, and what it made optional
· Lars Nielsen

Provisioning a PHP web server with Ansible: MySQL, PHP-FPM, nginx and Let's Encrypt

Four packages, one playbook. This should be a boring afternoon, and it mostly is — except for one ordering problem that breaks almost every tutorial on the subject, in a way that only shows up on a genuinely fresh server.

So let me start there, because if you understand it the rest is just YAML.

Read article Provisioning a PHP web server with Ansible: MySQL, PHP-FPM, nginx and Let's Encrypt
Subscribe to PHP