2014年6月30日星期一

Community News: Latest PEAR Releases for 06.30.2014

Latest PEAR Releases:

Community News: Packagist Latest Releases for 06.30.2014

Recent releases from the Packagist:

PHP Town Hall: Episode 27: Josh Lockhart and Jeremy Mikola


The PHP Town Hall podcast is back with their latest episode, number 27, featuring two special guests: Jeremy Mikola and Josh Lockhart.



This episode is a long one, but we are back to improved audio and the video is not just one dude eating pizza for an hour. Josh Lockhart of PHP The Right Way and Slim fame, and Jeremy Mikola who is well known for banging on about clouds and playing magic the gathering. Oh, he also works for MongoDB.


The episode's discussion includes a wide range of topics (and plenty of rambling) about things like plans for Slim 3, Silex vs Slim, PHP The Right Way, Illuminate/Pagination and difficulties around pull requests. You can listen to this latest episode either through the in-page player, by downloading the mp3 or you can watch the video of the live Google Hangout recording.


Link: http://phptownhall.com//blog/2014/06/29/episode-27-foo/

/Dev/Hell Podcast: Episode 47: NOT the BEES


The latest episode of the /Dev/Hell podcast hosts Chris Hartjes and Ed Finkler are joined by Eryn O'Neil for Episode #47.



This time around we are blessed by the presence of Eryn O'Neil, Tech Lead at Clockwork. We talk about the importance of UX for programmers, getting started speaking at conferences, and BEES BEES BEES BEES BEES [...] BEES BEES.


Topics this time around include Imposter syndrome, Eryn's talk You Can UX Too: Avoiding the Programmer's Interface, Web Form Design: Filling in the Blanks, Africanized honey bees and http://beesbeesbees.com. You can listen to this latest episode either through the in-page player or by downloading the mp3. If you like what you hear, consider subscribing to their feed.


Link: http://devhell.info/post/2014-06-27/not-the-bees/

SitePoint PHP Blog: How to Install PHP Extensions from Source


PHP extensions (from PECL) can be very handy when you need them. Unfortunately, not all distributions come with packages that will install them for you...this is where compiling comes in. On the SitePoint PHP blog Bruno Skvorc has posted a guide to compiling extensions from source to help you get started.



Sometimes it's hard to know which PHP extensions you'll need before you install PHP. In cases where you need to add extensions later on, you might get lucky and the extension could be in the repository of the OS you're using. [...] What if there's no such thing for other extensions, though? In this tutorial, we'll go through installing some custom extensions on Linux systems (and OS X - the process is nearly identical).


