Quantcast
Channel: Adam Cameron's Dev Blog
Browsing all 1333 articles
Browse latest View live
↧

Symfony: getting rid of App namespace and using a well-formed one

G'day:This is a quick follow-on from the previous article, "Symfony: installing in my PHP8 container (for a second time, as it turns out)".I was irritated that Symfony uses an invalid PSR-4 namespace...

View Article


TDD & Symfony: creating a small web service end point

G'day:BackgroundI have a real-world requirement to get a small web service written: one that wraps up calls to the getaddress.io UK postcode look-up service. For those not familiar with UK post codes,...

View Article


TDD & Symfony & Monolog: adding some logging to that endpoint from last time

G'day:Hopefully this one is shorter than the previous monster (TDD & Symfony: creating a small web service end point). I should perhaps have split that one in two, in hindsight (the Adapter, then...

View Article

PHP: refactoring logic out of a controller and into a service class

G'day:ContextIn yesterday's article - TDD & Symfony & Monolog: adding some logging to that endpoint from last time - I added some logging logic into this address-lookup web service endpoint I'm...

View Article

Image may be NSFW.
Clik here to view.

PHP 8: a quick look at enums

G'day:Whilst working on my recent code implemneting a postcode look-up web service, I stumbled across Monolog/Level:enum Level: int{ // …}I was unaware of PHP having enums, and it turns out it's a...

View Article


PHP / Doctrine/DBAL: adding a logger to an connection

G'day:There's plenty of stuff online about how to do this the old deprecated way, but I couldn't find any example of how to do it the "current" way. So. Here's an example.NB: the old way is some...

View Article

Ugh. PHPUnit and dealing with deprecation notices

G'day:Today's planI sat down to write an article and some code using the spatie/async library. Not for any particular requirement I have, just that it sounds interesting. But I've just shelved that...

View Article

PHP: looking at spatie/async

G'day:For no good reason at all, other than it piquing my interest, I've decided to mess around with spatie/async, which is - in its own words:[A] small and easy wrapper around PHP's PCNTL extension....

View Article


PHP: I need another two devs

G'day:I'm revisiting an article I posted in December, fishing for a coupla devs: I need another two devs. I parked that because we re-evaluated the direction we were going to take our replatforming...

View Article


CFML: runAsync doesn't seem very asynchronous on Lucee

G'day:I was wanting to compare how other languages dealt with the promise-style async processing, as I was not completely convinced by what I was seeing when investigating spatie/async in the previous...

View Article

Lucee bug surfaced by CFWheels's "architecture"

G'day:Well here's a fine use of my frickin time.Lucee's released a new "stable" version and we're being encouraged to use it. Today I upgraded my dev environment to Lucee 5.3.10.120 (from 5.3.9.166...

View Article

Image may be NSFW.
Clik here to view.

ColdFusion: bug in runAsync

G'day:In my article yesterday ("CFML: runAsync doesn't seem very asynchronous on Lucee") I mentioned in passing that I'd found a bug in ColdFusion's runAsync implementation. I wasn't focusing on...

View Article

Image may be NSFW.
Clik here to view.

PHP: looking at spatie/async some more

G'day:I'm getting back to this spatie/async library today (see "PHP: looking at spatie/async" for the first part of this).Previously I have just been passing a callback to the add function when adding...

View Article


TIL: something new about regex processing that made me feel dumb

G'day:I like to think I'm reasonably confident with my regex usage, indeed have in the past written at length on regex implementation and usage in CFML (summarised here: "Regular expressions in CFML"...

View Article

CFML: ColdFusion 2023 is in public beta now

G'day:As posted in the CFML Slack channel by Adobe ColdFusion star, Mark Takata, CF2023 is in public beta now. One can sign up for it here:...

View Article


PHP / PHPUnit / TDD: unit testing abstract classes. Or not.

G'day:One of my colleagues at work asked me about this, but it's a good topic to think about, so am gonna write about it here.The question was pretty much as stated in the subject line there "if we...

View Article

FAO ColdFusion users: you need to address a critical vuln in your system

G'day:Just in case you happen to read this blog, but not Charlie Arehart's one, pls go over to his blog and read his article "ColdFusion March 2023 emergency update, and what to do about it", and...

View Article


CFML / TestBox: spying on a method without mocking it

G'day:Whilst looking for something else, I came across a ticket in TestBox's Jira system the other day that I had voted for a while back: Ability to spy on existing methods: $spy(). About a year or so...

View Article

Image may be NSFW.
Clik here to view.

PHP / Symfony: working through "Symfony: The Fast Track", part 1: preparation...

G'day:This new PHP app we're shifting in at work is gonna be running Symfony. The other bods on the dev team have been working through "Symfony: The Fast Track", and I figured I pretty much ought to as...

View Article

Image may be NSFW.
Clik here to view.

PHP / Symfony: working through "Symfony: The Fast Track", part 2: creating a...

G'day:Sit. rep.OK so last time (PHP / Symfony: working through "Symfony: The Fast Track", part 1: preparation and pre-requisites (and not actually any Symfony!)) I didn't make much Symfony progress,...

View Article
Browsing all 1333 articles
Browse latest View live