2013年11月6日星期三

Community News: Latest Releases from PHPClasses.org

Community News: Packagist Latest Releases for 11.06.2013

Recent releases from the Packagist:

Timoh's Blog: Secure random numbers for PHP developers


Timoh has posted a look at random number generation to his site, focusing on one of the many methods to produce truly random number - using /dev/(u)random (available on Unix-based filesystems).



How would you gather cryptographically secure random bytes in your PHP application? This is actually quite a good question. It used to be, and seems, it still is not that uncommon to just simply call mt_rand() function to get the job done creating user's "initial password", for example. A bit more experienced reader will notice there is a security bug. [...] But actually only a few [functions to get random values] can be recommended for security sensitive purposes. And now I'm not talking about openssl_random_pseudo_bytes().


He starts with a look at openssl_random_pseudo_bytes and why there might be something wrong with its use - mainly that OpenSSL has had its own share of security issues in the past. Of the two random resources he recommends /dev/urandom as it's less blocking and more useful for web applications. He recommends the RandomCompat library if you need to take this random data and transform it into integers (with one caveat).


Link: http://timoh6.github.io/2013/11/05/Secure-random-numbers-for-PHP-developers.html

PHPMaster.com: Mapping with Geocoder PHP and Leaflet.js


On PHPMaster.com a new tutorial has been posted showing how to combine Geocoder PHP with Leaflet.js to create interactive maps. The Leaflet.js library lets you easily create mobile-friendly maps with simplicity and usability in mind.



Interactive maps inside a web application have a lot of great uses. From visualizing data to highlighting points of interest, maps are expected to communicate ideas within the context of location easily. The hardest part, however, is converting that data into coordinates that the map can understand. Luckily, Geocoder PHP allows us to connect to different geo-coding providers. Combined with Leaflet.js, a simple Javascript library, creating maps is a breeze.


He starts by helping you get the Geocoder library installed via Composer and make a sample page (using Bootstrap and jQuery) with a container for the map. He helps you set up Geocoder with an adapter to connect to the service of your choice (like Google Maps, Bing Maps or Openstreatmap). With this configured and created, he inputs some sample data and coverts the addresses to latitude/longitude sets. He walks you through getting Leaflte.js added to the page and pulling in these results via individual generated Javascript variables. You can check out a demo of the end result to see how it all fits together too.


Link: http://www.sitepoint.com/mapping-geocoder-php-leaflet-js/

The Nerdery: Is my code compatible with PHP 5.4 or 5.5?


On The Nerdery's blog today there's a new post that shows you a way to help test your code for PHP 5.4 and 5.5 - via PHP_CodeSniffer - as well as mentioning some of the changes that came with these versions.



Do you want to know if your code is compatible with that latest version of PHP? Do you need to upgrade your existing PHP website to a newer version of PHP? Do you want to see if your legacy PHP code is using any features that have been removed or deprecated in later versions of PHP? [...] ou need to migrate your existing code to ensure nothing will break when the upgrade occurs. How can you accomplish that?


They start with the list of differences (and backward incompatible changes) in the newer versions and point to the migration pages for each. Then they get into the use of PHP_CodeSniffer and some additional rules provided by Win Godden for checking the compatibility. With these added in, you can call the "phpcs" checking tool with the "PHPCompatibility" standard and check out the results. An example of what you might see on an older application is included in the post.


Link: http://blog.nerdery.com/2013/11/code-compatible-php-5-4-5-5/

2013年11月5日星期二

Community News: Latest PECL Releases for 11.05.2013

Latest PECL Releases:
  • zmq 1.1.0
    - Device related fixes and improvements:
    * Added setTimerCallback to set a timer function
    * Added getIdleTimeout/getTimerTimeout


  • zmq 1.1.1
    - Missing zmq_clock.c from the archive


  • riak 0.8.0
    - Riak 1.4+ feature: CRDT counters implemented


  • xmldiff 0.9.1
    - Fixed libxml behavior change after diff/merge
    - Fixed DOM compatibility for PHP 5.3.6 and below (Remi Collet)


  • Judy 1.0.2
    - Bug fix with count/size, see https://github.com/orieg/php-judy/issues/15
    - Add missing test files in package.xml


  • riak 0.7.0
    - Riak 1.4+ feature: secondary index paging implemented


Community News: phpDay 2014 Call for Papers Opened


The phpDay conference has officially announce their Call for Papers and are now accepting submissions for their 2014 event.



Please fill in your Call for Paper for the 2014 edition of the phpDay. We will contact you a couple of week after the Call for Paper ends (28/02/2014). We strongly encourage new speakers and new topics. Remember that phpDay is an international conference, so we prefer English session proposals.


They're looking for three different kinds of talks - regular (30 minute) sessions, 45 minute extended sessions and 90 minute workshops. The 2014 edition of the phpDay conference will be held May 16th and 17th in Verona, Italy.


Link: https://docs.google.com/a/phpdeveloper.org/spreadsheet/viewform?usp=drive_web&formkey=dG5GOUs1WW1zNWtHZXpIRTB2QjhEWmc6MA#gid=0