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

Cloudways Blog:
How To Create Simple Rest API In Symfony 3.1
Aug 30, 2016 @ 12:59:10

The Cloudways blog has posted a new tutorial helping you get up and running quickly with a simple REST API written using the Symfony framework. In the article they not only explain how to create the API but also include a bit of REST theory for those not completely familiar with the terms and functionality involved.

Symfony is fast becoming the favourite framework among developers for rapid application development. And despite releasing Symfony 3.1 and 3.2 in the previous quarter, they are still introducing many changes and upgrades. If you’re still using the previous versions, you must upgrade Symfony Framework to the latest and stable version 3.1.

Yes! We know that Symfony is one of the best frameworks to develop rest API, so in this article we will make simple rest API in Symfony 3.1. I am assuming that you’ve already setup PHPstack application on Cloudways with Symfony installed, but if you haven’t, follow this installation guide.

They briefly talk about the REST HTTP verb types and what kind of actions they relate to. With that defined the tutorial then gets into the requirements including the installation of two bundles: JMSSerializerBundle and NelmioCorsBundle. From there examples of configuration changes, commands to make users and execute migrations on the local database are included. With this system set up they include sample code for each HTTP verb type letting you perform the actions on the User entity (create, read, update and delete).

tagged: symfony rest api simple tutorial introduction phpstack

Link: https://www.cloudways.com/blog/rest-api-in-symfony-3-1/

SitePoint PHP Blog:
Local Composer for Everyone! A Conference-Friendly Satis Setup
Aug 30, 2016 @ 11:13:30

On the SitePoint PHP blog editor Bruno Skvorc has posted a tutorial showing you how to set up the Packagist alternative, Satis, in a local network configuration instead of requiring users to still access the external web.

While preparing my technical materials for WebSummerCamp, I realized my workshop would rely on a fairly stable internet connection, as we’d have a lot of ground to cover and a lot of packages to install. Rather than rely on the gods of live demos, or pre-installing everything and ruining the experience, I picked another route.

In this post, I’ll show you how to set up a local Satis instance and have it host the packages over the network it’s currently on, so that everyone who’s also connected to it can put the address into composer.json as a custom repository source, and retrieve all packages from your machine locally – no internet connection required!

He then shows you how to set up the system on a Homestead Improved VM locally, cloning Satis inside of it. He includes an example of the configuration of his required packages and how to build the local repository using this setup. Then, using the built-in PHP web server, he shows the result of the setup and how to access it from other machines. Finally, a few updates are required to the user's composer.json to use the local versions instead of the normal remote connection for the package downloads.

tagged: composer satis local network tutorial setup configuration example

Link: https://www.sitepoint.com/local-composer-for-everyone-a-conference-friendly-satis-setup/

Laravel News:
Controller Construct Session Changes in Laravel 5.3
Aug 30, 2016 @ 10:45:13

On the Laravel News site there's a post detailing some of the updates made to session and controller handling in v5.3 of the framework. It mostly revolves around how the middleware handling changed on each request from v5.2.

Back in laravel 5.2, a developer was able to interact with the session directly in a controller constructor. However, this has changed in laravel 5.3.

The difference between how the 5.3 & 5.2 handle an incoming request is that in 5.2 the request goes through 3 pipelines: global, route and controller [...] In 5.3 the request goes through only 2 Pipelines: global and route/controller (in one pipeline).

The post includes a quote from Taylor Otwell (creator and lead developer of the framework) about why this change was made. Then it shows an alternative to directly accessing this session information in your controllers: a Closure-based middleware in the constructor to execute your checks.

tagged: laravel controller session update access middleware change v53

Link: https://laravel-news.com/2016/08/controller-construct-session-changes-in-laravel-5-3/

Voices of the ElePHPant:
Interview with Colin O'Dell
Aug 30, 2016 @ 09:22:11

The Voices of the ElePHPant podcast has posted another episode in its series of video interviews with members of the PHP community from this year's php[tek] conference. In this latest show how Cal Evans talks with Colin O'Dell.

They talk about speaking at conferences, how *Colin* got started in his own speaking. They also cover the presentation *Colin* gave at php[tek] this year covering security related to security, learning about it from the perspective of a hacker rather than a developer. *Colin* also shares what he sees as one of the largest issues developers forget about: trusting data too much.

You can catch this latest episode either through the in-page audio/video player or you can download the mp3 to listen at your leisure. If you enjoy the show be sure to subscribe to their feed and follow them on Twitter.

tagged: voicesoftheelephpant community interview colinodell podcast

Link: https://voicesoftheelephpant.com/2016/08/30/interview-colin-odell/

Community News:
Latest PECL Releases (08.30.2016)
Aug 30, 2016 @ 08:05:02

Latest PECL Releases:

tagged:

Link:

PHPUgly Podcast:
Episode 24 - The Value of Work
Aug 29, 2016 @ 12:13:20

The PHPUgly podcast has posted their latest episode as recorded on August 18th, 2016 - Episode #24. Join hosts Eric Van Johnson and Tom Rideout as they talk about:

  • The TV show "Mr Robot"
  • the SDPHP and SDLUG Meetups
  • the "FIG Follies" articles
  • the idea of "Being asked to work for free"

You can listen to this latest episode either using the in-page audio player or over on SoundCloud. If you enjoy the show, be sure to subscribe to their feed and follow them on Twitter for updates on when the latest shows are released.

tagged: phpugly podcast ep24 value work ericvanjohnson tomrideout

Link: https://soundcloud.com/phpugly/episode24

Symfony Finland:
How to implement AMP (Accelerated Mobile Pages) on the eZ Platform CMS
Aug 29, 2016 @ 11:44:58

On the Symfony Finland site they've posted an introductory article showing you how to implement accelerated mobile pages (AMP) in an application based on the ez Platform CMS.

Accelerated Mobile Pages is an initiative from Google to speed up mobile browsing. AMP is an open standard based on HTML. It enforces performance by limiting functionality and includes remote caching.

Given Google's continuing dominance search both publishers and CMS vendors need to take AMP into account. In this article you'll learn the basics of how to implement AMP with eZ Platform CMS and Symfony.

The post starts out with a bit of background about AMP and how it relates back to the main content of the site. With that knowledge in place the author moves into the code, showing how to use annotations to create the route, building and returning the template including the meta and link tags required to link this AMP version back to the main content page.

tagged: tutorial amp mobile pages accelerated symfony twig meta link

Link: https://www.symfony.fi/entry/how-to-implement-amp-accelerated-mobile-pages-ez-platform-cms

Master Zend Framework:
The 3-Step Guide to Downloading Files in Zend Expressive
Aug 29, 2016 @ 10:37:44

On the Master Zend Framework site there's a tutorial posted showing you how to set up file download functionality in a Zend Expressive-based application.

A common requirement of web-based applications is to upload and download files. But, out of the box, there’s no simple way to download them in Zend Expressive. This tutorial shows you how - step-by-step.

Recently, I was asked on Twitter by @dgoosens, about how to download files using Zend Expressive. The timing was pretty good, as I’d done a simple implementation in a recent Zend Expressive project. So I knocked up a quick example and he, @acelayaa, and I talked it over, making various changes and suggestions along the way.

So, In today’s tutorial, I’m going to walk through a 3-step process for downloading files when using Zend Expressive.

He breaks the process down into three parts:

    1. The Download Functionality
    1. Using the Download Method
    1. Running the Application & Downloading the File

He includes code or commands for each step, showing you exactly how to set up this simple piece of functionality. Additionally it's implemented as a (mostly) self-contained method using the Stream handler to set the required headers and body.

tagged: zendframework zendexpressive file download tutorial stream

Link: http://www.masterzendframework.com/downloading-files-in-zend-expressive/?platform=hootsuite

/Dev/Hell Podcast:
Episode 81: It Feels Good to Be a D-List Internet Superstar
Aug 29, 2016 @ 09:53:19

The /Dev/Hell podcast, hosted by PHP community members Ed Finkler and Chris Hartjes, has posted their latest episode - Episode #81: It Feels Good to Be a D-List Internet Superstar.

This time around Chris and Ed attempt to shame you with their D-lister activities and ability to purchase things they want but don’t need.

We cover PyOhio, the long-anticipated php|cruise, and some useful gadgets they’ve incorporated into their work flows.

You can listen to their latest episode either through the in-page audio player or by downloading the mp3 of the show directly. If you enjoy the show, be sure to follow their feed for more information about when future episodes are released.

tagged: devhell podcast ep81 chrishartjes edfinkler internet superstar dlist pyohio phpcruise

Link: http://devhell.info/post/2016-08-28/it-feels-good-to-be-a-d-list-internet-superstar/

Community News:
Latest PEAR Releases (08.29.2016)
Aug 29, 2016 @ 08:05:02

Latest PEAR Releases:

tagged:

Link: