PHPNews

Using Anonymous Classes to Write Middleware

Written by Matthew Weier o'Phinney - Published on phly, boy, phly: matthew weier o'phinney
Aggregated on Thursday March 30, 2017 - Permalink

I faced an interesting question recently with regards to middleware: What happens when we go from a convention-based to a contract-based approach when programming? Convention-based approaches usually allow for duck-typing ; with middleware, it means you can write PHP callables — usually closures — and just expect them to work. Contract-based approaches use interfaces . I think you can …

Continue reading »


PSR-7 Request and Method Utilities

Written by Matthew Weier o'Phinney - Published on phly, boy, phly: matthew weier o'phinney
Aggregated on Thursday January 26, 2017 - Permalink

We all know the standard HTTP request methods and status codes, right? Or do we? We definitely know whether or not they should be integers or strings, and/or how string values should be normalized, right? And our IDEs can totally autocomplete them, right? Oh, that's not the case? Some time ago, a few folks floated the idea of creating a utility repository related to the PSR-7 …

Continue reading »


Automating PHPUnit with Node

Written by Matthew Weier o'Phinney - Published on phly, boy, phly: matthew weier o'phinney
Aggregated on Monday October 24, 2016 - Permalink

I've been trying to automate everything this year. When working on OSS, this is usually as simple as setting up Travis CI ; in some cases , even that becomes a little more involved , but remains possible. But that's continuous integration . What about continuous development ? Continuous development? With continous integration, every time I push to a branch associated with a …

Continue reading »


Using Composer to Autoload ZF Modules

Written by Matthew Weier o'Phinney - Published on phly, boy, phly: matthew weier o'phinney
Aggregated on Wednesday August 17, 2016 - Permalink

One aspect of Zend Framework 3 , we paid particular focus on was leveraging the Composer ecosystem. We now provide a number of Composer plugins for handling things such as initial project installation, registering installed modules with the application, and more. It's the "more" I particularly want to talk about. Registering modules on install With ZF2, we were able to realize the …

Continue reading »


Push-to-Deploy with AWS CodeDeploy

Written by Matthew Weier o'Phinney - Published on phly, boy, phly: matthew weier o'phinney
Aggregated on Thursday June 30, 2016 - Permalink

AWS CodeDeploy is a tool for automating application deployments to EC2 instances and clusters. It can pull application archives from either S3 or GitHub, and then allows you to specify how to install, configure, and run the application via a configuration specification and optionally hook scripts. When setup correctly, it can provide a powerful way to automate your deployments. I started …

Continue reading »


Programmatic Expressive

Written by Matthew Weier o'Phinney - Published on phly, boy, phly: matthew weier o'phinney
Aggregated on Monday May 16, 2016 - Permalink

Enrico just returned from phpDay , where he spoke about Expressive and the upcoming Zend Framework 3. One piece of feedback he brought back had to do with how people perceive they should be building Expressive applications: many think, based on our examples, that it's completely configuration driven! As it turns out, this is far from the truth; we developed our API to mimic that of …

Continue reading »