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

Jason McCreary:
Update PHP on Mac OS X
Sep 20, 2016 @ 10:15:26

Jason McCreary has posted an update to his guide for installing PHP on Mac OS X and replacing the version of PHP that comes with El Capitan (5.5) with a handy package manager more specific to PHP installations.

As noted in my posts on Installing Apache, PHP and MySQL on Mac OS X, OS X comes pre-installed with Apache and PHP. Unfortunately, as of Mac OS X 10.11 (El Capitan) the pre-installed version of PHP is still 5.5. As PHP 5.5 has reached end of life, I imagine the pre-installed version of PHP will be updated with Mac OS 10.12 (Sierra). However, it may only be PHP 5.6.

So what do you do if you want to upgrade or install a different PHP version on your Mac? Well, you could use Homebrew. But I found a pre-packaged alternative - PHP OSX.

With this package manager, the installation is only a few steps but he lists them out with a bit more detail to help you understand what's happening:

  • Installing PHP (your choice of version)
  • Configuring Apache (loading the php5 shared module)
  • Updating your PATH
  • Configuring PHP
tagged: osx update language version package simple installation tutorial

Link: http://jason.pureconcepts.net/2016/09/upgrade-php-mac-os-x/

Pascal MARTIN:
Series - Introduction to PHP 7.1 (Update)
Sep 15, 2016 @ 09:42:57

Pascal Martin has made the tenth post in his series covering PHP 7.1 and how it differs from previous versions. While this series was previously mentioned there have been significant updates to the series warranting a new post.

Here is the full list of the current ten articles he's written up so far:

There's lots of good information about this upcoming minor release in each of these articles as well as an interesting view into the release process for a new PHP version.

tagged: types enhancements testing overview preview articles series php71 update

Link: https://blog.pascal-martin.fr/post/php71-en-introduction-and-release-cycle.html

Joe Ferguson:
Solidify Fragile Tests
Sep 05, 2016 @ 11:43:27

In this post to his site Joe Ferguson gives some advice on solidifying tests in your system that are a bit more fragile. Every test suite of any larger size has these kinds of tests - ones that usually pass but sometimes fail (and then pass just fine on the next run).

On my first week at the new job I was tasked to fix some tests that were logging data. While the fix was simple enough, by using `PsrLogNullLogger as Logger` instead of `MonologLogger` in the test, during the process I ran into another test that appeared quite fragile.

He gives an example of a fragile test, one based on a method that returns a "food" value, that would potentially fail if the data returned is not in the right order. He found the issue was with the use of the assertArraySubset check and how, thankfully, the fix was as easy as changing the assertion (and using an array_diff to help with the check).

tagged: solidify fragile tests unittest check assertion update

Link: https://www.joeferguson.me/solidify-fragile-tests/

Sculpin Blog:
Deprecating Phar Distribution and Embedded Composer
Sep 02, 2016 @ 12:18:29

On the Sculpin blog Beau Simensen has posted an update about a change in how the project will be released in the future, most notably deprecating the phar release and switching to an embedded Composer installation.

If you are currently using a globally installed phar distribution for Sculpin you should migrate to a per-project Composer installed version of Sculpin as soon as you can. [...] Any plans for Sculpin 3 would have required reworking the phar build and distribution process

In typical programmer fashion, I let myself get bogged down in the details of eventually needing to deploy Sculpin 3 phar builds rather than working on Sculpin 3. What little time I had to spend on Sculpin last year was sunk on solving this problem. [...] The last officially available Sculpin phar is not compatible with PHP 7.

He talks about his earlier goals to make v3 of Sculpin PHP 7-only but, in the process of the work to get to that point, several roadblocks came up preventing it. He talks about self-updating phars and finally realizing that, for the good of the project, a move to the embedded Composer setup is the best method for keeping dependencies in sync. He ends the post with the steps you'll need to take to migrate from the phar release to the managed version and an example commit of how the Sculpin site itself was migrated.

tagged: sculpin static generator project phar embedded composer update

Link: https://blog.sculpin.io/2016/08/31/deprecating-phar-distribution-and-embedded-composer

Laravel News:
Controller Construct Session Changes in Laravel 5.3
Aug 30, 2016 @ 10:45:13

On the Laravel News site there's a post detailing some of the updates made to session and controller handling in v5.3 of the framework. It mostly revolves around how the middleware handling changed on each request from v5.2.

Back in laravel 5.2, a developer was able to interact with the session directly in a controller constructor. However, this has changed in laravel 5.3.

The difference between how the 5.3 & 5.2 handle an incoming request is that in 5.2 the request goes through 3 pipelines: global, route and controller [...] In 5.3 the request goes through only 2 Pipelines: global and route/controller (in one pipeline).

The post includes a quote from Taylor Otwell (creator and lead developer of the framework) about why this change was made. Then it shows an alternative to directly accessing this session information in your controllers: a Closure-based middleware in the constructor to execute your checks.

tagged: laravel controller session update access middleware change v53

Link: https://laravel-news.com/2016/08/controller-construct-session-changes-in-laravel-5-3/

Laravel News:
Laravel 5.3 is now released
Aug 23, 2016 @ 10:52:24

As is mentioned in this new post on the Laravel News site, the latest version of the Laravel framework (v5.3) has officially been released:

