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

SitePoint PHP Blog:
Up and Running with the Fastest PHP Framework on PHP7 in 5 Mins
Aug 24, 2016 @ 11:22:46

On the SitePoint PHP blog editor Bruno Skvorc has posted a tutorial helping you get up and running with PHP 7 and Phalcon in five minutes on a Homestead Improved virtual machine.

You may remember our past infatuation with Phalcon, the fastest PHP framework.

In this post, we’ll go through the process of getting it up and running in 5 minutes on one of our <a href="http://www.sitepoint.com/quick-tip-get-homestead-vagrant-vm-running/>Homestead Improved instances. If you’re not interested in why or what Phalcon is, just skip ahead to “Setting it up”.

He starts with a brief recap of what the Phalcon framework is (including Zephir), some history behind it and the latest advancement around the framework: LTS support for v3.0. The tutorial then gets into the setup and configuration of the VM along with PHP 7 and the latest stable version of Phalcon. He then uses the sample application provided by Phalcon and getting it boostrapped and running.

tagged: phalcon php7 tutorial demo homesteadimproved vm setup configure extension

Link: https://www.sitepoint.com/up-and-running-with-the-fastest-php-framework-on-php7-in-5-mins/

Symfony Finland:
Consider Docker for your Symfony projects
Aug 15, 2016 @ 11:24:35

On the Symfony Finland site there's a post that makes a recommendation for your Symfony framework based projects: give Docker a try to make setup and maintenance simpler.

During the first half of 2016 the web development community has talked about Docker quite a bit. The technology has been around since 2013, but during the last few months it has matured and started being adopted for mainstream web development. Docker is a great fit for Symfony projects too.

[...] Docker takes an approach where it wraps a piece of software into something known as a container. These containers are shipped complete with the application code, a runtime, system tools and libraries. Containers are thus guaranteed to always run the same, but can share files and networking with the host and other containers.

They then talk about how this "containerized" setup can be used to your advantage, making it simpler to get a Symfony application up and running with a few commands. The post then gets into an example setup of a Symfony Docker environment complete with Nginx, Varnish and PHP-FPM installed and linked. There's also setup for MySQL and Redis rounding out the data storage side. A quick "docker-composer up" command and, if all goes as expected, the environment is set up and waiting for your application.

tagged: symfony finland docker project tutorial setup configure

Link: https://www.symfony.fi/entry/consider-docker-for-your-symfony-projects

Chris Tankersley:
My Docker Setup
Jul 29, 2016 @ 11:56:11

Docker has quickly become one of the tools that have helped make difficult environment setup and thing of the past. Chris Tankersley, a PHP developer and devops practitioner, has shared some about his own PHP Docker workflow in a new post to his site.

When it comes to Docker, I use Docker Compose to set up and link all of my containers together. It's rare that I have a single container, though many of my Sculpin-based sites live quite comfortably inside of an nginx container, but even those take advantage of volumes.

For his standard three-tier setup he defines a basic docker-compose.yml configuration file with required services (nginx, PHP server, MySQL and Composer), local volume information and the links between them. With that working he uses another script to set up some PHP extensions and Composer as a service (making it a service provides isolation). He also includes the scripts he's written up to help run a few extra commands and execute the Composer and PHP commands much easier. He wraps the post up talking about how all of this fits into his overall workflow and how it relates to the deployment of the application into other environments.

tagged: setup environment workflow setup docker configuration deployment

Link: http://ctankersley.com/2016/07/27/my-php-docker-workflow/

Chris Tankersley:
My Docker Setup
Jul 29, 2016 @ 11:56:11

Docker has quickly become one of the tools that have helped make difficult environment setup and thing of the past. Chris Tankersley, a PHP developer and devops practitioner, has shared some about his own PHP Docker workflow in a new post to his site.

When it comes to Docker, I use Docker Compose to set up and link all of my containers together. It's rare that I have a single container, though many of my Sculpin-based sites live quite comfortably inside of an nginx container, but even those take advantage of volumes.

