Every two weeks I send out a newsletter containing lots of interesting stuff for the modern PHP developer. You can expect quick tips, links to interesting tutorials, opinions and packages. Want to learn the cool stuff? Then sign up now!

Dependency injection with League’s new Container

Jens Segers explains how to use PHP League‘s shiny new version of Container. The usage of ContainerInterface seems interesting:

League’s container now implements the ContainerInterface, which is defined by the Container Interoperability group. This is really great as there are a few projects and frameworks which support this interface. For example, the Slim 3 micro framework already allows you to choose your own container flavour, as long as it implements the interface.

Read the full article at Jens’ blog.

The League’s Container seems like a nice alternative to PHP DI that I have been using.

Freek Van der Herten is a partner and developer at Spatie, an Antwerp based company that specializes in creating web apps with Laravel. After hours he writes about modern PHP and Laravel on this blog. When not coding he’s probably rehearsing with his kraut rock band.