As part of work on Annotated Container v3 I upgraded to using PHPUnit 11. Taking an extensive test suite from PHPUnit 9 to 11 had a few hurdles along the way. This article talks about some of my experiences migrating to using PHPUnit 11 as well as a serious concern I have with an upcoming change in PHPUnit 12.
A feature I have long wanted to implement in Annotated Container is the ability to inject a collection of services. This has long eluded me but after some light hair pulling, deep code diving, and a change in how I was thinking about the problem I finally managed to solve the puzzle! In this article take a look at how to use this new feature of Annotated Container.
When I've gotten the chance to talk to people about Annotated Container a common refrain is they don't like the idea of adding Attributes to their domain layer. While I focus a lot of articles and documentation on doing just that, it isn't the only way to use Annotated Container. In fact, you can use the library without using Attributes at all or take an approach that prevents Attributes spreading throughout your domain layer.
A look at three features released with Annotated Container v2.2. Including container validation, the third supported container, and better developer experience with custom parameter stores.
I was recently asked my thoughts on autowiring and dependency injection on social media. This post is a deep dive into dependency injection autowiring with Annotated Container; how it is implemented, different solutions for autowiring with use cases, and future improvements to exposing the magic behind autowiring.
A look at cspray/marked-logs and Monolog channels and how these 2 libraries can work with one another.
An overview of a library I've created, designed for testing database interactions in your PHP apps.
Talks about some reasons Annotated Container uses Attributes to configure dependency injection.
A wrap-up of my time spent creating Annotated Container.
Part 2 of a 3-part series introducing a dependency injection framework named Annotated Container. In this article, I go into detail how to solve three common problems working with Annotated Container; dealing with multiple aliases, injecting non-object values, and integrating with third-party services that can't be annotated.
Part 1 of a 3-part series introducing a dependency injection framework powered by PHP 8 Attributes. This article provides some motivations behind the library and basic usage.
While reviewing popular PHP frameworks I ran into some problems customizing the default App namespace commonly used in project scaffolding. This article talks about how to customize the namespace for a Symfony app to ensure expected functionality in a new setup still works.