
The digest of interesting news and materials from the world of PHP for the last two weeks No. 8 (12/29/2012 - 01/11/2013)

New Year's holidays are approaching the finish line, and we are back in service with a fresh batch of news and materials from the world of PHP.
Enjoy reading!
News and Releases
- Adopted PSR-3 - Adopted a standard governing a single log presentation interface for PHP applications. Some personal thoughts and criticism on the topic.
- Yii 1.1.13 - Right before the New Year, a fresh version of the framework saw the light. The release did not bring drastic changes, but, nevertheless, the list of changes includes about 70 improvements and more than 50 fixes. The full list can be found here .
- 10th issue of Web & PHP magazine - The following topics are revealed in the issue: 5 deadly sins of a programmer; Indexing in databases; 10 facts about social media for business; other.
- Codeception 1.5 - Major release is a great tool for testing, which includes several interesting features. One of which is code coverage reporting. In addition, the new Redis and MongoDb modules, UX improvements and many bug fixes.
- Symfony 2.2 Beta 1 - The first Symfony beta under version 2.2 was also released. The beta release marks the end of the development phase, that is, no new features will be added with the exception of support for PSR-3 and the addition of several non-adjoining pool requests. The final release should be expected by the end of February. You can read more about new features here , here and here .
Php
- We get rid of duplication of end-to-end code in PHP: refactoring code with AOP
- An excellent hubrapost in which the author considers the problems of duplication of end-to-end code. He gives classical ways to solve these problems in the OOP style, while pointing out the pros and cons of each approach. After that, detailed examples of solving typical problems (logging and caching) by refactoring code in an aspect style using the Go! Library are given . Aop .
- Multitasking in PHP - Video recording of an excellent presentation, which reveals the topic of multitasking in PHP for solving typical tasks, such as batch processing of data or creating daemons. The author talks about the basic concepts of multitasking systems: compares processes and threads, forking, race conditions, semaphores and mutexes.
- 2012: Year in PHP - In the last issue, we reviewed the most significant events in the world of PHP in 2012. A similar review was made by the author of the post, in addition to events, highlighting also the development directions that have been identified for the year. The author also makes assumptions regarding the current year of 2013, predicting an improvement in the field of DiC and more active use of BDD using PHPSpec and Behat. Also a small discussion with interesting assumptions for 2013 for PHP is available on reddit.
- PHP applications and PaaS - In a post, the author briefly considers three major, in his opinion, providers of PaaS solutions for PHP on the market, namely Engine Yard / Orchestra, PagodaBox and AppFog. The latter interested the author more than the others, and he spoke in more detail about the registration process, creating and configuring the application on it.
Learning Materials
- We create a search engine in PHP - A good 5-part post on creating your own search engine in pure PHP. The source code for the result is available on GitHub .
- My first script for solving captcha
- Between lunch breaks, Russian Post intrigues honest developers in the form of additional means of protection. In a post, the author talks about his personal experience of recognizing captcha in PHP.
- What's New in Laravel 4 - The question of when will version 4 be released is probably one of the most frequently asked questions about Laravel. And, unfortunately, there is no concrete answer at the moment - it will come out when it is ready. In its current form, the stage in which the framework is located can be described as something between pre-beta and beta. But you can feel the upcoming release now. And in a post, the author talks about some of the new features and improvements of Laravel 4.
- Why do some PHP developers like static APIs? - There are 10 types of developers: those who are madly in love with static methods because they are easy to use, and those who believe that they were invented by the devil himself in order to experience devotion to proper programming. In the article, the author shares his experience and explains why some developers ignore best practices and use too many static methods.
- Programming with Anthony - Dependency injection - Continuation of a series of training videos from Maestro Anthony Ferrara. This time we will talk about Dependency Injection. The entire series is available here .
- Using SSH and SFTP in PHP - A detailed tutorial on working with SSH and SFTP in PHP applications using the ssh2 library . Examples are attached.
- Composer and Versions - A short post about using the excellent PHP dependency management tool, in which the author gives recommendations on the correct specification of versions and branches.
- You need tests ... only it's too early - In a post, the author reflects on the need for code testing. And if you are still working on the implementation of the details and find out whether it is possible to get the desired result, then perhaps there is no need to test, which, however, is obvious.
- Thoughts on the directory structure - In his note, the author says that the standard directory structure in ZF2, which can be observed everywhere, is just a recommendation. You should not go about this approach if it is obvious that a different structure is better for your task. The author gives an example and recommendations for changing the directory structure.
- Caching Doctrine Entities Using Couchbase - A detailed tutorial in which the author, in fact, shows how to use Couchbase as a cache for Doctrine entities.
- We use several PDO connections to the database in Symfony2 through the DIC - “A small note in which the author first demonstrates the usual way to configure several connections to the database in the“ parameters.yml “file. After that, the author demonstrates a more advanced approach by configuring the connections in a separate file and creating the Db class, which allows you to get fully configured and ready-to-use PDO objects from the container.
- 13 things that users hate in the documentation of your open source project - Almost every programmer has code that he would like to share or is already sharing with the community. However, how much this code will be useful to other developers, largely depends on the quality of the documentation. The article contains errors that developers most often make when documenting their own work.
- Why is FastCGI with Nginx so much faster than Apache with mod_php? - In his post, the author makes several tests on the “hello world” application and tries to understand why Nginx is faster than Apache. His research showed that processing of .htaccess files was a significant blow to Apache's performance, and disabling it (AllowOverride None) changed the situation and Apache overtook Nginx.
- Twitter clone in PHP , 2 - A couple of tutorials that detail how to create a full Twitter clone from scratch. Demo and full code are also available.
- It was in the evening, echo “there was nothing” - In previous issues of the digest there were links to experiments in which authors write a PHP script without using numeric and alphabetic characters. This time we have a habrapost with the continuation of experiments and a description of the PHP function without the use of the characters a-zA-Z0-9 <> ?.
Link to the previous issue.
Material prepared by dbritan , nesttor and pronskiy