PHPDeveloper.org

Community News: Packagist Latest Releases for 09.19.2014

Fri, 09/19/2014 - 14:09
Recent releases from the Packagist:

PHP.net: PHP 5.5.17 is available

Thu, 09/18/2014 - 18:27

The PHP development group has just released the latest in the PHP 5.5.x series today - PHP 5.5.17.

The PHP development team announces the immediate availability of PHP 5.5.17. Several bugs were fixed in this release. All PHP 5.5 users are encouraged to upgrade to this version.

Bugs fixed include updates in the core language, the COM extension, GD image handling, OpenSSL functionality and the SPL. You can download this latest release (source) from the main downloads page or Windows users can use windows.php.net. You can get the full list of changes and the bugs they relate to in the latest Changelog.

Link: http://php.net/archive/2014.php#id2014-09-18-1

Matthew Weier O'Phinney: Deployment with Zend Server (Part 8 of 8)

Thu, 09/18/2014 - 17:20

Matthew Weier O'Phinney has posted the last part of his "Deployment with Zend Server" series with part eight. This part focuses on some hints around the actual deployment and automation.

This is the final in a series of eight posts detailing tips on deploying to Zend Server. The previous post in the series detailed using the Zend Server SDK to deploy your Zend Server deployment packages (ZPKs) from the command line. Today, I'll detail how I automate deployment with zf-deploy and zs-client (the Zend Server SDK), and wrap up the series with some closing thoughts.

He quickly summarizes the previous parts of the series as individual steps and wonders if there's a better way than doing each of them manually. He shows exactly this with the automation handling that zf-deploy and zs-client offer combined with a make script defining steps for the deploy, ZPK update and a cleanup/Composer update task.

Link: https://mwop.net/blog/2014-09-18-zend-server-deployment-part-8.html

Voices of the ElePHPant: Interview with Sara Golemon

Thu, 09/18/2014 - 16:55

The Voices of the ElePHPant podcast has posted its latest episode, another interview with a PHP community member. This time they talk with Sara Golemon, a developer at Facebook that works on HHVM and Hack.

They talk about some of the current work being done with the HHVM and Hack projects, including parity with normal PHP and performance changes. They also talk some about Sara's favorite feature the team has worked on (xhp) and where the idea for it came from. Cal also has Sara define Hack and describe what it can and can't do.

You can listen to this latest episode either through the in-page player or by downloading the mp3 directly. If you enjoy the interview be sure to subscribe to their feed to get the latest episodes as they're released.

Link: http://voicesoftheelephpant.com/2014/09/16/interview-with-sara-golemon

Ben Ramsey: Learning a New Codebase

Thu, 09/18/2014 - 15:38

In a new post to his site Ben Ramsey shares a few suggestions around things to ask and do to learn a new codebase (whether that means in a new job or coming into a new open source project).

A few days ago, my friend Ed Finkler started a new job. Earlier this week, he posted on Twitter: "First days humble us all." Having begun a new job myself, I shared Ed's sentiment. Last weekend, while at the Madison PHP Conference, we were discussing what developers can do during the interview process to get an idea of the kind of codebase a company has.

He includes a few questions for developers to ask, either during the interview or once hired, about the codebase itself including:

  • what coding standards the company follows
  • how much of the code is covered by tests
  • have the company's deployment process described

He also recommends learning the codebase by diving in and either writing tests for untested areas or work through bug reports and fix (then test) them.

Link: http://benramsey.com/blog/2014/09/learning-a-new-codebase/

Community News: Packagist Latest Releases for 09.18.2014

Thu, 09/18/2014 - 14:09
Recent releases from the Packagist:

Symfony Blog: Thelia, a Symfony-based e-commerce solution

Wed, 09/17/2014 - 17:16

On the Symfony blog today they've posted an interview with Manuel Raynaud, the lead developer on the Thelia project. Thelia is a Symfony-based e-commerce solution that is free to download and use (and can easily be installed via Composer).

An interview with Manuel Raynaud, lead developer of Thelia, a Symfony-based e-commerce solution. Introducing the new Thelia 2 and how it's in perfect harmony with Symfony.

