Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHP Town Hall:
Episode 50: Low down on PSR-15
Jun 29, 2016 @ 09:20:22

The PHP Town Hall podcast has posted their latest episode (after a bit of hiatus) giving the low down on PSR-15, the proposed PHP-FIG standard for HTTP middleware.

n all star cast this episode, as Ben and Phil are joined by regular guest Anthony Ferrara - thinker of good ideas and long-time part-time side-line contributor to the PHP-FIG, Woody Gilk - one-speed rider & BDFL of Kohana, and Beau Simensen - author of a bunch of stuff including StackPHP.

Here we’re talking about some awesome stuff the PHP-FIG is working on: PSR-15 (HTTP Middleware). [...] We discuss all this, and the reason PSR-7 (HTTP Message) is not enough for the ecosystem to benefit from shareable middleware. [...] Woody provides a bit of the decision-making process in a very tricky aspect of the FIGs job, which is: should standards be built entirely to match existing implementations, or should standards try to improve on the learnings of the existing implementations to better them all as implementations change to support the standard. It’s all a bit chicken and egg, but a very worthy discussion to have.

You can catch this latest episode either through the in-page video player or directly on YouTube. If you enjoy the show, be sure to subscribe to their feed and get the latest as new shoes are released.

tagged: psr15 phpfig middleware proposal standard phptownhall podcast ep50

Link: https://phptownhall.com/episode-50-low-down-on-psr15/

Symfony Finland:
Cache enhancements in Symfony 3.1 and 3.2: PSR-6 and tag invalidation
Jun 23, 2016 @ 09:17:04

On the Symfony Finland site there's a post talking about caching enhancements in Symfony 3.1 & 3.2 using the PSR-6 structure as defined by the PHP-FIG standard.

Symfony 3.1 was the first version of the new Symfony3 family to offer new features. The first 3.0 release had feature parity with the last of the Symfony2 series. Symfony 3.1 was launched in May 2016, with a moderate list of added individual features, but one that was a big step in terms of caching: [an] implementation of the cache PSR (PSR-6). The new component is also automatically wired in FrameworkBundle and Symfony Standard Edition."

He talks about how following the PSR-6 standard allows for caching tools to only need to worry about the underlying implementation, not the interface. The post also talks about a new feature coming in Symfony 3.2 around caching: cache tagging. This allows you to "link" cache entries together using tags as related items. One potential use of this is invalidating cache records linked to a specific resource or page in the application without having to check each entry.

tagged: symfony cache invalidation tagging psr6 phpfig

Link: https://www.symfony.fi/entry/cache-enhancements-in-symfony-3-1-and-3-2-psr-6-and-tag-invalidation

Phil Sturgeon:
Why Care About PHP Middleware?
Jun 02, 2016 @ 10:35:39

Phil Sturgeon has a post over on his site sharing some of his thoughts on PHP middleware and why he thinks it's worth paying attention to in your applications.

Recently there has been a lot of buzz about HTTP middleware in PHP. Since PSR-7 was accepted, everyone and their friend Sherly has been knocking out middleware implementations, some of them stunning, some of them half-arsed, and some of them rolled into existing frameworks. HTTP Middleware is a wonderful thing, but the PHP-FIG is working on a specific standard for middleware, which will standardise this mess of implementations, but some folks don't seem to think that would be useful.

Let's look into middleware a little closer, to show you why it's something to smile about.

He starts with a bit of background about the history of middleware in the PHP ecosystem and where they fit in the overall execution path. He lists out some of the middlewares that have already come out based on this surge in the community including CSRF protection, debugging and rate limiting handling. With various frameworks handling the request/response slightly differently, the PHP-FIG worked up a standard to make interoperability easier. He links to some other resources about middleware that have been posted and discussions he's had with other people about their usefulness.

HTTP Middleware is awesome. It lets frameworks do far less, it lets people distribute logic in a way often unseen popularly in PHP, it lets more of your application be reusable, and it lets PHP catch up with other popular languages used to build stuff on the web. PSR-7 was a great step towards this goal, but we need another PSR to get the whole way there.
tagged: middleware opinion psr7 request response phpfig example

Link: https://philsturgeon.uk/2016/05/31/why-care-about-php-middleware/

Laravel News Podcast:
Episode #17 - Laravel Echo, Laravel Valet, and PHP-FIG implosion
May 20, 2016 @ 12:12:01

The Laravel News site has posted the latest episode of their podcast covering Laravel Echo, Valet and the PHP-FIG "implosion".

In this twenty-two minute episode, we talk about Laravel Echo and new changes to Laravel Valet.

You can listen to this latest episode either through the in-page audio player or by downloading the mp3 of the show for offline listening. If you enjoy the show and want to hear more, be sure to subscribe to their feed and get the latest as they're released.

tagged: laravelnews podcast ep17 echo valet phpfig ericbarnes

Link: https://laravel-news.com/2016/05/laravel-echo-valet-php-fig-implosion/

Evert Pot:
Why PHP-FIG matters
May 18, 2016 @ 12:48:02

There's been quite a bit of drama lately around the PHP-FIG (Framework Interoperability Group) organization in the past few weeks, mostly resulting from an inflammatory situation involving one of the member projects. There's been questions around about the PHP-FIG, its role in the community and how that might change in the future. In this post to his site Evert Pot shares some of his own thoughts about the group and why it still matters.

The PHP-FIG is currently going through some growing pains. I recently resigned as a voting rep, and after some juvenile controversy Lavarel, Doctrine and Propel have as well.

Since its inception 8 years ago, the groups greatest problem has been to properly organize itself. [...] Now as a sort of knee-jerk reaction to these issues, PHP-CDS was setup with a much simpler process. [...] Some good stuff is happening though. A few people are working on a thankless effort to restructure the organization dubbed “FIG 3.0”. (thanks Larry Garfield and Michael Cullum).

He makes some of his own suggestions to the group as to things he think could be "quick wins" and help make the group better overall. He then gets to the "why it matters" section. He uses the PSR-6 caching standard as an example and points out that many other standards were based on successful interfaces on projects - not so much on the caching though. He also talks some about PSR-7 and how request/response handling can "look odd" at first glance. He suggests that while the PSR-7 standard probably evolved from too much discussion, but the PHP-FIG was there to facilitate that discussion. Now they just need to make it easier to get through the process...

tagged: phpfig interoperability important group standards opinion psr7 psr6

Link: https://evertpot.com/why-php-fig-matters/

PHP Roundtable:
041: The PHP-FIG: Past, Present & Future
Mar 10, 2016 @ 09:17:10

The PHP Rountable podcast, hosted by Sammy Kaye Powers has published their latest episode - Episode #41: The PHP-FIG: Past, Present & Future.

The PHP-FIG has really helped the PHP community get onboard the collaboration train with really great standards like the PSR-4 autoloading standard and the PSR-7 HTTP message interfaces.

We discuss PSR-0 through PSR-13 and the process they go through to become standards. We also discuss where the FIG came from and the possible big changes coming to the organization soon.

This episode features a large group of guests, all related to the PHP-FIG in some way:

You can watch this episode either through the in-page video player or directly over on Youtube. Be sure to subscribe to their feed and follow them on Twitter for updates on when the latest episodes are being recorded and are released.

tagged: phproundtable podcast ep41 phpfig past present future video

Link: https://www.phproundtable.com/episode/the-php-framework-interop-group-past-present-future

Reddit.com:
How do you see the PHP-FIG?
Dec 14, 2015 @ 09:48:49

There's been a big discussion happening over on the PHP-FIG (Framework Interoperability Group) mailing list recently about the goals and vision for the project. While the group originally started out as a way to define standards for frameworks and projects to work together, some have begun to wonder if it's a bit more far reaching than that. This discussion/poll on Reddit sums up the question nicely:

There are some ongoing discussions on the PHP-FIG mailing list about, among other things, how the FIG is seen by the wider PHP community. [...] Since an earlier discussion pointed out that perhaps the FIG, while well-known, don't do enough "active outreach", consider this an attempt to "reach out."

