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

Armin Weihbold:
Diving into API Platform - Part 2
Oct 02, 2017 @ 11:50:15

Armin Weihbold has continued his series looking at building APIs in PHP applications in part two covering the use of the API Platform project as a base. You can find part one here if you need to get caught up.

He picks up right where the last article ends and continues setting up the Docker environment for the application. Once he figured out a small snag in the setup he was able to get the basic documentation (the list of endpoints) up and running.

Next he creates a "material design" administration interface using React showing how he pulled in the requirements he needed to get the interface up and running. Code is included for the interface and a screenshot is included so you can see the end result.

tagged: api platform apiplatform project tutorial series part2 frontend docker

Link: https://medium.com/@koyaan5/diving-into-api-platform-part-2-1ce890c0b85f

Symfony Blog:
Symfony 3.4 and 4.0 are about to enter into their "feature freeze" period
Sep 28, 2017 @ 11:28:42

On the Symfony blog there's a new post talking about the upcoming feature freeze for Symfony 3.4 and 4.0.

Symfony project follows a time-based development process where two new minor versions are released each year and a major version is released every two years.

This year, Symfony 3.4 and Symfony 4.0 will be both released at the end of November 2017. The only difference between both versions is that 3.4 includes all features deprecated in 3.x branches and 4.0 removes them.

Two months before their final releases, Symfony versions enter into a "feature freeze" period. During this time, we can't add new features and we solely focus on polishing and stabilizing the new features (and even reverting them if they don't work properly).

In other words, this week is our last chance to add new features to Symfony 3.4 and 4.0.

The post lists out a few ways that you can help out including reviewing pull requests and issues to see if there's anything that might be missing from these releases and might need to be integrated pre-freeze.

tagged: symfony framework featurefreeze v34 v40 project

Link: http://symfony.com/blog/symfony-3-4-and-4-0-are-about-to-enter-into-their-feature-freeze-period

HHVM Blog:
The Future of HHVM
Sep 19, 2017 @ 09:45:03

The HHVM project (an alternative PHP runtime from Facebook) has made a major announcement on their blog - beginning with version 3.24 they'll no longer be trying to keep parity with the PHP language now that it has moved into PHP 7.

The HHVM team is happy about the direction PHP has taken with PHP7, and we’re proud of the role we’ve played in pushing the language and runtime to where they are today. Since the PHP community is finally saying goodbye to PHP5, we’ve decided to do so as well.

Our next LTS release, 3.24, will be cut about four months from now and will receive support for one year thereafter. It will also be the last HHVM release that commits to PHP5 support. This aligns with PHP’s own timeline of sunsetting PHP5 at the end of 2018.

[...] PHP7 is charting a new course away from PHP5, and we want to do the same, via a renewed focus on Hack. Consequently, HHVM will not aim to target PHP7. The HHVM team believes that we have a clear path toward making Hack a fantastic language for web development, untethered from its PHP origins. We’d do ourselves and our users a disservice by positioning HHVM as an uncommon, less well-documented, less compatible PHP7 runtime.

The post then lists out some of their goals for the HHVM/Hack projects moving forward including reinvesting in open source and staying focused on their needs for the platform and language. It then talks about some of the upcoming changes you can expect around support of current versions of popular PHP tools and work on tools created specifically for Hack.

tagged: hhvm facebook platform hack language project goals php5 php7

Link: http://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html

Alex Bilbie:
Looking for a new maintainer of league/oauth2-server
Aug 23, 2017 @ 09:30:16

In a new post to his site Alex Bilbie has started the search for a new maintainer for the league/oauth2-server package citing the lack of time on his part to give the project the time it needs to flourish.

A little over five years ago I pushed the league/oauth2-server. The project has been downloaded over 2.5 million times, has more than 3000 Github stars and has been contributed to by 77 awesome people across some 2000 commits.

Last year when I became self-employed I had intentions that I’d have more time to dedicate towards open source projects but reality worked out slightly differently and I’ve had one of the busiest (and best) years of my life.

He also points out that, besides the lack of time to work on the project, he also doesn't actively use the project himself and wants to find a maintainer that "is/are really impassioned by the project, want to advance the project (for example implement OpenID support) and are willing to devote time to answering support requests and review pull requests."

If this interests you and you'd like to see the project move forward, the post includes his contact information for you to reach out.

tagged: oauth2server phpleague package maintainer request community project

Link: https://alexbilbie.com/2017/08/looking-for-a-new-maintainer-of-league-oauth2-server/

Twilio Blog:
Creating a Symfony 3 Project with Basic User Handling
Aug 18, 2017 @ 09:56:26

On the Twilio blog they've posted a new tutorial from author Margaret Staples showing you how to create a Symfony 3 project with user handling along with the Friends of Symfony bundle.

User handling is a fundamental part of a ton of web projects. This post will walk through how to get setup using the Symfony 3 framework and the Friends of Symfony bundle so that your project can allow users to register, login and out, and view and edit their User profile. The steps here will serve as a great starting point for your next web project.

She then walks you through the installation of the Symfony standard edition and how to answer some of the interactive setup questions. Once that's set up she shows how to install the FriendsOfSymfony/FOSUserBundle and what configuration options need to be changed to implement it. She then shows how to update the database schema for the new user handling and how to check to be sure the login, registration and profile pages are working as expected.

tagged: symfony3 project user handling tutorial install configure migrate

Link: https://www.twilio.com/blog/2017/08/up-and-running-with-symfony-3.html

Gonzalo Ayuso:
Silex is dead (… or not)
Jul 10, 2017 @ 11:24:58

In a new post to his site Gonzalo Ayuso talks about the Silex project (a Symfony-based microframework) and how it just might be dead.

The last week was deSymfony conference in Castellón (Spain). IMHO deSymfony is the best conference I’ve ever attended. [...] This year I cannot join to the conference. It was a pity. A lot of good friends there. So I only can follow the buzz in Twitter, read the published slides (thanks Raul) and wait for the talk videos in youtube.

In my Twitter timeline especially two tweets get my attention. One tweet was from Julieta Cuadrado and another one from Asier Marqués. [...] Tweets are in Spanish but the translation is clear: Javier Eguiluz (Symfony Core Team member and co-organizer of the conference) said in his talk: “Silex is dead”.

He goes on to talk about how, despite the overly dramatic title, the Silex project isn't really "dead" but does have an uncertain future. He talks some about the next version of Symfony - Symfony 4 - and how, because if the changes since v3, it could essentially replace most of what Silex offers. Unfortunately, this also leads to another problem - Symfony 4 isn't ready and if Silex will be deprecated which should he choose for new projects? After some investigation, he decided that Lumen, a Laravel-based microframework, was just right for his needs.

tagged: silex microframework symfony framework project dead symfony4

Link: https://gonzalo123.com/2017/07/10/silex-is-dead-or-not/

Fabien Potencier:
Symfony 4: Directory Structure Updates
Jul 05, 2017 @ 10:06:21

Fabien Potencier has a quick post to his site that may be of interests to the Symfony developers out there related to directory updates coming in Symfony 4:

After a long discussion in the community, the directory structure has been slightly changed.

etc/ was renamed to config/, and web/ to public/. My blog posts about Symfony 4 have just been updated to reflect these changes.

He also includes instructions about how, if you're already running a Symfony Flex application, you can make these changes manually including updating the Flex version.

tagged: symfony symfonyflex directory update project discussion

Link: http://fabien.potencier.org/symfony4-directory-structure-updates.html

SitePoint PHP Blog:
Poka Yoke – Saving Projects with Hyper-Defensive Programming
Jun 29, 2017 @ 10:55:11

The SitePoint PHP blog has a new tutorial posted that introduces the idea of "Poka Yoke" - basically defensive programming - and how to apply it in your own development processes.

When working in a medium to large team on the same codebase, it can sometimes become hard to understand each other’s code and how to use it. [...] It can be quite hard to remember how particular classes were intended to work, both on their own and in combination with each other. At that point, it becomes easy to accidentally introduce side effects or bugs without realizing it.

These mistakes might get caught in quality assurance, but there’s a realistic chance they might slip through. And even if they get caught, it can take a lot of time to send the code back and get it fixed. So how can we prevent this? Enter “Poka Yoke”.

The article then introduces the basic ideas of "poka yoke" and the two main parts: mistake prevention and mistake detection. It then gets more practical and suggests some PHP-specific things that can be done to prevent mistakes such as:

  • the use of type declarations
  • using value objects
  • making use of effective validation
  • returning null objects

For each there's a brief explaination and some sample code to help make the example more practical.

tagged: pokayoke project defensive programming practices tutorial

Link: https://www.sitepoint.com/poka-yoke-saving-projects-with-hyper-defensive-programming/

Delicious Brains:
Announcing serializededitor.com: A Visual Editor for PHP Serialized Data
Jun 28, 2017 @ 09:22:23

On the Delicious Brains site there's a new post from Gilbert Pellegram announcing serializededitor.com, an editor specifically designed to help visually edit serialized PHP data.

I recently built a command line daemon in PHP to emulate AWS SQSD for the purposes of testing in Mergebot. As it turns out, one of the benefits of building a large, complex product like Mergebot is that there are pieces of the system that we need to build for the project that might be of use to other developers.

Today, we’re launching that system piece, a free online visual editor for PHP serialized data as serializededitor.com.

In this article, I’ll explain how and why we built this “side” project and how I overcame some of the challenges I faced when building this project.

He starts off with the problem they were trying to solve when creating the editor, mostly centered around determining the differences between two pieces of serialized data. They found something similar to what they were wanting but it didn't provide the "easy editiing" functionality they wanted. He then goes through some of the issues they bumped up against along the way: working with the data and PHP's unserialize, the creation of their own parser, the work to create the Vue.js frontend and re-serializing the data once complete.

They've also open sourced the project over on GitHub so you can clone it locally and contribute back.

tagged: serialized data editor project introduction github vuejs

Link: https://deliciousbrains.com/announcing-serializededitor-com-visual-editor-php-serialized-data/

The Bakery:
Welcoming Phinx to the CakePHP family!
Jun 23, 2017 @ 09:54:02

On The Bakery (the CakePHP site) an official announcement has been posted welcoming Phinx to the CakePHP family. The Phinx library is a popular tool for framework-agnostic database migration handling.

We are very excited to announce that Phinx has joined the CakePHP team. The Github project has already been moved to the CakePHP organisation. The project itself will stay MIT-licensed but be gradually transformed into a Cake Software Foundation project. Other great news is that the current way to install and update Phinx remains unchanged.

As you are aware, CakePHP has been using Phinx since 3.0.0 for database migrations. The CakePHP Core team welcomes the opportunity to look after and maintain the project and will now start making changes to bring the code in line with the CakePHP (our) coding standards. As well as cleaning up issues and PR’s soon. We will be following up with our plans for the code and setting roadmaps in the coming weeks.

Rob Morgan, the original author of the library has also added some of his own commentary in a post to his site:

I’ve been busy lately. Juggling startups and open source work is no easy feat. I managed to do it for the past 5 years, but beyond 30 its proving to be more difficult. Phinx is not accelerating at the pace I’d like it to be. In fact so far this year we’ve only managed to ship 6 releases. I decided that the best strategy moving forwards is to find a new home for Phinx. One that has an active and loyal community and one that delivers great software. I’m pleased to announce that I’ve found the right fit.

He points out that the only real thing changing for now is the location of the repository. He looks back on the journey that got him and the project to where it is today and how much the support from the PHP community meant during that time.

tagged: cakephp phinx database migration robmorgan library project foundation

Link: https://bakery.cakephp.org/2017/06/23/welcoming-phinx-to-the-cakephp-family.html