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

March 10th, 2019
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.
Charles Sprayberry, along with his chocolate Labrador Retriever Nick

Hi!

My name is Charles Sprayberry. I've been making confused expressions while writing code for the past 10 years. Sometimes I get paid while doing it, other times I do it for free. Occasionally, I get the urge to ramble about the things I've done with code and this website is a collection of those ramblings. My professional and personal focus is currently on PHP, but I have written applications in many other shitty languages. When I'm not writing code or stroking my glorious beard I like to spend time with my wife, play with my dog, shitpost on Twitter, and other things I'm not gonna tell you about.

My OSS Projects

Labrador Kennel

A suite of opinionated libraries and frameworks with the intent of easily building production-ready applications on top of Amp. Provides a foundation for wiring your dependency graph, configuring your app settings, emitting semantic events, creating reusable Plugins, and other utilities when creating async applications. Frameworks built on top of that foundation enable building feature-rich HTTP and CLI applications.

AsyncUnit

With a focus on integration testing AsyncUnit aims to be a well-tested, easy-to-use testing framework with first-class awareness of the Amp Loop. Utilizes PHP8 Attributes to compile your test suite information into a set of runnable test instructions. With the capacity to keep long-running connections to a database or HTTP server open, AsyncUnit is deal for your integration testing. It can be used in conjunction with amphp/phpunit-util or as both your unit and integration testing framework.

Styled ByteStream

Compose immutable OutputStream designed for outputting styled text to a Terminal. With support for the standard 8 ANSI colors and formatting you can easily make your Amp apps interacting with the console a little more colorful.

HTTP CORs

Building a modern web app you've undoubtedly had to deal with Cross Origin Requests. This library aims to make dealing with these type of requests for Amp http-server applications easy to deal with. Providing an array-based configuration and an object-oriented, fluent API for defining CORs makes this library flexible enough to work with however you prefer to handle this concern.