For his standard three-tier setup he defines a basic docker-compose.yml configuration file with required services (nginx, PHP server, MySQL and Composer), local volume information and the links between them. With that working he uses another script to set up some PHP extensions and Composer as a service (making it a service provides isolation). He also includes the scripts he's written up to help run a few extra commands and execute the Composer and PHP commands much easier. He wraps the post up talking about how all of this fits into his overall workflow and how it relates to the deployment of the application into other environments.

tagged: setup environment workflow setup docker configuration deployment

Link: http://ctankersley.com/2016/07/27/my-php-docker-workflow/

NetTuts.com:
Using PHP CodeSniffer With WordPress: Installing and Using the WordPress Rules
Jun 21, 2016 @ 13:21:45

The TutsPlus.com site continues their series covering the use of the PHP_CodeSniffer tool with WordPress in this latest post. In this new tutorial they show you how to install and use the WordPress-specific coding "sniffs".

If you're just joining the series, we've been discussing the topic of code smells, how to refactor them, and tools that are available to help us automate some of the monotony that comes with doing so, especially within PHP programming.

[...] If you've made it this far, I assume you're a WordPress developer, and you're interested in getting PHP CodeSniffer configured such that it can sniff out any problems in your code as it relates to the WordPress Coding Standards. That's good! Because in the remainder of this article, that's exactly what we're going to cover.

The tutorial helps you install the WordPress sniffs and how to add them to the standards supported by your local phpcs installation. The command to execute them against your WordPress plugin is included as well as example output and how to refactor those issues away.

tagged: phpcodesniffer smells tutorial wordpress install setup

Link: http://code.tutsplus.com/tutorials/using-php-codesniffer-with-wordpress-installing-and-using-the-wordpress-rules--cms-26443

Matt Stauffer:
Introducing Laravel Echo: An In-Depth Walk-Through
Jun 17, 2016 @ 12:11:02

Matt Stauffer has a new post to his site where he's put together an in-depth look at Laravel Echo, a feature included in newer versions of the framework that makes it easy to integrate websockets into your Laravel-based application.

A few weeks ago, Taylor Otwell introduced another branded product within the Laravel line: Laravel Echo. So far, the only coverage it's gotten has been his Laracasts video intro, but I recently wrote it up for my book and wanted to share that with you. What follows is an excerpt from Laravel: Up and Running, heavily modified to make sense in a blog format.

He then gets into what Echo is and the different pieces that make it up: updates to the Laravel broadcast system and a new Javascript package. He suggests some places where using Echo makes sense and how to set up a simple broadcast event in your application (non-Echo to start). This makes use of the Pusher service for real-time event broadcasting. With that in place, he helps you install the Echo dependencies and integrating messages from both public and private channels. He also includes a bit of code at the end to exclude the message from broadcasting to the current user if you ever find a need for it.

tagged: laravel echo indepth tutorial setup configure pusher javascript

Link: https://mattstauffer.co/blog/introducing-laravel-echo

Cees-Jan Kiewiet:
Deploying Sculpin to S3 with CircleCI
Jun 16, 2016 @ 11:56:12

Cees-Jan Kiewiet has written up a post showing how he combines S3 and CircleCI to deploy a Sculpin site for his blog. Sculpin is a popular PHP-based static site generator.

Until 10 minutes before the start of this month I had a VPS at Digital Ocean running with Jenkins and Gitolite on it for privately hosted repositories. With Github's recent move to unlimited repositories I really didn't have a need to host them myself anymore, and after playing with CircleCI's free tier it didn't make any sense anymore to keep that VPS up.

Since porting git over to another remote is as more Github's domain we're focusing on deploying Sculpin to S3 using CircleCI in this post.

He starts by outlining some of the prerequisites to get in place before trying to set up the process on your own application. He shows you how to set up an IAM user for the S3 bucket and configure CircleCI though a simple YAML file. He also mentions the set up for tests, loading in other dependencies needed (Composer) and finally the deployment that executes Sculpin's "generate" command to build the site.

tagged: sculpin circleci s3 aws deployment tutorial configuration setup

Link: https://blog.wyrihaximus.net/2016/06/deploying-sculpin-to-s3-with-circleci/

