Using PSR-7 Middleware in Your RESTful WordPress Projects (EN)

In the PHP world in general, there is a standard (recommendation) when it comes to HTTP messages: PSR-7. Despite things like Calypso, Gutenberg and the growing JavaScript codebase in general, WordPress is written in PHP. Thus, wouldn’t it be nice to do what the rest of the PHP world is doing? Isn’t there some way to leverage all the existing PSR-7 middleware and incorporate them into the WordPress REST API? Well, there is.

In this talk, Thorsten will give an overview of the PSR-7 HTTP message interfaces. After that, he will compare these with the structures of WordPress Core, and analyze whether or not they match with the PSR-7 interfaces. Finally, Thorsten will provide a closer look into an example implementation of PSR-7-compliant WordPress REST requests and responses, respectively, and explain their inner workings.

Spreker

Over Thorsten Frommen

Thorsten is a certified PHP engineer, web development professional and tester. He is working in the web since 2000, and with (and on) WordPress since 2005. Thorsten is a Principal Engineer at Syde. A big fan of open source, Thorsten created several plugins and other projects, but also contributed to existing open source projects. Also, he is an advocate of object-oriented design, and software testing. Since the first official German WordCamp in Hamburg in June 2014, Thorsten fell in love with both the WordPress community and WordCamps, in particular, where he likes to both gain and share knowledge.