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

PHP.net:
PHP7 Migration Guide Posted
Aug 17, 2015 @ 11:29:48

The official PHP.net has posted their PHP 7 migration guide for those already on PHP 5.6.x and wanting to prepare their applications for PHP7.

Despite the fact that PHP 7.0 is a new major version, efforts were put in to make migration as painless as possible. This release focusses mainly on removing functionality deprecated in previous versions and improving language consistency. There are a few incompatibilities and new features that should be considered, and code should be tested before switching PHP versions in production environments.

The guide includes links to other pages showing things like:

  • Backward incompatible changes
  • New features
  • Deprecated features in PHP 7.0.x
  • New functions/classes/interfaces/global constants
  • Removed Extensions and SAPIs

There's also a link to some other various changes that's not completely fleshed out yet, but is evolving as PHP 7 gets closer to a final release.

tagged: php7 migration guide php56 changes update deprecation remove features

Link: http://php.net/manual/en/migration70.php

UserSnap Blog:
A Practical Guide to Building Fast Web Applications in the Cloud
Aug 14, 2015 @ 10:44:58

On the UserSnap blog Luciano Mammino has provided a guide to building fast applications in the cloud using PHP and several tools and techniques. He offers a list of six rules to follow to make building the applications fast (and fast applications).

In this post Luciano highlighted some of the most common principles you should consider while building high performing web applications (specifically on the backend part). The following concepts discussed here can be applied to any language and framework. Though this post will cover some concrete examples, design patterns and tools that are mostly used in the PHP ecosystem.

His list of rules includes tips like:

  • Avoid premature optimization
  • Defer the work you don’t need to do immediately
  • Use cache when you can
  • Prepare your app for horizontal scalability when possible

Each point comes with a paragraph or two of explanation as to why it's an issue to watch out for and some tips to help prevent it as well as tools that can help.

tagged: guide practical fast application top6 tips tools

Link: http://usersnap.com/blog/building-web-applications-cloud/

StarTutorial.com:
PHP Object-Oriented Programming Beginner's Guide
Aug 12, 2015 @ 09:45:14

For those working to move from procedural PHP into a more object-oriented world but may be having some trouble with the transition, the Star Tutorial site has a great beginner OOP in PHP guide you should check out.

They cover all of the basics you'll need to get started with objects in PHP including:

  • classes versus objects
  • visibility
  • inheritance
  • polymorphism
  • interfaces versus abstract classes

Each section is a quick definition and a bit of code to help illustrate the point. This isn't going to be a hand-holding kind of tutorial showing you each step to making an OOP application. Instead, it provides quick, high level summaries of the main OOP concepts to get you on the right road.

tagged: oop object beginner concepts guide tutorial section concepts

Link: http://www.startutorial.com/homes/oo_beginner

Knp University:
How we Upgraded to Symfony 2.7 (+ deprecation notices)
Jun 01, 2015 @ 11:17:24

The Knp University site has a new post to their blog sharing how they migrated to Symfony 2.7, the latest release of the popular PHP framework.

Symfony 2.7 - the next LTS release - came out on Saturday, with bells and whistles like 100+ new features/enhancements and a surprise new bridge component to PSR-7. So, we decided to upgrade immediately and report back. Let's go!

They walk through each stage of the process, sharing code and summaries about what changed along the way (including the update to the composer.json):

  • You need to upgrade sensio/distribution-bundle
  • You Need -with-dependencies
  • Upgrading FOSUserBundle
  • Fixing Behat 2.5

It's a pretty short list and obviously your milage may vary depending on what version you're updating from, but most recent versions shouldn't have too much trouble.

tagged: knpuniversity upgrade symfony27 guide steps fixes

Link: http://knpuniversity.com/blog/upgrading-symfony-2.7

Binary Studio Blog:
Definitive Guide On Creating Custom Providers For Laravel OAuth2 Authorization
May 26, 2015 @ 12:45:12

A new guide has been posted showing you how to create custom OAuth2 providers for your Laravel application. In this case they wanted to hook the application in via Socialite to the VK social network but needed a custom connector to make it happen.

First of all let’s say that social authorization is very popular and frankly speaking it’s really handy tool. Surfing internet we can see a lot of sites and services which offer login with Facebook, Twitter, Google and other social networks. [...] If you’re building your website in PHP using Laravel, probably you’ve noticed Socialite which provides OAuth / OAuth 2 authentication with Facebook, Twitter, Google, and GitHub. The most famous social network which provides OAuth2 authentication in Russian segment of the internet is vk. But there is a lack of such connector (provider) in Socialite library. Actually it’s not a hard problem, so let’s build new VkProvider on top of Socialite’s components.

He starts with a brief look at the typical OAuth2 authentication flow between the social network and your application. From there it gets more vk.com specific. He shows how to set up the custom application on their side, updating your configuration with the credentials and installing Socialite. He then implements a "VkProvider" defining the required methods based on the interface. He then registers it as a "SocialiteServiceProvider" and uses it in a "login" request route.

tagged: oauth2 guide custom provider laravel socialite tutorial vkcom russian

Link: http://binary-studio.com/2015/05/25/laravel-oauth2/

SitePoint PHP Blog:
Laravel 4 to Laravel 5 – The Simple Upgrade Guide
Apr 06, 2015 @ 11:49:51

The SitePoint PHP blog has posted a guide to help you upgrade from a Laravel 4 based application to the latest version, Laravel 5. Author Younes Rafie walks you through each step of the process, providing sample code and explanations of the changes along the way.

Laravel 5 is already out, but the fear of change is taking everyone. We keep hearing people complaining about some radical changes. Like, why this new folder structure? Will my application break if I do a composer update? In this article, we’re going to look at how to migrate your existing Laravel 4 application to Laravel 5 and understand the new folder structure.

he starts by helping you get Larave 5 installed and working via Composer. He then makes updates to some configuration files for his sample application (it hooks into the Google Analytics API) including the Analytics connection information. He includes changes to the route handling and moving some files around to their new locations. He also mentions the re-installation of the Illuminate/Html package as it's no longer included in the base release.

tagged: laravel4 laravel5 upgrade guide tutorial framework

Link: http://www.sitepoint.com/laravel-4-laravel-5-simple-upgrade-guide/

Scotch.io:
A Beginner’s Guide To Composer
Mar 31, 2015 @ 13:48:55

The Scotch.io site has posted a guide that can help you if you're just getting started in the world of PHP packages via Composer. In this new tutorial Daniel Pataki introduces you to the tool and how to use it to install the dependencies you need.

I’m sure there are plenty of coders out there who are wondering about the benefits of using composer and many who are afraid to make the leap into a new system. In this article we’ll take a look at what exactly Composer is, what it does and why it is a great tool for PHP projects.

He starts with the basics of dependency management, why it would be used in a project and how it automates the installation and integration of 3rd party libraries. From there he helps you get Composer installed and starts in on a sample "composer.json" configuration file. In his example he installs Monolog, the popular PHP logging class. He talks some about how to specify versions, locking down the dependency versions to install and installing "developer only" requirements.

tagged: composer package dependencies library introduction beginner guide

Link: https://scotch.io/tutorials/a-beginners-guide-to-composer

Matt Stauffer:
Upgrading from Laravel 4 to Laravel 5
Jan 19, 2015 @ 10:37:19

Matt Stauffer has posted a guide to his site to help you migrate from Laravel 4 to Laravel 5 as painlessly as possible. This is part fourteen in his overall introduction to Laravel 5 series of posts.

It's very simple to get started in a new Laravel 5 app [...] but what if you have a Laravel 4 app you want to upgrade? You might think the answer is to upgrade the Composer dependencies and then manually make the changes. Quite a few folks have created walkthroughs for that process, and it's possible—but there are a lot of little pieces you need to catch, and Taylor has said publicly that he thinks the better process is actually to start from scratch and copy your code in. So, that's what we're going to be doing.

He walks you through cloning a new Laravel 5 instance and setting up the various pieces of the application including the app itself, the domain folder and Composer dependencies. He then gets into the migration of things in the "app/" folder like controllers, database migrations and models. He also includes steps to update namespacing, handling the configuration updates, moving over user handling and any forms you may have created.

tagged: laravel4 laravel5 upgrade guide tips steps

Link: http://mattstauffer.co/blog/upgrading-from-laravel-4-to-laravel-5

Anthony Ferrara:
A Beginner's Guide To MVC For The Web
Nov 24, 2014 @ 10:42:41

Anthony Ferrara has posted what he calls a beginners guide to MVC for the web, a tutorial that introduces to you the basic concepts behind the Model-View-Controller design pattern and how it should fit in with the SOLID design principles.

There are a bunch of guides out there that claim to be a guide to MVC. It's almost like writing your own framework in that it's "one of those things" that everyone does. I realized that I never wrote my "beginners guide to MVC". So I've decided to do exactly that. Here's my "beginners guide to MVC for the web".

He starts with his first lesson, his most important one really - you don't need "MVC" (the concept, not the pattern...he notes them differently). He then gets into what the MVC pattern actually is and describes each piece and how they fit together. Following that, he talks about "MVC" as a concept and how it's different from MVC, the design pattern (hint: the pattern describes one implementation of the MVC ideals). He talks about the role of state in the MVC structure and how the implementation of the MVC idea is slightly different in the various "MVC frameworks" out there.

There is a very useful lesson that MVC brings: Separation Of Concerns. Meaning that you should separate different responsibilities into different sections of your application. Separation of Concerns is a necessary step in dealing with Abstraction. Instead of latching on to MVC, latch on to abstraction. Latch on to separation of concerns. Latch on to architecture. There are far better ways to architect and abstract user interaction for server-based applications than MVC.
tagged: beginner guide mvc modelviewcontroller designpattern concept solid abstraction

Link: http://blog.ircmaxell.com/2014/11/a-beginners-guide-to-mvc-for-web.html

Matthias Noback:
Unnecessary contrapositions in the new "Symfony Best Practices"
Oct 15, 2014 @ 12:29:31

Matthias Noback has a new post today with some of his thoughts about the recently released Symfony Best Practices book and some "unnecessary contrapositions" and things he sees that could help improve the perception of the book and the advice it provides.

Of course I'm going to write something about the new Symfony Best Practices book that was written by Fabien Potencier, Ryan Weaver and Javier Eguiluz. It got a lot of negative responses, at least in my Twitter feed, and I think it's a good idea to read Richard Miller's post for some suggestions on how to deal with an "early preview release" like this and how we can be a bit more positive about it.

He emphasizes the "staying positive" aspect of his message and points out that while some of the suggestions are good, they may not be the "best" in all circumstances. His main point, though, is that he thinks the way the book was introduced (the wording of the post) was unfortunate and cast a more negative light on the work done previously around Symfony best practices and advice. He recommends changing things around a bit in both the messaging and the book itself to take the focus away from the "you're doing it wrong" and encourage people to do it the way they recommend, casting a more positive spin on it all.

tagged: symfony bestpractices guide reaction opinion positive

Link: http://php-and-symfony.matthiasnoback.nl/2014/10/unnecessary-contrapositions-in-the-new-symfony-best-practices/