2013年10月31日星期四

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 10.31.2013

Recent releases from the Packagist:

Manuel Stosic: Understanding Zend Framework 3...before it's out!


Manuel Stosic has a new post today talking about the upcoming Zend Framework v3 (not "coming soon", but coming) and three places you can follow to keep up on the latest in this version as it develops.



ZF3 is not close around the corner. It's still many, many months ahead. But there are reasons why you should bother and get information about ZF3 as soon as possible. If you understand why changes are introduced - and most of them are explained, some will be explained at a later point i guess - then you can spot errors in todays code already! You can improve your current code by knowing what's going to be "in" a couple of months away.


The three resources he points to are the Google Moderator group for ideas around the framework, issues on the Github repository tagged for ZF3 and a series of planned Google Hangouts where core developers will talk about the work on this new version and answer questions from those watching.


Link: http://samminds.com/2013/10/understanding-zend-framework-3-before-its-out/

Zumba Engineering Blog: Incorporating Mongounit into Multi-datasource Models with Traits


On the Zubma Engineering blog today Chris Saylor has written up a tutorial showing how they used traits to use multiple data sources with Mongounit, working around the single source limitations it enforces.



A while back we open sourced Mongounit, a PHPUnit extension for testing models utilizing mongodb. One key issue that we've discovered as we incorporate MongoDB into more of our data models is that extending Mongounit's TestCase class limits that unit test towards Mongo only as the datasource. Since only a portion of our data is in Mongo while the remaining is in MySQL, limiting a test case to work with one datasource or another is too limiting.


They tried two other solutions first, separating out the tests by data source and manually clear the Mongo data in the tests, but both ran into problems. Instead, they opted to use traits to provide drop-in Mongo testing support as needed. It provides a simple interface to set up and tear down the needed Mongo resources - an example of which is also provided in the post. The code for the trait can be found on Github.


Link: http://engineering.zumba.com/2013/10/30/multiple-data-sources-phpunit-testing/

Hasin Hayder: Installing gearmand, libgearman & pecl gearman for php from source in Debian 6 & 7


Hasin Hayder has posted a complete guide to getting Gearman and PHP playing nicely together. The guide gives you a step by step (and command by command) list to follow so you don't have the same pains he did trying to get it working.



I had a pretty rough evening today. No, not because the waiter forgot to add sugar in my tea, but because it was so boring to go through the trial and errors of installing gearman daemon and pecl gearman extension for php.


He walks though the whole process, starting with the failures, that he took getting it installed. Unfortunately it wasn't just as easy as installing a package and using PECL to drop in the extension. There was other software packages that needed to be installed as well and were a bit harder to figure out - libboost, gperf, libevent, uuid-dev and libcloog-ppl-dev. With these installed, the PECL install command was finally able to build and he got the shared module he needed.


Link: http://hasin.me/2013/10/30/installing-gearmand-libgearman-and-pecl-gearman-from-source/

/Dev/Hell Podcast: Episode 36: Maybe PHP Isn't as Lame as We Thought


The /Dev/Hell podcast, hosted by PHP community members Chris Hartjes and Ed Finkler, has released its latest episode - Episode 36, "Maybe PHP Isn't as Lame as We Thought".



So our pace is a little slower due to work crap, but DEV HELL LIVES. Episode 6d6 kicks off with us waxing about what's exciting in PHP development nowadays. We also talk about upcoming appearances at TrueNorth PHP, NomadPHP and SkiPHP. Then we get into the discussion of alcohol consumption at tech conferences, and malware on the PHP.net site.


You can listen to this latest episode either through the in-page player, by downloading the mp3 or by following their feed in your reader of choice.


Link: http://devhell.info/post/2013-10-29/maybe-php-isnt-as-lame-as-we-thought/

2013年10月30日星期三

Community News: Latest Releases from PHPClasses.org