The digest of interesting news and materials from the world of PHP for the last two weeks, No. 18 (05.22.2013 - 03.06.2013)
We bring to your attention another collection with links to news and materials.
Enjoy reading! ')
News and Releases
Laravel 4 released - Laravel 4 tutorials started to appear more than six months ago, which means that the framework was really waiting. Finally, you can contemplate the result of more than a year of work. For those who are not familiar with the framework, but would like to take a look at it, the updated site has a quick start and see the screencast for a more detailed review. By the way, let me remind you about the excellent and constantly updated base of screencasts on Laravel 4 - Laracasts . Well, for active users of the framework there is a wonderful resource laravel.io , which accumulates all the news and materials on Laravel.
Meet Stack - Igor Wiedler, who is already known as the author of React and the Silex microframe, this time described an agreement regulating the way of integrating middleware components into some layer between a web server and a PHP (Symfony) application. This idea was inspired by the author Rack - a solution from the Ruby-world.
PHP 5.5.0RC2 is available - So, the second and possibly the latest release candidate of the new version of PHP. The next release is expected on June 6th and it is possible that this will be the final version.
Php
PHP usage statistics - The post author reviews several statistical studies ( w3tech , TIOBE ) and tries to interpret the information received. In particular, the author believes that any professional developer should at least be familiar with PHP, as with the most popular web programming language.
PHP Decorators , The implementation of the extension - In this case decorators are not a design pattern, but python style decorators. The author has implemented a PHP extension, which adds the ability to use such decorators in PHP. In the second post describes the details of the implementation of the expansion. The post will be very useful to those who decide to take up writing their own expansion.
The simplest example of generators in PHP - PHP 5.5 will be released very soon, with a new feature added - generators. In the post a simple example and recommendations on the use of generators. More information on the generator can be found in the manual .
(int) ((0.1 + 0.7) * 10) - If you doubt the result of the indicated expression, then this post is for you. The author writes about the representation of real numbers in memory, and shows why all the same result 7.
Study materials
Development in numbers - A great report from Anthony Ferrara. Very often, we hear people talking about how to write good code. But how can you objectively evaluate how good the code is and whether it needs refactoring? How to analyze the existing code without spending weeks on reading? Answers can be given by tools such as pDepend and PHPLOC . But the results they produce may not be easy to understand and interpret. In his report, Anthony just examines the available tools for analyzing the quality of the code, gives theoretical information about the metrics used, demonstrates application on real projects like Drupal. In addition, it shows how to integrate metrics counting into the development process to improve the quality of the applications you create. Slides (PDF) .
Queues using RabbitMQ and PHP , 2 , 3 - A good tutorial in three parts on using the RabbitMQ platform. In the first part, general information and overview of opportunities, in the second and third directly about the creation and use of queues c examples in PHP.
Asynchronous MySQL queries in HipHop PHP - A small but useful post, which also deals with the implementation of the queue, but this time with the help of the built-in HipHop XBox messaging server.
We compose music with the help of PHP - An interesting post in which the author shows how you can generate a not entirely random sequence of notes. For this purpose, it is proposed to use the Markov chains mechanism and training on some data set. That is, having a sequence of notes from “good” compositions, one can calculate the probabilities of one note following another, and construct new melodies on the basis of the data obtained.
Battle of the Titans: Zend vs. Symfony - A small overview comparison of frameworks. It would be interesting to conduct a full comparison of titans ZF2 and Symfony 2.
How to create a PHP user group - An interview with the leader of a PHP user group in Leeds, in which he shares the experience of creating a group, talks about the difficulties he has encountered and gives advice for those who are just about to create a user group.
Acceptance testing using Selenium and PHPUnit - An excellent tutorial on using Selenium, in which the author also shows how tests created on Selenium can be exported to PHPUnit tests. Attached screencasts to every step.
Full test coverage is impractical - Writing tests is a rather “expensive” operation, so the author calls not to write tests for everything in a row, but to test only really important cases and ignore the obvious points. Focus on creating a flawless product.
C for PHP - Due to the popularity of frameworks like Phalcon, the topic of writing extensions for PHP has really become interesting. The author of the post collected in one place links to resources and articles on this topic, for which he thanks.
PHP in the clouds - A small introductory tutorial on the use of cloud hosting AppFog , which by the way was previously called PHPFog.
Symfony2 on Windows Azure - The author of a post implemented a bundle that allows you to transparently deploy Symfony2 applications to the cloud platform from Microsoft.
Why in our business we chose Symfony2, and not another PHP framework - The author lists the features of Symfony 2 that made this particular framework choose for solving problems. The author also notes that the listed opportunities are primarily important for business, and only then for developers.
Virtualize your stack with Vagrant and Puppet - A good screencast of how and why Vagrant and Puppet should be used to virtualize your desktop environment. At the end of the screencast, an excellent online configuration generator for Vagrant - PuPHPet is also mentioned , which over the past two weeks has gained support for Nginx, PostgreSQL and xhprof.
Zend Framework 2 - HTML5 form elements - A simple tutorial that deals with HTML5 form elements: phone input field, email field, URL field and date / time selection element, which support was recently implemented in ZF2
10 steps to quickly track and fix bugs in PHP - Article with recommendations for finding and fixing bugs. And although some of the tips are beaten and very banal, but this is the kind of information that will not be superfluous to read again.
Optimum parallelization of unit tests or 17,000 tests in 4 minutes - Excellent habrapost with a detailed analysis of the task of organizing parallel execution of unit tests. The solution described uses TeamCity, but the authors promise to soon make the project open and provide support for other systems.
We work with AngularJS and Silex - A good tutorial on using Silex as a REST backend for AngularJS. A small screencast is also attached to the post.
Materials from past conferences
Video from DrupalCon 2013 - Video recordings of more than 100 reports from the recently held 5-day conference in Portland. Most, of course, are somehow dedicated to Drupal, but there are reports on general topics.
Slides with Symfony Live 2013 - Symfony Live 2013 conference was held in conjunction with DrupalCon in Portland. While video recordings of reports are being prepared, you can look at slides.
Slides from HotCode and Yii-Meetup - A large-scale HotCode conference was held in Kiev, at which PHP was presented: Improving the quality of PHP codeCooking yii right . In addition, a meeting of Yii developers took place in Kiev: Yii2: Overview public preview . By the end of the summer, we should expect the second full-fledged conference YiiConf.
Slides from phpDay 2013 - Following the link, slides 14 reports from a conference held in Italy.