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

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

HHVM Blog:
HHVM 3.24 (End of PHP 5 Support)
Jan 18, 2018 @ 13:44:28

The HHVM project has made an announcement on their site about the latest update for the PHP language processor, v3.24 and how, among the list of changes, they're completely dropping support for PHP 5.

HHVM 3.24 is released! This release contains new features, bug fixes, performance improvements, and supporting work for future improvements. [...] 3.24 is the final release targeting PHP5; this includes source-level compatibility for PHP5 extensions (ext_zend_compat). We recommend migrating to Hack or PHP7.

As 3.24 is supported though 2018-12-17, this means that support will end at roughly the same time as PHP5 itself is scheduled to become unsupported (2018-12-31).

Other updates in the release include the retiring of support for Debian 7 Wheezy and Ubuntu 17.04 Zesty, the inclusion of "using" blocks and the addition of the XHP Attribute Spread Operator. You can find out complete details about this release from the HHVM blog.

tagged: hhvm php5 support release version project

Link: https://hhvm.com/blog/2018/01/16/hhvm-3.24.html

Joe Ferguson:
How to move a dependency to Composer while requiring an old version
Jan 17, 2018 @ 09:54:24

In a new post to his site Joe Ferguson shows you how to move a dependency over to Composer but still require the older version, possibly one that's already included in the codebase as a checked-in source.

A common problem I run into with older applications are dependencies that have been added and loaded from the application’s repository. You would often see a “libraries” folder with a “className.php” type file. If you’re lucky you’ll have the entire folder of the dependency including the release notes to be able to find out exactly what version you’re using.

[...] What if the author hasn’t tagged our older version? Maybe they converted the repository to git from subversion or some other system? You have to go digging into the commit history to find the commit you want to match your current version.

He includes the Composer configuration required for both examples (loading the older version and loading by commit ID) as well as the addition of the "minimum-stability" option. This option allows you to pull directly from the "master" branch if you need to - just be sure to define exact versions of other dependencies otherwise you'll get dev versions of them too.

tagged: composer dependency version old tutorial commit master

Link: https://www.joeferguson.me/how-to-move-a-dependency-to-composer-while-requiring-an-old-version/

Brandon Savage:
What version of PHP should my package support?
Jan 10, 2018 @ 10:09:46

In a post to his site Brandon Savage shares some of his thoughts about PHP package development and suggests how to figure out what versions of the PHP language it should support.

Everybody likes “the new hotness.” [...] Perhaps, then, it shouldn’t be so surprising that people get tremendously excited when a new version of PHP comes out. People look forward to the new features, whether they be the trailing commas in list() syntax or counting of non-countable objects.

[...] A new version of PHP can pose challenges to open source package maintainers. There are questions, like what is the minimum version we will support and how soon can we take advantage of the new features we’ve been waiting on? I want to offer up some thoughts, both as a package maintainer and a user of many open source packages.

He goes on to suggest that package authors should support down to the last currently supported version of the language (v5.6 at the time of this post). This allows users of the package that may be restricted and don't have the "new hotness" to keep using the package. He points out that this doesn't mean that you shouldn't use new features, just that older versions should be supported along with the newer ones for those depending on the package. He makes three suggestions as to how he thinks package maintainers should approach the issue:

  • maintainers should feel comfortable in bumping up the requirement to the latest (in a major release)
  • maintainers should also ensure that the support is still there for older versions that can't use the newer features
  • maintainers should bump up this minimum version when it falls out of active support
Supporting old versions of a language isn’t fun and isn’t glamorous. But it’s important. It’s important because there’a segment of the population who can’t upgrade yet. It’s important to make components accessible to a larger, broader audience who is struggling to find best practices and use modern packages. And it’s important for those users who are tied to a legacy version, and are struggling to get upgraded. But it’s the right thing to do for the community.
tagged: package version language support opinion maintainer old new

Link: https://www.brandonsavage.net/version-php-package-support/

Symfony Finland:
PHP-PM 1.0 launches with Docker images and Symfony 3+ support
Jan 09, 2018 @ 09:37:01

As is mentioned in this post on the Symfony Finland site, the PHP-PM project has hit their first stable release, v1.0, that includes some nice tools as well.

Running an application server written in PHP has been feasible for some years. One of the robus mature options for this has been PHP-PM, a process manager. Now the project has reached a major milestone with the release of 1.0.

The PHP-PM team released the first stable release on 8th of January 2018. It builds on the work done for some years and it builds on ReactPHP. ReactPHP is a low-level library for event-driven programming in PHP.

PHP-PM allows creating long running PHP processes that serve applications directly instead of relying an embedded PHP (like with Apache's mod_php) or a web server with PHP process manager (as with Nginx and PHP-FPM).

Updates for this release include the addition of bridges for static handling, PSR-7 integration and version bumps for Symfony components used in the system. You can check out the full list of changes in the release notes if you want to see more. The post also links to other articles with more reading and tutorials covering PHP-PM and how to put it to use (including Docker integration and basic benchmarks).

tagged: phppm process manager stable version release docker image symfony update project

Link: https://symfony.fi/entry/php-pm-1-0-launches-with-official-docker-images

PHP.net:
Multiple Versions Released - 5.6.33, 7.1.13, 7.2.1 and 7.0.27
Jan 05, 2018 @ 10:16:17

On the [main PHP.net site]http://php.net/() today they've announced the release of new released of all currently supported versions of the language:

All of these releases contain similar bugfixes correcting security issues reported in the language including problems in the CLI server, Phar handling, Zip functionality and the Opcache feature. It is suggested to update to these latest versions as soon as possible to prevent issues with these bugs.

As always you can download the source versions of these latest releases from the main downloads page or the Windows binaries from windows.php.net. If you're interested in the changes made, check out the Changelogs for PHP 7 and PHP 5.6.

tagged: version release language php56 php71 php72 security bugfix

Link: http://php.net/downloads

Zend Framework Blog:
Expressive 3 Preview
Dec 18, 2017 @ 11:14:27

The Zend Framework blog has posted a preview of Expressive v3, the next major release of their lightweight framework based on its larger sibling, Zend Framework.

Last week, the PSR-15 working group voted to start its review phase. PSR-15 seeks to standardize server-side request handlers and middleware, and both Stratigility and Expressive have been implementing draft specifications since their version 2 releases. Entering the review phase is an important moment: it means that the working group feels the specification is stable and ready for adoption. If, after the review period is over, no major changes are required, the specification can be presented to the PHP-FIG core committed for a final acceptance vote, at which point it will be frozen and ready for mass adoption.

Our plan is to have Stratigility and Expressive follow the new specification in its final form. To that end, we have been executing on a plan to prepare all our projects that work with PSR-15 to adopt the latest round of changes.

That work is ready today!

The post starts by talking about what changes come along with the PSR-15 specification including changes in namespacing, interfaces being renamed and a package split. It then talks about what changes they've made based on the PSR-15 updates and how you can test your own project to ensure it will be compatible with the updates. This includes changes that will be required to upgrade as the PSR-15 changes are not backwards compatible.

tagged: zendframework zendexpressive version preview update psr15

Link: https://framework.zend.com/blog/2017-12-14-expressive-3-dev.html

Fabien Potencier:
Symfony 4: Performance out of the Box
Dec 12, 2017 @ 13:48:07

In a quick post to his site Fabien Potencier (of Sensio Labs and the Symfony framework) has a post sharing some information around the performance of Symfony 4 and what kind of speed you can expect in your applications based on it.

Performance is an interesting and sensitive topic. Suffice to say that most projects should not care too much; modern PHP frameworks are fast enough for most use cases and projects. And PHP 7 performance improvements help a lot as well. But people like to compare frameworks, and I guess performance is one way to do so.

What about Symfony 4? During its development cycle, we did some nice performance optimizations: mainly to improve the router and container speed. But several non-related changes in Symfony 4 also help with performance... Your mileage may vary depending on your specific project of course.

He talks about some of the testing and evaluation that's already been done on "Hello world" script performance but points out that this isn't a very real world situation. He shares these metrics, however, to at least give a baseline to compare it against previous Symfony versions. The post also links to another resource that shares these and other benchmarks related to various PHP projects.

tagged: symfony4 performance symfony framework version benchmark

Link: http://fabien.potencier.org/symfony4-performance.html

Jerzy Zawadzki:
Symfony 4: New Hope
Dec 04, 2017 @ 11:16:56

In a new article to his Medium.com site Jerzy Zawadzki talks about why he things that Symfony 4 is "the new hope" for the framework. In the article he goes through the updates in their major version including code examples, commands and descriptions on each.

On November 30, 2017 new version of Symfony Framework has been released and it looks like core team followed the Star Wars numbering pattern, as 4th version is much better, leaving previous three behind as they look like ‘prequels’ now.

In this article, I will try to sum up all important changes made in Symfony 4, so if you are familiar with Symfony 3 and want to get known with new version? - ?this article is for YOU!

He talks about the changes in developer experience that come along with version 4 and updates to the installation process to make it even simpler. He lists out the packages that are installed in this new version and what's included by default. He then walks through the addition of other packages and tools, pulled in as custom options. Finally he talks about bundles, their use in Symfony 4 and the changes in how applications are structured based on their use.

tagged: symfony symfony4 changes framework version release feature

Link: https://medium.com/@zawadzki.jerzy/symfony-4-new-hope-dbf99dde91d8

PHP.net:
PHP 7.2.0 Released
Nov 30, 2017 @ 11:20:32

The PHP development group has a post on the main PHP.net site officially announcing the availability of the latest major version in the PHP 7.x series: PHP 7.2.0.

The PHP development team announces the immediate availability of PHP 7.2.0. This release marks the second feature update to the PHP 7 series.

There's a number of new features and changes that come with this release including counting of non-countable objects, the Object typehint, the removal of mcrypt and the new libsodium extension. You can view the full list of changes and bug fixes in the Changelog.

Downloads are available in the usual places: the main downloads page for the source packages and windows.php.net for the Windows binaries. Additionally a migration guide has been posted to help with migrating to this new version.

tagged: php72 release language version update migration

Link: http://php.net/archive/2017.php#id2017-11-30-1