Lazy Objects for Dependency Injection in PHP (Deep Dive)

Published: 12 June 2025
on channel: Tideways
443
22

Subscribe to my newsletter for PHP performance content: https://tideways.com/newsletter?utm_s...

Try our PHP Profiler: https://tideways.com/profiler/feature...

The new Lazy Object RFC in PHP 8.4 will have a big effect on Dependency Injection in PHP and in this video I will explain how based on a simple container example and the Symfony DIC.

Along the way I talk about:

https://wiki.php.net/rfc/lazy-objects
https://mwop.net/blog/245-Autoloading...
https://github.com/symfony/symfony/pu...

00:00 Introduction
01:13 Lazy Services in Dependency Injection
03:51 Lazy Objects PHP RFC Review
06:04 Simple Lazy Container Example
16:48 Symfony with Lazy Objects
23:05 Ending


On this page of the site you can watch the video online Lazy Objects for Dependency Injection in PHP (Deep Dive) with a duration of hours minute second in good quality, which was uploaded by the user Tideways 12 June 2025, share the link with friends and acquaintances, this video has already been watched 443 times on youtube and it was liked by 22 viewers. Enjoy your viewing!