2013年11月4日星期一

Community News: Latest PEAR Releases for 11.04.2013

Latest PEAR Releases:

Rob Allen: Setting up PHP & MySQL on OS X Mavericks


For those that have made the switch to OSX Mavericks and are wondering how to get PHP and MySQL into a working state, Rob Allen has posted a quick guide to getting it all set up.



With OS X 10.9 Mavericks, Apple chose to ship PHP 5.4.17. This is how to set it up from a clean install of Mavericks. Note: If you don't want to use the built-in PHP or want to use version 5.5, then these are [other] alternatives: a binary package from Liip, Zend Server and a Homebrew install.


He provides all the commands you'll need to get things up and running including checking file/directory permissions, installing MySQL and using the command line to work with Apache (no more "Web Sharing"). He also includes the configuration changes to be made to the php.ini including how to enable Xdebug. There's lots of other good things included in the guide as well like setting up Composer, PHPUnit and how to compile a few handy extensions.


Link: http://akrabat.com/computing/setting-up-php-mysql-on-os-x-mavericks/

Davey Shafik: Keynoting at ZendCon Europe


Davey Shafik has a new post about doing the closing keynote at this year's ZendCon Europe conference (happening November 18th through 20th in Paris, France).



In a little under three weeks I will be giving the closing keynote at ZendCon Europe. This will my first keynote and I'm excited to be talking about The Evolution of DevOps.


His talk will cover how the DevOps role has come into its own over the past few years and what kinds of changes to expect, as a developer, in the upcoming years. If you'd like to hear this and lots of other great talks, there's still time to pick up your tickets for either just the conference or for both the conference and tutorials. You can even opt to take the Zend certification while you're at the event.


Link: http://daveyshafik.com/archives/68854-keynoting-at-zendcon-europe.html

Chris Jones: DTracing a PHPUnit Test: Looking at Functional Programming


On his Oracle blog Chris Jones has shared more details about using DTrace for dynamic tracing of the execution of your application. In this new post he looks more specifically at using it to trace through a PHPUnit test for a functional programming example.



I was reading the article Functional Programming in PHP by Patkos Csaba and wondering how efficient this type of programming is. I thought this would be a good time to fire up DTrace and see what is going on. Since DTrace is "always available" even in production machines (once PHP is compiled with --enable-dtrace), this was easy to do.


Using the code provided from the other post he sets things up to run some sample tests via PHPUnit. He makes a simple DTrace D script to configure a tracer to watch for "function entry" and "function exit" during execution, outputting the function tree each time when the given function is found (via a parameter). He includes both the command to run the test with the trace and an example of the output result.


Link: https://blogs.oracle.com/opal/entry/dtracing_a_phpunit_test_looking

2013年11月1日星期五

Site News: Popular Posts for the Week of 11.01.2013

Popular posts from PHPDeveloper.org for the past week:

Community News: Packagist Latest Releases for 11.01.2013

Recent releases from the Packagist:

Lee Davis: Is a HTTP DELETE request idempotent?


Lee Davis has a new post to his site with some thoughts about RESTful APIS and the correct response to DELETE calls when a resource has already been removed. One camp says a 404 should be thrown as it's no longer there, the other says 204 a "No Content" should always be returned. Lee looks at both sides of the argument and shares some of his own thoughts too.



Recently I had a read of an interesting post by Lukas Smith (@lsmith) about the use of the DELETE method when building RESTful services. I wanted to get my thoughts down on this. Mostly to help myself, but if it helps you determine a better approach, then great. I'm nowhere near qualified enough to preach, so this is by no means a "you should do it this way / my way is correct post", just food for thought. Besides, there are probably more questions here than answers.


He talks about the idea of "idempotence" when it comes to REST APIs and how it relates back to the DELETE discussion. He points out that the term has more to do with the end result of the request and not so much about how it's handled (and any "side effects" that may come with it). Various checks on the resource in question - like "does it exist" - could be considered a side effect of its operation. In his opinion, though, the 200 series of responses are more appropriate when a resource is actually deleted.


Link: http://www.duckheads.co.uk/is-a-http-delete-requests-idempotent/491