2014年1月2日星期四

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 01.02.2014

Recent releases from the Packagist:

Rob Allen: Implementing a ZF2 development mode


Rob Allen has shared a method he's found for implementing a Zend Framework v2 in development mode, more specifically for an Apigility installation.



One feature that piqued my interested in the Apigility skeleton application was development mode. [...] Behind the scenes, this [call to public/index.php] runs an action in DevelopmentModeController which copies config/development.config.php.dist to config/development.config.php. Then there is some code in public/index.php that ensures that this file is loaded.


You can then have a ModuleManager instance specifically for the development version and configuration. This allows for a greater amount of customization and removes some requirements you might have had in production. He's also created a module that handles some of this for you automatically you can drop into your installation.


Link: http://akrabat.com/computing/implementing-a-zf2-development-mode/

SitePoint PHP Blog: Nginx, PHP5.5 and Phalcon on OpenShift


On the SitePoint PHP blog today Bruno Skvorc goes through the full installation process around getting Nginx and Phalcon up and running on an OpenShift instance.



In this tutorial, adapted from the step by step trial and error procedure of duythien, and with his full blessing, we'll cover the installation procedure of Phaclon on yet another environment: OpenShift. The procedure is bloody - OpenShift does not make it easy for us to deploy custom environments - but the rewards are well worth it.


As he mentioned, it's not the easiest process, but he's laid it all out there to help make it simple for you. He's broken it up into a number of different steps:



  • Setting up your OpenShift account (using the free tier)
  • Creating and cloning an application
  • Cloning a helper repo with a ".openshift" file included
  • Grabbing the latest Phalcon and making the config file to set it up correctly
  • Configuring Nginx

Link: http://www.sitepoint.com/nginx-php5-5-phalcon-openshift

Reddit.com: Attempting to understand Namespacing, and its benefits


If you're relatively new to PHP, you may have read about something called "namespacing" but not fully understood it or the benefits it provides. Over on Reddit, there's a recent discussion where the poster asks about just that:



As I understand it, Namespacing provides a lot of useful context for developers, as well as making the autoloading of classes much easier (though I've never personally tried this). I can also see it being used in a large enough application where it might help keep things in scope, but this seems like a bit of a stretch to me. Apart from that, I'm not too clear on what namespacing actually does.


The comments to the thread including things like links to other resources and other suggestions like:



  • tools to try out
  • places to start using it in your own code
  • the difference between underscores and real namespacing
  • how they help avoid conflicts in naming and functionality

Link: http://www.reddit.com/r/PHP/comments/1u1ztr/attempting_to_understand_namespacing_and_its

2014年1月1日星期三

Community News: Latest Releases from PHPClasses.org

Community News: Packagist Latest Releases for 01.01.2014

Recent releases from the Packagist: