June 1, 2018

When Duplication Is Not The Devil

Something I heard in a meeting yesterday resonated with me on a core level; particularly given my head first dive into microservices, “the cloud” and everything in between.

October 4, 2016

Modular application architecture with Symfony bundles

Being a software engineer and architect I often think of ways to simplify and/or compartmentalize the development efforts of projects/products I work on. This is one of my favorite and most endearing aspects of Symfony that has led me so often to using it for custom application development. (It doesn’t hurt that the recent release of PHP7 has been so fundamentally well regarded for its dramatic performance improvements). I’ve written about this approach before in an article “Planning Your Tech Stack,” but this in particular goes into more depth and a particular example use-case using Symfony. One of the great “things” about Symfony is the concept of a Bundle or…

September 19, 2016

Building a Unit Test in Symfony 3 using JWT Token Authentication

When you’re working with JWT Token Authentication and you want to be a well behaved software developer and build out your Unit Tests (in this case we’re using phpunit), it can be somewhat challenging to tackle out of the box. My solution here uses an inherited “service” that generates the token that can be used in any subsequent requests:

In the interest of adhering to the DRY principle, this class exists specifically for the purpose of being called in every unit test as a means of authorizing each request (see below).

You may want to expand upon this to do some additional authorization or validation on the $token response, but…