2013年10月30日星期三

Community News: Latest Releases from PHPClasses.org

Community News: Packagist Latest Releases for 10.30.2013

Recent releases from the Packagist:

Matthias Noback: Symfony2: Some things I don't like about Bundles


Matthias Noback has shared a few things he doesn't like about Symfony bundles, the drop-in components that easy extend Symfony-based applications.



This article could have been titled "Ten things I hate about bundles", but that would be too harsh. The things I am going to describe, are not things I hate, but things I don't like. Besides, when I count them, I don't come to ten things...

Instead of ten, there's five things on his list of "hates" about bundles and their handling:



  • Bundle extension discovery
  • Naming conventions
  • Registering service container extensions yourself
  • Naming conventions, part two
  • Duplicate knowledge: the extension alias


For each section there's an explanation and sample code where needed to illustrate the point.


Link: http://php-and-symfony.matthiasnoback.nl/2013/10/symfony2-some-things-i-dont-like-about-bundles/

Scott Arciszewski: Using scrypt in PHP-based Websites


Scott Arciszewski has posted a new tutorial to his site helping you get scrypt installed as an alternative to some of the other cryptographic functionality that's already supported by PHP (like bcrypt).



Most newbie PHP developers suck at developing user authentication systems. When not storing passwords in plaintext, they just wing it with a simple hash function and hope it's good enough. Instead of md5(), sha1(), or hash(), you should consider using scrypt, pbkdf2, or bcrypt. Today, I'll go through the steps required to start using scrypt in your web applications.


He walks you through the exact steps you'll need to get scrypt installed and working happily with PHP (provided you have root on the machine). Thankfully, it's pretty easy thanks to the scrypt extensionupdated version of a scrypt wrapper you can use in your applications.


Link: https://s.arciszewski.me/blog/2013/10/php-scrypt-setup

Qandidate.com: Debugging PHP applications with HHVM


On the Qandidate.com blog there's a new post showing you an easy way to debug HHVM applications via the built-in debugging tool and it's command line interface. The HHVM is the virtual machine version of the HipHop compiler Facebook created to speed up PHP execution.



In the previous parts of this series we got you started with HHVM and showed how we could get the symfony standard edition running on HHVM. This time we will dive deeper into HHVM by using it to debug our application. For most people the easiest way of debugging a PHP application is to place var_dump() and die() statements all over the code. Another option is installing xdebug, which has gotten a lot easier nowadays due to IDE integrations.


To illustrate, they create a super simple PHP script and show how to start up the HHVM in debug mode. They introduce you to the commands you'll need to step through the script execution and locate the breakpoints where errors are happening. You can do things like print out the current values of variables, set conditional breakpoints and get a stack trace for the execution so far.


Link: http://labs.qandidate.com/blog/2013/10/29/debugging-php-applications-with-hhvm/

2013年10月29日星期二

Community News: Latest PECL Releases for 10.29.2013

Latest PECL Releases:
  • timezonedb 2013.8
    Updated to version 2013.8 (2013h)


  • riak 0.6.2
    - Fixed potential bug in map reduce function
    - Restructured extension sources so php FQN can be mapped directly to source.
    - Changed get output from array to collection, which implements ArrayAccess so it maintains compatability


  • zmq 1.0.9
    - Windows build related fixes


  • zmq 1.0.7
    - Added optional listener socket to ZMQDevice
    - Added support for ZeroMQ 4.x


  • zmq 1.0.8
    - Added config.w32 for Windows builds
    - Removed unused variables and dead code (remicollet)
    - Package tests with the release (remicollet)


  • timezonedb 2013.7
    Updated to version 2013.7 (2013g)


  • lua 1.1.0
    - Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com)
    - Trigger E_STRICT when pass an array with index '0' to lua instead of ignoring it
    - added support for callable functions and closures as values returned injected into lua engine (harald at octris dot org)


  • zip 1.12.2
    - fix build with PHP 5.3
    - add --with-libzip configure option to use system libzip
    - move check before dereferencing ptr (Felipe)
    - add LICENSE and LICENSE_libzip
    - fix bug #64342 ZipArchive::addFile() has to check file existance


Community News: Packagist Latest Releases for 10.29.2013

Recent releases from the Packagist: