Mezzio is the Laminas middleware runtime -- previously known as Expressive in the Zend framework.

Middleware allows you to basically take an incoming request going to an outgoing response and have it go through a number of layers. One layer might ask if this person is authenticated, another may ask if they have access to do this sort of thing, or is the payload is valid. And, if the answer is no to any of those questions, it allows you to spit the response back out without it going any deeper into the application.

Mezzio is Interoperable

The beauty of Mezzio is we designed it around PHP-FIG, the framework interop group, their standard recommendations that they have put out. So it's using the standard HTTP messages, standard middleware, standard HTTP message factories -- and anything else you want to put in there. While we provide dependency injection container integration, you can use any dependency injection container you want -- whether it's one from Symfony, one we produce with our service manager, or even PHPDI. 

You can do the same for templating, logging, and all of that. The great thing is that it doesn't lock you in to any one framework, and allows you to develop exactly the application you need to deliver value with your business.

Mezzio for Microservices

Mezzio is a really nice tool for writing microservices because you can design exactly the workflows you need, and make them as lean as you want them. This makes them an ideal candidate for APIs, which microservices essentially are, so they're going to be very fast, simple to write, and they're going to give you all the tools you need in order to do the exact workflow you need for that particular service.

Mezzio for Legacy Applications

The middleware runtime that Mezzio  provides is also an ideal candidate for your legacy applications. So, if you have old applications that are using procedural code, or even old frameworks that are no longer supported -- migrating to middleware is going to be much simpler and easier for you to understand than going out and learning a whole, full-stack framework built on an MVC. So using a middleware runtime is going to make it easier to say, "here's what's coming in, and here's what needs to happen." This is the sort of flexibility that allows you to modernize your application quickly

Additional Resources

Want to learn more about Mezzio or Laminas? The resources listed below are a great place to start.

Have additional questions about migrating to Mezzio or Laminas? Contact us today to get answers.

Contact Us