He uses a Laravel Homestead instance as a platform for his example and shows the compilation of the MongoDB for PHP driver. He walks you through the process of booting up the VM and getting the environment/required packages installed. He then shows the process for the installation of two different kinds of PHP extensions: internal and third-party. Finally he shows you how to update your configuration, load in the compiled extension and test it (in this case looking at the phpinfo() to ensure it's loaded).



    Link: http://www.sitepoint.com/install-php-extensions-source/

2014年6月29日星期日

Community News: Packagist Latest Releases for 06.29.2014

Recent releases from the Packagist:

2014年6月28日星期六

Community News: Packagist Latest Releases for 06.28.2014

Recent releases from the Packagist:

2014年6月27日星期五

Site News: Popular Posts for the Week of 06.27.2014

Popular posts from PHPDeveloper.org for the past week:

Community News: Packagist Latest Releases for 06.27.2014

Recent releases from the Packagist:

PHP.net: PHP 5.4.30 & 5.5.14 Released


PHP.net has posted two new release announcements today, one for PHP 5.4.30 and the other for PHP 5.5.14.



For the PHP 5.4.30 release:



The PHP development team announces the immediate availability of PHP 5.4.30. Over 20 bugs were fixed in this release, including the following security issues: CVE-2014-3981, CVE-2014-0207, CVE-2014-3478, CVE-2014-3479, CVE-2014-3480, CVE-2014-3487, CVE-2014-4049, CVE-2014-3515. All PHP 5.4 users are encouraged to upgrade to this version. Please, note that this release also fixes a backward compatibility issue that has been detected in the PHP 5.4.29 release.


For the PHP 5.5.14 release:



The PHP Development Team announces the immediate availability of PHP 5.5.14. This release fixes several bugs against PHP 5.5.13. Also, this release fixes a total of 8 CVEs, half of them concerning the FileInfo extension. All PHP users are encouraged to upgrade to this new version. Please, note that this release also fixes a backward compatibility issue that has been detected in the PHP 5.5.13 release.


As always you can download these latest releases from the main downloads page (or here for Windows users) and see the complete list of changes in the Changelog.


Link: http://www.php.net/archive/2014.php#id2014-06-26-1

Master Zend Framework: Change Layout in Controllers and Actions in Zend Framework 2


Matthew Setter has a new post to his Master Zend Framework site today showing you how to change layouts in controllers and actions for a Zend Framework v2 based application.



In Zend Framework 2, if you want to change the layout just for one action or for every action in a controller, how do you do it? How do you do it without overriding the layout for every action throughout the entire application? In today's post, based on an excerpt from Zend Framework 2 for Beginners, we see how to achieve both of these requirements.


He talks about the framework's use of the two-step view pattern and what the "template_map" definition usually looks like in a default ZF2 application. He shows three different ways to do the view switching from the controller or action:



  • Override the default layout in your module
  • Override the layout per/action
  • Override the layout per/controller


Each of these comes with a bit of code showing you how to make it work. They move from simplest to more complex, with the layout per controller being the most complex. It's not that it's difficult, it's just that there's more involved to make it work. You can either do it at the controller level or at the module level.


Link: http://www.masterzendframework.com/views/change-layout-controllers-actions-zend-framework-2

PHPClasses.org: Lately in PHP Podcast #48 - To TDD or Not TDD?


On the PHPClasses.org site today Manuel Lemos has released the latest episode in their "Lately in PHP" podcast series: Episode #48 - To TDD or Not TDD?.



Lately the debate about whether you should use TDD or not in all software projects all the time has been very intense. [...] They also talked about the upcoming end of life release of PHP 5.3, getting information of parameter type hinting with reflection, using object methods on native data types, security problems of OAuth implementations, and the built-in support of Composer to access password protected repositories.


You can listen to this latest episode either through the in-page audio player, by downloading the mp3 or you can watch the live recording over on the PHPClasses YouTube playlist. A transcription of the recording is also provided as well as links to some of the topics mentioned.


Link: http://www.phpclasses.org/blog/post/239-To-TDD-or-Not-TDD--Lately-in-PHP-podcast-episode-48.html

SitePoint PHP Blog: Stress-test your PHP App with ApacheBench


In this recent post to the SitePoint PHP blog Bruno Skvorc looks at using a popular tool from the Apache project, Apache Bench (or just "ab") to stress-test your application.



There's no telling when your app might attract a throng of visitors at once. [...] Regardless of the reason, massive influxes of visitors are a double-edged sword: they get you what you always wanted - a chance to prove your worth to a large chunk of the internet's population - but also often bring with them what you always feared: absolute downtime. [Some] platforms usually offer plugins that can optimize your application while it's up, so you can fine tune it as you go along, but why not try and predict issues while still developing locally and save yourself time, money and effort in the long run?


He bases the testing off of a Laravel Homestead virtual machine instance and tests a simple "hello world" PHP page to minimize any overhead from other processing. He includes the commands to make a simple ab request and mentions the kinds of request it provides on completion. He moves on from there to something a bit more complex - an actual Laravel-based application using the default "HomeController" and "showWelcome" action/view combination.


Link: http://www.sitepoint.com/stress-test-php-app-apachebench/

NetTuts.com: Refactoring Legacy Code: Part 6 - Attacking Complex Methods


The NetTuts.com site has posted the sixth part in their "Refactoring Legacy Code" series, this time with a focus on the more complex methods. They look at simplifying their contents and testing their various parts (better code coverage). The post is based completely on the contents of the previous five in the series, so if you haven't read up on those do that before starting.



In our previous five lessons we invested quite a lot of time in understanding our legacy system, in writing tests for whatever testable piece of code we could find. We reached a point to where we have quite a few tested methods but we still avoided the complex, hard to understand logic. It's now time for some serious coding.


The start with one of the more complex methods (roll) and work through it line-by-line to figure out what it's being given, how it's handling the data and what kinds of things it might return or modify inside. The break it down into to "parts" and figure out the right tests to write for each. With the method fully tested, they then start in on the refactor, teasing out various parts of the method into other methods and property changes. There's also a section at the end talking about pair programming and how it relates to good testing practices.


Link: http://code.tutsplus.com/tutorials/refactoring-legacy-code-part-6-attacking-complex-methods--cms-21522

2014年6月26日星期四

Site News: Blast from the Past - One Year Ago in PHP

Here's what was popular in the PHP community one year ago today:

Community News: Packagist Latest Releases for 06.26.2014

Recent releases from the Packagist: