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

Laravel News:
Carbon Updates Coming to Laravel 5.8
Oct 11, 2018 @ 09:32:59

On the Laravel News site there's a new post sharing information about an upcoming upgrade for the framework's date handling. In Laravel 5.8, there's plans to update the Carbon library to v2.

Thanks to Carbon maintainer @kylekatarnls you will be able to use Carbon 1.0 or Carbon 2.0 staring in Laravel 5.8. The update includes the ability to use Carbon immutable and even make your application use CarbonImmutable as the default.

[...] According to the laravel/framework pull request you can choose which class you want for dates “such CarbonImmutable, Chronos or simply DateTime.”

For those that want to transition to using some of the features Carbon v2 provides, they've linked to an upgrade guide and some information about how localization will change as a re result of the upgrade.

tagged: carbon datetime handling laravel upgrade guide

Link: https://laravel-news.com/carbon-2-laravel

Community News:
Critical Drupal Security Vulnerability Announced
Mar 29, 2018 @ 09:13:19

The Drupal project has announced a critical security vulnerability in the currently supported versions of the popular CMS: Drupal 7 and 8 (as well as v6). The announcement on the main Drupal site details the issues and provides a link to an FAQ with more detail about the issue.

A remote code execution vulnerability exists within multiple subsystems of Drupal 7.x and 8.x. This potentially allows attackers to exploit multiple attack vectors on a Drupal site, which could result in the site being completely compromised.

[...] Drupal 8, 7, and 6 sites are affected. According to the Drupal project usage information this represents over one million sites or about 9% of sites that are running a known CMS according to Builtwith.

The issue could allow an attacker to take full control of the application and execute whatever code they'd want to on the server. They recommend upgrading immediately to safeguard your Drupal application. They also provide links to a guide on what to do if you are hacked and to the Drupal 6 patch (as well as steps you can take if you can't upgrade).

tagged: drupal cms vulnerability security announcement upgrade

Link: https://www.drupal.org/sa-core-2018-002

Zend Framework Blog:
Expressive 3!
Mar 19, 2018 @ 12:14:54

The Zend Framework blog has posted their official announcement of the release of Expressive version 3, the latest major release for the Zend Framework-based microframework based around PSR-15 middleware.

Expressive 3 embraces modern PHP, and requires PHP 7.1 or higher. Strong type-hinting, including return type hints, make both our job and your job easier and more predictable. The ability to use all modern PHP features helps us deliver a solid base for your application.

Expressive 3 provides full support for the PSR-15 (Middleware and Request Handlers) standard. [...] Expressive 3 massively refactors its internals as well. [...] Expressive 3 provides more command line tooling and tooling improvements in order to make developing your application easier.

[...] Finally, we recognize that Expressive has changed massively between versions 1 and 3, while simultaneously keeping its primary API stable and unchanged. However, to help users find the information they need for the version they run, we have rolled out versioned documentation, with each version providing only information specific to its release cycle.

The post also lists out some of the new components including zend-expressive-session, zend-expressive-csrf and zend-expressive-hal. There's also links to more information about upgrading, community resources and a "thank you" section to several people that helped get the project to this version 3 release.

tagged: zendframework zendexpressive release v3 major features upgrade thanks

Link: https://framework.zend.com/blog/2018-03-16-expressive-3.html

thePHP.cc:
Why PHP 7.2 Is Important
Feb 06, 2018 @ 09:33:41

On thePHP.cc site there's a post that talks about an upcoming PHP release, PHP 7.2, and why it's important despite it not having any amazing new features or too much in the way of major changes. There are a few things they mention, however, that make it seem a lot less boring.

A while ago, Sebastian said in a presentation that "PHP 7.2 will be a boring release". What he meant by that is that PHP 7.2 does not have an awful lot of fancy new features. Okay, adding the sodium extension to PHP's standard distribution is great, but the majority of PHP developers do not have to deal with cryptography in PHP on a daily basis.

[...] We are not so sure anymore that PHP 7.2 really is a boring release. As with every release in the 7 series, PHP keeps getting faster and faster. [...] The PHP core developers, again, did a great job cleaning up some more sins of the past. [...] Along with the cleanups that were already done, quite a few things have been deprecated in PHP 7.2, which schedules them for removal in PHP 8.

They talk about some of the changes coming with PHP 7.2 including the addition of libsodium support, smaller changes to variable handling and what's being done to prepare the language for the next major version, PHP 8. They also remind their readers that no version of PHP 5 - even 5.6 - is supported any longer (just security fixes now) and all current users of the language should upgrade to PHP 7.0+ immediately.

tagged: php72 importance version upgrade features

Link: https://thephp.cc/news/2018/02/why-php-72-is-important

Freek Van der Herten:
How to upgrade from PHP 7.1 to 7.2 on MacOS using Homebrew
Feb 02, 2018 @ 10:55:29

Those on OSX using PHP via Homebrew may be wondering how they can upgrade their systems to the latest version of the language, PHP 7.2. Fortunately, as Freek Van der Herten shows in this new post the upgrade process is just a few quick commands away.

PHP 7.2 was released almost two months ago. I decided to wait a bit until a stable version of Xdebug with PHP 7.2 compatibility was available. And that happened yesterday with the release of Xdebug 2.6.

To make the switch over to PHP 7.2 from 7.1 (or really any other PHP version) it's a simple matter of unlinking the current version and installing PHP 7.2 with the matching Xdebug package. He also includes the commands for installing the packages for Imagick and Redis handling.

tagged: php71 php72 upgrade homebrew install unlink command tutorial

Link: https://murze.be/how-to-upgrade-from-php-71-to-72-on-macos-using-homebrew

PHP.net:
PHP 7.1.12 Released
Nov 28, 2017 @ 11:16:22

On the main PHP.net site they've posted an announcement about the latest release in the PHP 7.1.x series: PHP 7.1.12:

The PHP development team announces the immediate availability of PHP 7.1.12. This is a bugfix release, with several bug fixes included. All PHP 7.1 users are encouraged to upgrade to this version.

Bugs in this released include issues in PHP's CLI handling, GD image manipulation, internationalization and reflection with Mysqli. You can find the full listing of issues fixed in the full Changelog. As always you can download this latest release from the main downloads page for the source packages and windows.php.net for the Windows binaries.

tagged: language release php71 bugfix upgrade

Link: http://php.net/index.php#id2017-11-24-1

Adam Culp:
Stop the pain, get to PHP 7
Oct 09, 2017 @ 11:21:24

In a post to his site Adam Culp makes a recommendation to all of those running their applications on older versions of the language: stop the pain, get to PHP7.

So, now you may be asking, “What does [my football story] have to do with upgrading to PHP version 7?” The answer, because many are letting the pain of moving to PHP 7 prevent them from experiencing the pleasure and rewards.

PHP version 7.0 was released almost 2 years ago. (1 year 10 months to be exact.) And many are still running PHP version 5.something. As a matter of fact, PHP version 7.0 is already going to run out of active community support in only 1 month and will only receive security fixes for another year after that.

He then talks about some of the pains that usually come with upgrading, especially when the jump is a relatively large one (like from the 5.x world). He mentions the acclamation of limitations that is all too easy to get used to with older versions. He also covers some of the pleasures that come with PHP 7 including one of the most major ones: the instance performance boost it gives most applications.

tagged: php7 upgrade pain migrate php5 version language

Link: http://www.geekyboy.com/archives/1376

Facile.it Engineering Blog:
How to gradually upgrade toward PHPUnit 6 with namespaced classes
Sep 13, 2017 @ 11:56:03

On the Facile.it Engineering blog there's a recent post sharing some tips on how to gradually upgrade your PHPUnit tests to work with version 6 of the popular PHP unit testing tool.

In the latest months I wrote multiple times, in different projects, code migrating PHPUnit toward major version 6. This upgrade is harder than the previous one, since in this version it was introduced a big breaking change: all classes got (finally!) namespaced.

This means that any usage of those classes in your project needs to be updated. [...] In this article I will explain which steps I applied during those migrations, highlighting the most frequent hiccups.

He then start with "the easy one" to take care of the refactor: updating tests to replace the "PHPUnit_*" classes with the namespaced versions. With those out of the way, he talks about "the bumpy one" to handle: modifying test listeners to work with the new PHPUnit structure. Once these are taken care of you can then make the move up to PHPUnit 6 and PHP 7 (if you're not there already) full time.

tagged: phpunit upgrade version unittest phpunit6 php7 tutorial

Link: https://engineering.facile.it/blog/eng/phpunit-upgrade-namespace/

SitePoint PHP Blog:
Upgrading from PThreads v2 to V3: What to Look out For
Mar 30, 2017 @ 12:43:15

On the SitePoint PHP blog Thomas Punt has returned with more pthreads knowledge and shows you a few things to watch out for when upgrading from pthreads v2 to v3. pthreads is a PHP extension that allows for better process handling directly from PHP than just the built in proc_* functions.

A fair amount has changed for the pthreads extension with the release of pthreads v3. This article aims to cover the necessary information for those who are looking to upgrade their applications from pthreads v2 to v3.

If you’re unfamiliar with pthreads, check out my introduction to pthreads instead!

He starts with some of the more generic changes in this latest version with the most major being that it can now only be used in the command-line environment. Other changes were made to workers, method modifiers and the removal of some classes and methods. He also mentions some of the methods that were changed and some new classes/methods that were added. Overall he's of the opinion that, while some of the changes could make for headaches in the transition, v3 of the extension has "received a nice cleanup and is looking ever better."

tagged: pthreads threading version change upgrade guide

Link: https://www.sitepoint.com/upgrading-pthreads-v2-v3-look/

Alejandro Celaya:
My thoughts after migrating some projects to Zend Expressive 2
Mar 28, 2017 @ 10:15:20

Alejandro Celaya has a new post to his site sharing some of his thoughts after migration applications to Zend Expressive 2 and some of his experiences along the way upgrading to this latest version.

The day Zend Expressive 2 was released I was super excited. I have been using it a lot for both professional and personal projects, so I'm quite used to it.

Since I've been using it in many projects, being able to update all of them to version 2 was a challenge, but I can say, I have succeed.

He talks about the projects themselves first, his own site at alejandrocelaya.com and shlink.io, and what kind of functionality they have. He then briefly covers the process to get them migrated and some of the changes he needed to make including:

  • adding an error hander
  • moving to the new error handling middleware strategy
  • using the support for interop middleware (single-pass)
  • small router changes due to using a custom router

He ends the post looking at the shift in programmatic approach Zend Expressive 2 uses (versus v1 handling) and changes he made to his middleware handling to reflect it.

tagged: zendexpressive2 zendexpressive upgrade application process changes

Link: https://blog.alejandrocelaya.com/2017/03/27/my-thoughts-after-migrating-some-projects-to-zend-expressive-2/