On his Medium blog Jeff Ochoa has written up a tutorial that want to help you understand pipelines in Laravel, a fluid interface that can be used to pass objects around.

Basically, using laravel pipelines you can pass an object between several classes in a fluid way to perform any type of task and finally return the resulting value once all the “tasks” have been executed.

[...] The most clear example about how pipelines works resides in one of the most used components of the framework itself. I’m talking about middlewares.

He uses a simple middleware as an example, covering how they're just "pipes" in the pipeline of execution. He includes a snippet of code from the Illuminate handling showing its place in the pipeline and gives a more real world example of commenting functionality with a few different pieces of functionality. He shows how this could be refactored into the pipeline handling and what happens at the end of the pipe.

The Zend Framework blog continues their series of posts looking at the Zend Expressive framework with this latest tutorial showing you how to use configuration-driven routing instead of routes defined in just code.

Expressive 1 used configuration-driven pipelines and routing; Expressive 2 switches to use programmatic pipelines and routes instead. The programmatic approach was chosen as many developers have indicated they find it easier to understand and easier to read, and ensures they do not have any configuration conflicts.

However, there are times you may want to use configuration. For example, when you are writing re-usable modules, it's often easier to provide configuration for routed middleware, than to expect users to cut-and-paste examples, or use features such as delegator factories.

Fortunately, starting in Expressive 2, we offer a couple different mechanisms to support configuration-driven pipelines and routing.

They start by pointing out the result of the Expressive v1 to v2 migration tool (enabling v2's pipeline handling) and a warning that there could be issues as the programmatic declarations still remain. The tutorial then gets into some of the drawbacks of going configuration-only but shows how, with just a bit of extra code, those can be someone relieved. An example is included showing a configuration provider that, from the functionality itself, defines the routes and injects them into the current application (using injectRoutesFromConfig).

On the Zend Framework blog Matthew Weier O'Phinney has posted another tutorial, this time showing you how to use nested middleware in Expressive allowing for the composition of your own workflow in the request/response flow.

A major reason to adopt a middleware architecture is the ability to create custom workflows for your application. Most traditional MVC architectures have a very specific workflow the request follows. While this is often customizable via event listeners, the events and general request lifecycle is the same for each and every resource the application serves.

With middleware, however, you can define your own workflow by composing middleware.

He starts by describing one of the main concepts in the workflow of the application: pipelines. He gives an example of the default pipeline included with the Expressive skeleton application and how the middleware it uses nests to create a custom logic and handling flow. He follows this with an example scenario showing how to add authentication into the pipeline, specifically the use of Digest authentication via a PSR7 middleware package. Code is included for the integration of this package and the end result - all pages requiring authentication. He shows how to modify this and limit it to only certain paths and how to nest them in the route definitions.

Finally he shows another approach - creating a custom middleware pipeline inside of the factory for the requested middleware. He also covers nested applications, using traits for common workflows and the use of "delegator factories".

If you read the book “Refactoring to Collections” or saw screencasts and talks by Adam Wathan about collection pipelines, but do not work with Laravel, you might have asked yourself how to apply these techniques to other PHP applications, for example Magento.

[...] This is very similar to Unix pipes, where the individual commands are the operations, and the lines passed through input and output stream, the collection.

He starts by illustrating the idea in Bash and Ruby, showing the three main types of collection operations: map, filter and reduce. He talks about the advantages these methods have over traditional looping and what kind of value they can provide in both Laravel and plain old PHP. He illustrates the PHP-only versions using the array_filter, array_map and array_reduce functions and some thoughts on when it's good to use them over normal looping (and when it's not). He then gets into the Magento-specific handling and making use of a package to handle collections: Knapsack. He shows how to use the library to work with collections and, as another option, a "home-grown" version that lives in a single class. The post wraps up with the Magento integration of this functionality, a brief mention of functional programming and "the hard part" of issues with debugging.

The main highlight of re:Invent is always the keynotes and the new services and features announcements they make during the keynotes. One of the new services caught my attention, and I decided to give it a try. That service is AWS CodeBuild.