TutsPlus.com:
Using Let's Encrypt SSL With Your WordPress Project
May 24, 2016 @ 12:53:11

The TutsPlus.com site has posted a tutorial for the WordPress users out there about using Let's Encrypt and SSL certificates to easily secure your installation.

For years, purchasing, renewing, installing and managing SSL certificates overwhelmed me with expense and complexity. Now, Let's Encrypt makes it fairly simple and free.

Let’s Encrypt is an emerging, free, automated, and open certificate authority brought to you by a California public benefit corporation called the Internet Security Research Group—it also has nonprofit status. [...] In this tutorial, I'll walk you through installing Let's Encrypt on a few of my websites, including my WordPress consulting website, http://lookahead.io, soon to be https://.

You'll need a be a bit comfortable working at the command line to use the Let's Encrypt client, but they walk you through each step of the process explaining everything along the way. They start with a basic list of features the Let's Encrypt service provides and the requirements you'll need to get started. Screenshots of the setup wizard are included and the "one small difference" you'll need to make when using it with WordPress. They link to the SSL Labs site to help you verify the certificate is working as expected and finish with setting up the auto-renewal of the certificate via a simple cron job.

tagged: wordpress letsencrypt install setup configure ssl certificate free

Link: http://code.tutsplus.com/tutorials/using-lets-encrypt-ssl-with-your-wordpress-project--cms-22303

SitePoint PHP Blog:
How Can the ELK Stack Be Used to Monitor PHP Apps?
May 12, 2016 @ 10:42:36

The SitePoint blog has posted a new tutorial from author Daniel Berman about using the ELK stack to monitor PHP applications. The ELK stack is made up of Elasticsearch, Logstash and Kibana to make for effective log storage and searching.

A modern web application environment consists of multiple log sources, which collectively output thousands of log lines written in unintelligible machine language. If you, for example, have a LAMP stack set up, then you have PHP, Apache, and MySQL logs to go through. Add system and environment logs into the fray — together with framework-specific logs such as Laravel logs — and you end up with an endless pile of machine data.

Talk about a needle in a haystack. [...] The ELK Stack (Elasticsearch, Logstash, and Kibana) is quickly becoming the most popular way to handle this challenge. Already the most popular open-source log analysis platform — with 500,000 downloads a month, according to Elastic — ELK is a great way to centralize logs from multiple sources, identify correlations, and perform deep-data analysis.

They walk you through the full installation of all three tools starting with Java (they all require it) followed by instructions for each piece. Once they're all up and running (and playing nice together) they help you configure it to pull in Apache access logs and search on the results. They then populate it with quite a bit more sample data and share some basic tips on searching using the custom searching "language". Finally they talk about the visualizations Kibana offers complete with an example showing browser percentages from users of the site.

tagged: elk stack tutorial monitor elasticsearch logstash kibana setup configure apache log

Link: http://www.sitepoint.com/how-can-the-elk-stack-be-used-to-monitor-php-apps/

Freek Van der Herten:
How to setup and use the Google Calendar API
May 10, 2016 @ 12:10:32

In this new tutorial posted to his site Freek Van der Herten shows you how to connect your application to the Google Calendar API, complete with screenshots for a step-by-step process.

For a project I’m working on I needed to interact with a Google Calendar. I’ve your ever worked with some API’s by Google then you know their documentation can be very confusing. It’s not that they don’t have documentation, but code examples of common use cases are simply not present. You must wade through a lot of pages to learn basic things such as how to make an authorized request let alone how to fetch calendar events. In this post I’d like to explain in a human readable way how setup and use the Google Calendar API.

He starts on the Google side with the setup of the application and getting the credentials you'll need for the connection. Next up is setting up the calendar itself and the permissions to allow access to all event information. The post then finishes with a PHP example using the "google/apiclient" library to make the Calendar connection and get all events currently on the calendar. As a bonus he also points out a library he's creating to make it easier to work with events in Laravel-based applications.

tagged: google calendar tutorial api setup configuration connection

Link: https://murze.be/2016/05/how-to-setup-and-use-the-google-calendar-api/