The interview starts with a brief introduction of Manuel and a quick overview of what the Thelia project is about and the current state of things. They get into some of the story behind Thelia and what parts of Symfony (components) it uses behind the scenes. They finish out the interview talking about some of the advantages the project offers and challenges they've faced along the way. There's also a bit about how Thelia is involved in the Symfony events and community.

Link: http://symfony.com/blog/thelia-a-symfony-based-e-commerce-solution

Matthew Weier O'Phinney: Deployment with Zend Server (Part 7 of 8)

Wed, 09/17/2014 - 16:44

Matthew Weier O'Phinney has posted his next-to-last article in his "Deployment with Zend Server" series, part seven of eight concerning the "zs-client" tool.

This is the seventh in a series of eight posts detailing tips on deploying to Zend Server. The previous post in the series detailed setting up and clearing page caching. Today, I'm sharing how to use the Zend Server SDK to deploy your Zend Server deployment packages (ZPKs) from the command line.

Zs-client is a handy tool that lets you interact directly with the Zend Server API is a more programatic way without having to worry about the request signing process. He walks you through a sample use of the tool and shows how to add a target application and use the tool to get its current status. He also includes a basic command that lets you run an automatic update on the application.

Link: https://mwop.net/blog/2014-09-16-zend-server-deployment-part-7.html

Three Devs & A Maybe Podcast: YARP (Yet Another Ramble Podcast)

Wed, 09/17/2014 - 15:01

The Three Devs & A Maybe podcast has posted their latest episode today, another "ramblecast" of the hosts Michael Budd, Fraser Hart, Lewis Cains and Edd Mann talking about a wide range of topics. This is episode #43.

Being without a guest this episode, gave us the excuse to ramble on about many different topics that have been on our minds for the past couple of weeks.

Topics included in the ramble are things like:

  • WebSockets
  • the Gulp workflow
  • Active Record vs Data Mapper
  • Test Driven Development
  • the recent Apple keynote

You can listen to this latest episode either through their in page audio player or you can download the mp3 for listening at your leisure. If you enjoy the episode, be sure to subscribe to their feed to get this and other great episodes as they're released.

Link: http://threedevsandamaybe.com/yarp-yet-another-ramble-podcast/

Community News: Packagist Latest Releases for 09.17.2014

Wed, 09/17/2014 - 14:08
Recent releases from the Packagist:

Community News: Recent posts from PHP Quickfix

Wed, 09/17/2014 - 13:04
Recent posts from the PHP Quickfix site:

Evert Pot: Accessing protected properties from objects that share the same ancestry.

Tue, 09/16/2014 - 17:19

In his latest post Evert Pot shows an interesting side effect of working with two objects from the same class: accessing protected properties from one instance to the other.

I realized something odd about accessing protected properties the other day. It's possible in PHP to access protected properties from other objects, as long as they are from the same class. [...] I always thought that protected strictly allows objects to access things from the current inheritence tree, but didn't realize that this also extends to other instances of the same object.

He includes a bit of sample code showing two object instances each being able to access the protected "val" property from the other. He also shows an example of how it works in two different objects, both that derive from a common ancestor. He shares a few other code examples showing this relationship and points out a few places where it could come in handy.

Link: http://evertpot.com/properted-properties-from-shared-ancestry/

SitePoint PHP Blog: Create a Movie Recommendation App with Prediction.io - Implementation

Tue, 09/16/2014 - 16:54

The SitePoint PHP blog continues their series about creating a movie prediction engine with Prediction.io in this second part focusing on implementation. In the first part of the series they set up the server and configuration to make the jump into the code. This second part gets more into the application side and features working code linking the prediction engine with the TheMovieDB API.

He jumps right into the code, showing how to:

  • Fetch the data from the TMDB (via Flight and Guzzle)
  • Populate the data back into the Prediction.io database
  • Picking a random movie from the list (and outputting it to a page)
  • Get movies the engine predicts as recommendations

The recommendations are based on ratings on other movies in the database with most of that logic happening behind the scenes instead of in the PHP script. The results are then output to the page along with the other movie data.

Link: http://www.sitepoint.com/create-movie-recommendation-app-prediction-io-implementation/

Rob Allen: Sending attachments in multipart emails with ZendMail

Tue, 09/16/2014 - 15:18

Rob Allen has a new post today showing you how to use the ZendMail component of the Zend Framework 2 to send attachments with multipart emails. A multipart email allows you to combine both the HTML and plain text versions of the content into a single email.

I've written before about how to send an HTML email with a text alternative in ZendMail, but recently needed to send an attachment with my multipart email. With help from various sources on the Internet, this is how to do it.

He includes the full code for the example first: a "sendEmail" function that sets up the MIME and plain-text parts and uses the "MimeMessage" and "MimePart" objects to attach the file. He goes through each of the parts of the script and describes what's happening and how that changes the content of the email. You can find out more about the ZendMail component in this section on the Zend Framework manual.

Link: http://akrabat.com/zend-framework-2/sending-attachments-in-multipart-emails-with-zendmail/

Community News: Packagist Latest Releases for 09.16.2014

Tue, 09/16/2014 - 14:08
Recent releases from the Packagist:

Community News: Latest PECL Releases for 09.16.2014

Tue, 09/16/2014 - 13:03
Latest PECL Releases:
  • pthreads 2.0.8 resolve bugs in static class members resolve bug in property table write failure causing fault introduce Collectable convenience class for Pools get deep copying of functions working add message to termination info make consistent isset/empty behaviour on Threaded objects add Threaded::extend voodoo method solve system memory leaks in windows introduce object cache, saving on allocation for access to all members fix crash when class has legacy ctor fix fault in ::chunk fix fault in fpm fix overflow in ::wait various other stability improvements

  • termbox 0.1.1 build fixes; arginfo

  • termbox 0.1.0 initial release

  • xmp 4.2.0 - Initial release

  • phdfs 0.1.1 - Fix package

  • phdfs 0.1.2 - Modify the config.W32

  • phdfs 0.1.0 First release

  • pecl_http 2.1.1 * Fix httpVersion retrieval on bigendian (Remi) * Fix etag/crc32b on bigendian (Remi)

  • swoole 1.7.5 - Added swoole_client->sendfile() - Added swoole_table - Remove onMasterConnect/onMasterClose - Added pipe output buffer - TCP short connection have 50% performance improvement

Peter Aba: phpmetrics of popular php projects

Mon, 09/15/2014 - 16:11

Peter Aba has put together a a set of visualizations around the popularity of various PHP projects using the phpmetrics tool. He decided to run it against several projects he knows of and share the results.

I came across a new tool called phpmetrics. It can be used for, what a surprise, calculating and displaying metrics for php. I fell in love with this cute little tool in an instance and decided to run it on some php projects that I consider important. I'm aware of the fact that the list is currently far from complete, but it's probably still worth a look. I especially love the "maintenability" (sic!) reports, I find those big red spots just as disgusting as I find ugly code the same.

He's broken it up into a few different sections with lots of different projects under each:

  • Frameworks
  • CMS
  • E-commerce
  • Development tools

There's also an "Other" (and "Backfire") category that contains the results for the results of phpmetrics itself. He also includes a few issues he ran across during the processing of the metrics, some with the phpmetrics tool itself and some with the libraries themselves.

Link: https://peteraba.com/blog/phpmetrics-of-popular-projects/

SitePoint PHP Blog: Create a Movie Recommendation App with Prediction.io - Setup

Mon, 09/15/2014 - 15:47

On the SitePoint PHP blog today Wern Ancheta has posted the first part of a series about creating a recommendation engine with the help of PHP and a system called Prediction IO.

In this tutorial, I'm going to walk you through Prediction IO, an open-source machine learning server. It allows you to create applications that could do the following: recommend items (e.g. movies, products, food), predict user behavior, identify item similarity and rank items. You can pretty much build any machine learning application with ease using Prediction IO. You don't have to deal with numbers and algorithms and you can just concentrate on building the app itself.

He walks you through the download and install of the Prediction IO software, how to start up the server and how to access its web interface. He shows you how to create an "engine" that will be used to make the recommendations and some of the settings allowing you to tailor it to your needs. The script will hook into The Movie DB API for content. He starts in on the PHP packages that will be needed to make the API connection and recommendations, but the actual code will come in a later article.

Link: http://www.sitepoint.com/create-movie-recommendation-app-prediction-io-setup/