Cartoon avatar of Charles Sprayberry
cspray.io

Thoughts on PHPUnit 11

php php-unit

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.

Injecting Service Collections with Annotated Container

php annotated-container

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.

Annotated Container Without Attributes

php 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.

Annotated Container v2.2

php annotated-container

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.

Autowiring and Annotated Container

php annotated-container

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.

Introducing Annotated Container - Part 2

php 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.

Thoughts on HBO Max

hbo-max security

Recently social media has been talking about an HBO Max intern that sent an integration testing email to their production mailing list. The focus of a lot of this attention has been on the intern themselves. However, we should be placing more scrutiny on HBO's reaction to this problem.

Customize Symfony Namespaces

php symfony

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.

Embracing Polywork

networking career-building

I recently got invited to Polywork, a new take on a professional social network. In this article I talk about why I really like Polywork and some of the reasons I think it is better than LinkedIn.

Introducing AsyncUnit

async-php testing

I ran into some problems creating an integration test in an Amp powered application that needed to establish a connection to a database. Not finding a suitable solution with PHPUnit or existing testing frameworks I started writing my own with first-class support for asynchronous PHP.

A General Update

personal meta

2020 was an absolutely crazy, awful year. Unfortunately it followed up what was the worst year of my life in 2019. In this article I talk about my experiences with the pandemic and why my blog has been quiet.

Getting back a lost domain

meta

My original blog was hosted on cspray.net. Unfortunately, I made a beginner mistake and forgot to renew my website. I thought it was lost forever but eventually I was able to get it back.

The true and false value

javascript

In a deployment to our production application we discovered a long-standing bug that had only just now decided to show itself. Tracking down what was wrong I discovered a value that was simultaneously being treated as true and false!

The Bedpan

personal

My mom was diagnosed with terminal cancer and became bed-ridden. I cared for her while she died a painful, degrading death. In this article I talk about something I take for granted but can be taken from you…using the bathroom.