The Laravel team is proud to announce the release of Laravel 5.3 and it’s now available for everyone. The new features in 5.3 are focused on improving developer speed by adding additional out of the box improvements for common tasks.

This is a general release and comes with six months of bug fixes and security fixes are provided for one year. Laravel 5.1 is the latest LTS release which includes bug fixes for two years and security fixes for three years.

The post also lists some of the major updates that come with the v5.3 release including:

  • New Home Page (for the project)
  • New packages like Laravel Passport, Laravel Scout and Laravel Echo
  • Updated migration handling
  • Queued job improvements

You can read the full list of changes in the rest of the post including a link to an upgrade guide for those migrating from previous versions.

tagged: laravel version release v53 framework update feature project

Link: https://laravel-news.com/2016/08/laravel-5-3-is-now-released/

Symfony Blog:
Introducing the new Symfony Documentation
Jul 29, 2016 @ 13:47:59

On the Symfony blog there's a new post introducing the new project documentation, the result of lots of work from a large number of developers to bring the framework's documentation up to date.

When the Symfony documentation was started more than 5 years ago, it was just a few short articles written by Fabien. Now, we boast more than 1,000 pages of documentation, a team of 4 maintainers and over 1,000 contributors!

As the project grew, we've tried to innovate: adding continuous integration to catch build errors, setup Platform.sh to auto-deploy every pull request and implemented a process so that all new features to Symfony's core become documented (an amazingly rare feat).

And just like with code, a project must challenge itself continuously to stay ahead of the curve. In this article, we're thrilled to introduce the new Symfony Documentation: a result of over 150 hours of volunteer work via a secret project codenamed "Project Mercury".

They talk about some of the challenges they faced with the previous version of the documentation and some of the problems they wanted to solve. Instead of splitting things up into three sections ("Book", "Cookbook" and "Components") they opted to break it up into something more approachable for two different categories of users: "Getting Started" and "Guides" (everything else). They share some about how they made this new version happen and the workflow they followed to keep everything (and everyone) in sync.

You can check out this new documentation over on the completely revamped documentation site right now.

tagged: symfony documentation project version release update

Link: http://symfony.com/blog/introducing-the-new-symfony-documentation

Alejandro Celaya:
Project Scalability with Zend Expressive
Jul 21, 2016 @ 09:46:10

In a new post to his site (also posted on the Zend Developer Zone) Alejandro Celaya looks at scalability with Zend Expressive, a lightweight framework from Zend, the creators of the Zend Framework.

I've been working with some different frameworks lately. One of them is Zend Expressive, and I've come to the conclusion that I don't need to choose between different frameworks; depending on the project, Expressive always fits my needs and scales from small projects to bigger applications.

He starts off by looking at the "microframework approach" that Zend Expressive takes, making it easier to get up and running for smaller applications. He points out that this setup is fine when the application is small, but what happens as it grows - it just wouldn't scale well and be manageable. He talks about the setup he uses for larger scale applications, moving the configuration to dynamic config files and making use of more complex dependency injection. He also talks some about modularity in applications, the "middleware paradigm" and how he set up controller-style dispatching (versus just the default closures method).

tagged: zendexpressive tutorial scalability framework microframework update functionality

Link: http://blog.alejandrocelaya.com/2016/07/21/project-scalability-with-zend-expressive/

Rob Allen:
Standalone Doctrine Migrations redux
Jul 07, 2016 @ 12:52:06

Rob Allen has posted a tutorial to his site making some updates to his previous work with the Doctrine migrations handling as a standalone component. In this new tutorial he talks about the newer way to use it in your projects.

Since, I last wrote about using the Doctrine project's Migrations tool independently of Doctrine's ORM, it's now stable and much easier to get going with.

He starts with the basic installation and configuration of the migrations tool, making use of a SQLite database as an example. He then shows the use of the basics of using it to make database changes:

  • creating a new migration
  • running the migrations

Each step comes with code, the commands you'll need to execute and an example of the resulting console output.

tagged: doctrine migration standalone update create execute

Link: https://akrabat.com/standalone-doctrine-migrations-redux/

Symfony Blog:
Announcing the Fourth Symfony Docs Hack Day
May 13, 2016 @ 09:58:29

On the Symfony Blog they've posted the official announcement of their Fourth Symfony Docs Hack Day happening on May 21st. This hack day is focused on just improving the documentation for the framework, not handling bugs in the main codebase itself.

The Symfony project is proud to announce its fourth Symfony Docs Hack Day. This Hack Day will be an online event to give a push to the Symfony Docs before the Symfony 3.1 release at the end of this month.

[...] Hosts Ryan Weaver, Wouter de Jong and Christian Flothmann along with you and all your friends from the Symfony community. The Hack Day is for everyone - we need Symfony experts and newcomers. If you're new to Symfony, you give us a fresh look at the documentation!

The post gives you a bit of an idea what the event will be like and what you can expect, especially as a first time submitter. It will be happening completely online via the "#symfony-docs" channel on the Freenode IRC network. You can prepare by following some of the links in the post to pending pull requests and a list of missing documentation contents.

tagged: symfony hackday documentation update event irc freenode framework

Link: http://symfony.com/blog/announcing-the-fourth-symfony-docs-hack-day