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

TutsPlus.com:
New Features in Laravel 5.2
Jul 25, 2016 @ 11:14:31

On the TutsPlus.com site they've posted a guide sharing some of the new features that have come with the 5.2 version of the Laravel framework. With v5.3 on the horizon, it's good to get a solid base with 5.2 first.

In this article, I will take a look at the new features of Laravel 5.2 and describe them one by one. The new features are [...]: implicit route model binding, form array validation, API rate-limiting middleware, middleware groups, authentication scaffold and multiple authentication guard drivers

The post then goes through each of these topics providing a bit of explanation of what they're about and how they can be useful. There's also snippets of code included where helpful to show off the feature and provide a more useful example.

tagged: laravel features v52 overview code example description

Link: http://code.tutsplus.com/tutorials/new-features-in-laravel-52--cms-26229

Thijs Feryn:
What are Type Errors in PHP 7?
Jul 15, 2016 @ 09:58:19

In a new post to his site Thijs Feryn has shared an overview of the different types of type errors that can pop up in PHP 7. This includes both a text-based and video based versions depending on your preference.

PHP 7 has a concept called Type Errors. These errors are thrown on a type mismatch when interacting with functions. They can be caught just like exceptions. I created a video that explains the situation. This blog post goes into more detail and has some code examples.

The post gets into the details of the type errors including topics like:

  • new type hints that were introduced
  • how you can manually throw type errors
  • when PHP itself would throw the errors
  • type coercion

There's also a brief section about strict typing and how that changes what errors PHP might throw in your scripts.

tagged: type error php7 introduction overview video tutorial

Link: https://blog.feryn.eu/type-errors-php-7/

Matt Stauffer:
The new cache() global helper in Laravel 5.3
Jul 08, 2016 @ 11:11:28

Matt Stauffer has continued his series covering some of the new features in Laravel v5.3 with this look at the cache helper, a new feature introduced to help make working with your cached data easier.

As I was writing my book I noticed a pattern in the global helper functions like session() and, in some ways, cookie(). There are three primary functions that they can perform: get a value, put a value, or return an instance of their backing service.

[...] I mentioned that it seems like there should be a cache() helper, and before I could even think much more about it, Jeffrey (Way) had already written one up. So! Behold! The global cache() helper, new in Laravel 5.3.

He includes code samples showing the helper in action. It's a simplified helper so the main functionality is basically the same as the session and cookie helpers: read, write and return an instance of the CacheManager.

tagged: cache global helper laravel cachemanager overview

Link: https://mattstauffer.co/blog/the-new-cache-global-helper-in-laravel-5-3

Liip Blog:
A quick look on the current state of Drupal 8 (ecosystem)
Jul 08, 2016 @ 10:26:31

In a new post to the Liip blog Lennart Jegge shares a "quick look" at the current state of the Drupal 8 project and some of the issues some people are having making the transition.

Eight months ago Drupal 8.0.0 was released. Exciting news for drupalists. Since then comparing D8’s features to its predecessor is a topic in daily business. "Can drupal 8 do what we can do now with 7 today?". After playing around with D8 i get the feeling some crucial features are missing.

He shares some of the features he sees as still missing (a Top 10 wishlist) and how it seems difficult to get a good overview of the Drupal 8 ecosystem. Some modules have yet to be updated and rewrites can be difficult given the major "under the covers" changes to Drupal itself.

In the end the importance of a variety of mature modules that play together nicely is crucial when it comes to efficiency, maintainability and stability of a project
tagged: drupal8 ecosystem overview opinion features upgrade issues

Link: https://blog.liip.ch/archive/2016/07/07/quick-look-current-state-drupal-8-ecosystem.html

Symfony Finland:
Learn Symfony and modern PHP with Bolt 3.0 - a Silex powered CMS
May 11, 2016 @ 09:36:53

On the Symfony Finland site there's a new article posted about the recently released v3.0 of the Bolt CMS and details about this Silex-powered, modern PHP-based system.

On Tuesday 10th of May the development team released a new major version of Bolt CMS. The Open Source content management system is a lightweight and easy to use tool for managing websites and blogs. In addition it's perfect for learning modern PHP development practises.

The third major version of Bolt continues on the path, being an evolution rather than a revolution. The CMS is built on the Silex microframework based on the Symfony PHP components.

The article talks about the "solid foundation" of Silex and good project management skills of the team behind it. They then get into the installation of the tool and some of the libraries that it uses to get the job done (including Twig and YAML handling). They also list some of the things that are new in the v3.0 of the CMS including:

  • A new extensible Storage layer
  • Backend UI refresh
  • Improved tests / code coverage
  • New documentation
  • Web asset queues, and easier to keep files out of webroot

There's also mention of some of the things that were removed and didn't make the cut to be included in the release. The post ends with links to other resources where you can find out about Bolt, get its source and a few other articles about people putting it to use.

tagged: bold cms silex symfony modern release v3 overview installation

Link: https://www.symfony.fi/entry/learn-symfony-and-modern-php-with-bolt-3-0-a-silex-powered-cms

SitePoint PHP Blog:
An Overview of PHPUnit 5 – What’s New? What’s Coming?
May 10, 2016 @ 09:24:37

On the SitePoint PHP blog there's an article posted talking about the next major version of the PHPUnit unit testing tool - PHPUnit 5. It talks about what's new, what's changed and what has been added to help make your testing more effective.

It was January 2016 when the PHPUnit development team [announced](https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-5.0.0) the release of PHPUnit 5.0.

While several minor version have already been released since, PHPUnit’s major version 5 has introduced several new functionalities and deprecated a few others. In this article, we’ll take a look at the most notable changes.

Included in the list of changes the article mentions are things like:

  • the bump up the minimum PHP version requirements (5.6+)
  • new assertion methods
  • deep object cloning
  • passing mocks along with expectations

Several more are included and, with each some code examples or links to other resources for more information.

tagged: phpunit5 overview preview release features changes update

Link: http://www.sitepoint.com/an-overview-of-phpunit-5-whats-new-whats-coming/

SitePoint PHP Blog:
What Is Laravel Valet, and Why All the Fuss?
May 09, 2016 @ 13:29:09

The SitePoint PHP blog has posted an article adding to some of the others about the recently released Laravel Valet tool, providing an overview of the product and what it has to offer.

Valet is a tool which makes spinning up demo or discardable projects a breeze.

It’s a tool which combines some of the default software on OS X with some ideas about filepaths and serving of PHP apps, and some additional tools for skipping the need to modify the /etc/hosts file. Additionally, it allows for forwarding of access to the local application over the public internet when needed.

Unlike Vagrant or Docker It offers no isolation, making all apps use the same globally available software. Why this is important to note will be explained below.

The post then gets into some of "the particulars" the tool has to offer, essentially the "lock in" requirements:

  • OS X only
  • Shared system state (no VMs, only global)
  • Automatic virtual host
  • No dev / prod parity
  • Vendor-lock (with a caveat)
  • Live self-hosted preview

They point out that while Laravel Valet can be a handy tool if this is the tooling and setup you're looking for, it might not be for everyone.

tagged: laravel valet summary overview features requirements

Link: http://www.sitepoint.com/what-is-laravel-valet-and-why-all-the-fuss/

Symfony Finland:
Exotic PHP implementations: HippyVM, JPHP, Tagua VM, Peachpie
May 02, 2016 @ 09:15:37

On the Symfony Finland blog they have a recent entry looking at some of the other alternative PHP implementations with a brief overview of each.

In the past there have been alternative environment for running PHP in PIPP for Parrot VM and Quercus for JVM, but none of these have had real staying power. This changed with HHVM from Facebook in the early 2010's. It's completely separate from the Zend PHP implementation and is a fully featured alternative.

[...] Many the implementations are just proof of concept implementations and are far from supporting all the language features and rendering them to be useless for running Symfony or other contemporary applications. Regardless of whether these are immediately useful for projects it's interesting to follow these efforts.

The four covered in the post allow for PHP to be run in some pretty non-traditional environments:

There's a brief look at each of these projects included and, while most aren't close to what HHVM has to offer, you might take a look and see if they could be interesting to try out in some of your development.

tagged: implementation alternative hippyvm jphp taugavm peachpie overview

Link: https://www.symfony.fi/entry/exotic-php-implementations-hippyvm-jphp-tagua-vm-peachpie

php[architect]:
Mandrill Alternatives for PHP Applications
Apr 19, 2016 @ 12:07:16

With the recent (well, not too recent) announcement from MailChimp about the shift to a paid model for their Mandrill email service, PHP developers have been busy looking for alternatives. In this post to the php[architect] site Sandy Smith explores some of the other options out there, how they compare and what they have to offer.

n case you might have missed the announcement, MailChimp is changing Mandrill to be an add-on to paid MailChimp accounts, thus eliminating the generous free tier. We’re big fans of MailChimp and use its mailing list service for our own announcements, but a full MailChimp account isn’t going to be for everybody. [...] Many people also know Mandrill by reputation and will need options in the future. For you, we’ve put together this list of viable transactional email alternatives with PHP and major PHP application support.

Included in their list are services like:

For each service he includes a paragraph talking about what integrations and libraries there are for their use as well as what's included in their "free" levels.

tagged: mandrill alternative email service options sdk overview

Link: https://www.phparch.com/2016/04/mandrill-alternatives-for-php-applications/

TutsPlus.com:
What Are Laravel Exceptions?
Apr 18, 2016 @ 12:25:35

In a new tutorial posted on the TutsPlus.com site they get into some detail about what exceptions are in Laravel-based applications, when to use them and how to make your own.

As a PHP developer, you may use exceptions, because they allow you to notice when something has gone wrong or the user has acted in an unusual way (such as division by zero). Without exceptions, your application would end up presenting unwanted errors and being much more difficult to debug. It is also important that you halt execution immediately and take another course of action.

Exceptions are really simple, and they will make your development progress easier. When you learn how to use exceptions, this will be a usual part of your development.

They start by explaining what exceptions are (in the strictest sense, a definition from Martin Fowler) and an example of how one is caught in PHP. They briefly talk about when to use exceptions and how they're implemented in Laravel. The post finishes with a look at creating your own exception types and where to place them in your application. They also make the suggestion of using the Assertion package to verify data and catch the AssertionFailedException if there's an issue.

tagged: laravel exception example tutorial overview usage

Link: http://code.tutsplus.com/tutorials/what-are-laravel-exceptions--cms-25816