• Feature Request: Make it possible to provide a class instance to binding transformers

    Currently, event bindings are supported using a callback. Ready::class => [ [‘action’ => ‘init’, ‘transformer’ => function () { $ready = null; if (!self::$initRan) { $ready = new Ready(); self::$initRan = true; } return $ready; }] ], This tends to be overly terse, and require calls like this in cases where you want to encapsulate the logic: $saleTransformerCallback = fn($orderId, $orderData) => $this->container->get( SaleTriggeredTransformer::class )->getSaleTriggeredEvent($orderId, $orderData); SaleTriggered::class => [ [‘action’ => ‘action’, ‘transformer’ => $saleTransformerCallback], ], It would be much nicer if it were possible to do this, instead: SaleTriggered::class => [ [‘action’ => ‘action’, ‘transformer’ => SaleTriggeredTransformer::class], ], Would…

  • Archive The Mutator Package

    Why We’re Saying Goodbye to Mutators The Mutator package, while well-intentioned, has become a source of unnecessary complexity in our development workflow. What started as an attempt to create a flexible data transformation system has instead created a maze of interfaces, adapters, and callbacks that obscure the true intent of our code. The Problem with Mutators Our current Mutator pattern introduces: A Better Path: Event-Driven Mutations Instead of wrestling with complex Mutator interfaces, we’re embracing a more intuitive approach: Simple, Direct Event Transformations class UserRegisteredEvent implements Event { private string $email; private string $name; public function setEmail(string $email): self {…

  • Pitch: Remove Core Package Completely

    The heart of the nomadic approach is that your code should be free to travel and adapt, like a digital nomad who can work from anywhere. The existence of a core package actually contradicts this fundamental principle. Here’s why: The solution is to break down the core package into focused, independent tools that developers can use as needed. Each piece should solve a specific problem in making code more portable, without creating dependencies on PHPNomad itself. Think of PHPNomad more like a travel guide than a destination. It should show you how to write code that can travel well, not…

  • Alex Standiford

    Ripped off a bandaid today. Finally got around to properly tagging all PHPNomad packages, and setting all of them up in Packagist. Currently at 40 repositories, so I needed to get ahead of this before it got out of hand.

  • Proposed New Facade Pattern That Supports Multiple Containers

    Current Implementation PHPNomad currently uses a Facade pattern implemented through abstract classes to provide static access to services. Facades serve two primary purposes: The current implementation requires: Challenges Architectural Limitations Impact on PHPNomad’s Core Philosophy The current Facade implementation conflicts with PHPNomad’s goal of writing truly portable code. By relying on global state and single container context, we limit the ability for code to be truly “nomadic” and run anywhere. Proposed Solution New Facade Pattern Instead of using abstract classes and global state, we propose a new pattern that: Implementation Details class LoggerFacade { use WithFacadeCapability; protected static function getRequiredType():…

  • PHPNomad As An MVC Framework

    PHPNomad As An MVC Framework

    So PHPNomad can run as an MVC framework now. That’s neat. I needed a way to make Siren run outside of WordPress. After careful consideration, I decided the best route to take was to set up the last couple of packages needed to just make PHPNomad capable of running as its own MVC framework. I spent a weekend creating the strategies that WordPress handles for Siren using various Symfony packages and other dependencies. After that, I structured it so that the app runs PHPNomad, registers the routes embedded in the application properly, and allows you to create views specific to…

  • Weighted Tree Decoration Stand

    Weighted Tree Decoration Stand

    A small 3-piece tree decoration stand for little trees, snowflakes, and other fun things. My kiddo and wife wanted to make these, so I designed a stand that is optionally weighted by pennies to make it extra stable.

  • Introducing Blueprint – A PHP Library for Replacing Placeholders

    Introducing Blueprint – A PHP Library for Replacing Placeholders

    Wanted to share a small PHP library that I put together this morning. This makes it a bit easier to build and replace template strings in PHP.

  • The Nomadic Approach: How to Write Code Once and Run It Everywhere

    The Nomadic Approach: How to Write Code Once and Run It Everywhere

    Learn how the nomadic approach simplifies your development workflow, reduces context switching, and makes your code more adaptable to any platform.

  • I Participated In a WordPress Marketing Discussion at WCUS

    I participated in a marketing meeting with other WordPress contributors where we discussed the challenges we see, and discussed how we can approach marketing WordPress to ensure its future remains in good standing.

Alex
Alex
@alex@www.alexstandiford.com

Founder of Novatorius & creator of Siren Affiliates. WordPress engineer and partnership advocate helping businesses grow with flexible incentive programs.

4,916 posts
60 followers