Do you think:

  • The FIG is a bunch of self-aggrandizing elitist jerks who couldn't write a competent or useful "proposed standards recommendation" if their lives depended on it, and should disband entirely.
  • The FIG, while aware that the wider PHP community is watching, writes PSRs primarily for itself, and others can adopt or ignore as they wish;
  • The FIG has become the closest thing to a userland standards group that the PHP community has, and should accept that role;
  • Some other opinion?

There's already 50+ comments on the thread with several of the options being supported. There seems to be a leaning towards either the second option or the third with advantages and disadvantages for both. The group has undoubtably helped to change the way that modern PHP is written and they want to keep the tradition going and be what the community and language need. Go over an voice your own opinion on the matter too!

tagged: phpfig organization opinion poll standards community feedback interoperability

Link: https://www.reddit.com/r/PHP/comments/3wownq/how_do_you_see_the_phpfig/

Community News:
PHP-FIG Website Relaunch
Oct 26, 2015 @ 11:27:30

The PHP Framework Interoperability Group (or PHP-FIG for short) has just released a new version of their website with a great new look and even better organization for the PSR content: http://php-fig.org. They just tweeted about it too:

What do you think of our new website? Slicker, cleaner and easier on the eyes. Give us your feedback! :)

The new version of the site provides sections not only for the details around currently accepted standards but also on current proposals, members of the organization, bylaws and frequently asked questions about the group. They also have links to some resources where you can get involved if you're interested in the group and what they're up to.

tagged: phpfig website relaunch interoperability group redesign

Link: http://www.php-fig.org/

Symfony Blog:
PSR-7 Support in Symfony is Here
Jun 01, 2015 @ 12:19:15

The Symfony project has officially announced PSR-7 support in the latest version of the framework. PSR-7 is a recently approved standard by the PHP-FIG to make a more structured HTTP request and response structure (to aid in interoperability).

Less than 2 weeks ago, the PHP community roundly accepted PSR-7, giving PHP a common set of HTTP Message Interfaces. This has huge potential for interoperability and standardization across all of PHP. This is especially true for middleware: functions that hook into the request-response process. In the future, a middleware written around these new interfaces could be used in any framework. [...] Today, a huge number of projects use Symfony's Request and Response classes (via the HttpFoundation component), including Laravel, Drupal 8 and StackPHP.

[...] For that reason, we're thrilled to announce the 0.1 release of the PSR HTTP Message Bridge: a library that can convert Symfony Request and Response objects to PSR-7 compatible objects and back. This means that once there are middleware written for PSR-7, applications using HttpFoundation will be compatible.

The bridge makes it simpler to swap out the HTTP layer by converting the HTTP objects into something other frameworks can use (or so others can be used by Symfony). They provide some examples of how to put it to use, converting objects both to and from the standard Symfony HttpFoundation versions. There's also a quick note about the RequestInterface and ResponseInterface structure that allows you to bridge your own gaps between the PSR-7 friendly components and Symfony.

tagged: psr7 support httpfoundation request response http bridge phpfig

Link: http://symfony.com/blog/psr-7-support-in-symfony-is-here

Matthew Weier O'Phinney:
PSR-7 Accepted!
May 20, 2015 @ 09:55:41

As Matthew Weier O'Phinney mentions in his latest post, the PSR-7 standard (HTTP) has passed and is officially accepted as a standard by the PHP-FIG group.

The road to PSR-7 was a long and winding one. It started in summer of 2012 as a draft proposal on HTTP clients by Benjamin Eberlei, during which others proposed that perhaps a smaller standard on the HTTP message interfaces themselves — which would also allow targeting server-side applications, as those rely on the messages.

He follows the proposal's flow through the PHP-FIG process, pointing out several others who contributed along the way and what changed along the way. He also includes a section of thanks for some of the other developers and PHP-FIG members that made contributions along the way.

tagged: psr7 phpfig accepted standard history

Link: https://mwop.net/blog/2015-05-18-psr-7-accepted.html