CodeBuild is designed to be used as part of the AWS CodePipeline, but it may also be used by itself. [...] Out of the box, CodeBuild provides some managed images that you may use to build your projects. These include environments for Android, Java, Python, Ruby, Golang, and Node.js. PHP is missing from this list, but since you’re able to use other images, I decided to see how easy it is to get up and running on CodeBuild with a PHP project. I chose to try out my ramsey/uuid library for a simple test.

He walks you through the creation of a new CodeBuild instance (complete with screenshots of the UI) and how to configure your project, explaining each of the settings as he goes. He includes the full build command he's using for the library running tests, a lint check and codesniffer checks for formatting. He shows how to get the project to build and what the UI will show when the build is successful (all green).

In this new post to his Oracle blog, Chris Jones shows how to set up DBMS_OUTPUT to work with the OCI8 extension available for PHP.

Immediately after OOW, Alison and I have got straight into updating the Underground PHP & Oracle Manual. We've had our heads right down. [...] When reviewing the DBMS_OUTPUT section I tried using a PIPELINED PL/SQL function and found a significant speed improvement over the basic method.

He shows a few different methods for getting it working and includes both the code, SQL to create the functions and a bit of stats at the end showing which method is the fastest (the pipelined version wins out by quite a bit every time).

The H3rald site has posted a new article that looks at a collection of PHP frameworks that have been inspired by Rails' example.

There are various articles online examining many PHP frameworks, providing short reviews or comparative charts, but I could not find yet an article examining the so called "Rails-inspired frameworks" anywhere on the web, so I decided to write my own…

I'm talking about those PHP frameworks who give at least part of their success to Ruby on Rails2, but don't call them clones or ports as some of their creators may get offended.

He comments on how Rails' entrance into the world of the web was a "shocking" experience and how, as soon as developers saw the benefits of an easy to use "semi-sentient" web development framework, they jumped on board - including several PHP developers out there. To illustrate the point, he gives six PHP frameworks up as examples:

Under each example, there's a list of the license, size, databases supported, a tutorial, and a description of the framework (including the pros and cons of using it). He also includes a few comments on each with his personal opinions and a few extra facts thrown in.

The H3rald site has posted a new article that looks at a collection of PHP frameworks that have been inspired by Rails' example.

There are various articles online examining many PHP frameworks, providing short reviews or comparative charts, but I could not find yet an article examining the so called "Rails-inspired frameworks" anywhere on the web, so I decided to write my own…

I'm talking about those PHP frameworks who give at least part of their success to Ruby on Rails2, but don't call them clones or ports as some of their creators may get offended.

He comments on how Rails' entrance into the world of the web was a "shocking" experience and how, as soon as developers saw the benefits of an easy to use "semi-sentient" web development framework, they jumped on board - including several PHP developers out there. To illustrate the point, he gives six PHP frameworks up as examples:

Under each example, there's a list of the license, size, databases supported, a tutorial, and a description of the framework (including the pros and cons of using it). He also includes a few comments on each with his personal opinions and a few extra facts thrown in.

Ryan Johnson over at the Pipline Project emailed in today to let us know about their project, Pipeline, an MVC-based framework that's targeting itself at "the little guy" sites out there.

The project is in its very early stages, and so we ask you to know that there will be more to come, and that this is just the first developer preview. However, we can stand behind it in our belief that it's a highly evolved specimen, and will be of interest to anybody developing web applications, or just writing about them. In the future we will be releasing commercial products under the Livepipe brand, but for now all of the work we are announcing today, or in the near future, will be released under the MIT license for all to enjoy.

Ryan Johnson over at the Pipline Project emailed in today to let us know about their project, Pipeline, an MVC-based framework that's targeting itself at "the little guy" sites out there.

The project is in its very early stages, and so we ask you to know that there will be more to come, and that this is just the first developer preview. However, we can stand behind it in our belief that it's a highly evolved specimen, and will be of interest to anybody developing web applications, or just writing about them. In the future we will be releasing commercial products under the Livepipe brand, but for now all of the work we are announcing today, or in the near future, will be released under the MIT license for all to enjoy.