Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Symfony Blog:
New in Symfony: Reproducible builds
Feb 14, 2018 @ 11:16:52

On the Symfony project blog there's an announcement posted about changes in the framework to allow for reproducible builds.

Reproducible builds are a set of software development practices that create "a verifiable path from human readable source code to the binary code used by computers". In other words, if you don't change the source code, the compilation result should always be exactly the same.

Explained more simply in the case of Symfony: if you build the container and warm up the cache of the same unchanged application multiple times, the result should always be the same.

The post talks about the idea of "reproducible builds" and how they should be "completely deterministic" where the end result is always the same (no random data, no auto-generates date/times). A few changes were required to the framework to ensure these builds were possible. The post lists out these updates and links to the bug reports for each.

tagged: symfony project framework reproducible builds

Link: http://symfony.com/blog/new-in-symfony-reproducible-builds

Symfony Blog:
New Core Team Member, Security Team Leader
Jan 29, 2018 @ 11:25:03

On the Symfony blog the project has made an announcement about a new addition to the Symfony team to help handle security issues around the framework: Michael Cullum

Handling security issues responsibly and transparently is key to the success of any Open-Source project. Symfony is no exception. We documented the process of our security management policy a long time ago.

[...] Today, I'm very happy and proud to announce that we are getting to the next level. Michael Cullum accepted to join the Symfony Core Team to lead the security team. He will be responsible for managing the security process.

Michael is the secretary of the PHP-FIG group, represents the PHPBB project and is a heavy user of the Symfony framework. Having Michael on the team means that there will be a central point of contact and someone whose primary role is ensuring the safety and security of the overall project and framework.

tagged: core security team member michaelcullum symfony project framework

Link: http://symfony.com/blog/new-core-team-member-security-team-leader

ZFort.com:
The Mexican Standoff of PHP Frameworks
Jan 26, 2018 @ 12:24:09

On the ZFort.com blog there's a new post that talks about the "Mexican standoff" between PHP frameworks, covering some of the background behind some of the more popular ones and some of the main differences between them.

PHP is one of the most widely known and potent programming languages used today. However, despite the popularity of PHP, there are many businesses using PHP without making use of a quality PHP framework. This approach slows production time and increases costs. A PHP framework is advantageous because it provides you with modules and codebase to help structure and accelerate the web development process.

[...] For CEOs, CTOs, product owners and those in the tech industry, choosing the right PHP framework can help cut production time and costs. However, every PHP framework is unique. [...] Given the wealth of PHP frameworks available, it is important to conduct solid research in order to find the platform that’s right for you. [We'll] take a look at three of the most popular PHP frameworks (Symfony, Laravel and Yii) and break down which is the best, and why.

The article then goes on to cover three of the more widely used frameworks:

  • Symfony
  • Laravel
  • Yii Framework

For each the author covers some of the origins of the framework and some of the things that it's best at. Following these there's a section that briefly compares them and how approachable they are for developers new to frameworks. While they all have their strengths the author recommends Symfony as the framework with "the most long term potential" over the others.

tagged: framework comparison symfony laravel yii opinion

Link: https://www.zfort.com/blog/php-frameworks-standoff/

Zen of Coding:
PHP MVC Frameworks Preview of 2018 (Phalcon 3, Symfony 4, Laravel 5.x and Others)
Jan 05, 2018 @ 13:58:48

On the Zen of Coding site they've posted a look forward at versions of several popular frameworks coming in 2018. Their list includes Phalcon 3, Symfony 4 and Laravel 5.x.

It’s that time of the year again, when we take a look at the world of PHP MVC frameworks. We get ready for the trends of 2018 and plan our roadmaps. Also, we’ll take a quick detour to look at some seagues in the areas beyond PHP MVC.

Web development changes year over year, if not faster. MVC has been a revolutionary paradigm for modern web apps. It helped millions of developers build awesome applications and launch exciting startups.

The post includes a Google Trends chart showing the popularity of searches for various frameworks with Laravel, Symfony and CodeIgniter taking the top three spots overall. It then starts with a high level view of some of the recent changes and trends in several of the frameworks, moving into more detail for each (and some of "the rest" including CakePHP, Zend Framework and Yii. It then discusses microservices, how they relate to MVC and the continuing importance of backend functionality.

tagged: laravel symfony phalcon 2018 preview framework microservices mvc

Link: http://www.zenofcoding.com/2017/12/31/php-mvc-frameworks-preview-of-2018-phalcon-3-symfony-4-laravel-5-x-and-others/

Nwanze Franklin:
Deep dive into middlewares in Laravel
Dec 14, 2017 @ 12:46:48

Nwanze Franklin has posted a tutorial to the Dev.to site sharing a deep dive into middlewares in Laravel. Middleware is a powerful tool that can allow you to work with the request and response objects in your application in a more reproducible and contained manner.

What is a Laravel middleware? It is a feature in Laravel which provides a mechanism for filtering HTTP requests entering your application. This allows you to hook into Laravel request processing work flow to perform some kind of logic that decides how your application works.

What would you use middleware for? Protecting your routes, setting headers on HTTP responses, logging requests to your application, sanitizing incoming parameters, enable site-wide maintenance mode [and] manipulating responses generated by your application.

The tutorial then starts in on the code, showing how to create a custom middleware and the code that's generated by the artisan command. It covers the differences between global and route middleware, how to register a middleware and assigning it to a route. It ends with a look at using parameters in middleware and how to access them from the controller.

tagged: middleware laravel tutorial introduction framework route global

Link: https://dev.to/franko4don/deep-dive-into-middlewares-in-laravel-doo

JoliCode Blog:
How to properly manage translations in Symfony?
Dec 14, 2017 @ 10:13:31

The JoliCode site has posted a tutorial for the Symfony users out there sharing their method for properly managing translations when using the framework.

We already wrote about our Symfony translation workflow some years ago. But since 2015, lots of things have evolved and it was time to update this workflow.

The aim stays the same, keeping app translation simple and fluent for all stakeholders of the project. To achieve this, we had chosen an external tool: Loco, which centralizes translation data, and a piece of code written to synchronize it with Symfony translation files.

The article talks about the two main methods (bundles) used in the Symfony ecosystem to manage translations but they couldn't connect them with their chosen tool (Loco). The tutorial then shows how they moved to using the php-translation bundle and how to use the Loco UI to manage the keys connected to it. It also covers the use in testing, migrating to production and what's currently missing from Loco they'd like to see.

tagged: manage translation symfony framework tutorial loco bundle

Link: https://jolicode.com/blog/how-to-properly-manage-translations-in-symfony

Fabien Potencier:
Symfony 4: Performance out of the Box
Dec 12, 2017 @ 13:48:07

In a quick post to his site Fabien Potencier (of Sensio Labs and the Symfony framework) has a post sharing some information around the performance of Symfony 4 and what kind of speed you can expect in your applications based on it.

Performance is an interesting and sensitive topic. Suffice to say that most projects should not care too much; modern PHP frameworks are fast enough for most use cases and projects. And PHP 7 performance improvements help a lot as well. But people like to compare frameworks, and I guess performance is one way to do so.

What about Symfony 4? During its development cycle, we did some nice performance optimizations: mainly to improve the router and container speed. But several non-related changes in Symfony 4 also help with performance... Your mileage may vary depending on your specific project of course.

He talks about some of the testing and evaluation that's already been done on "Hello world" script performance but points out that this isn't a very real world situation. He shares these metrics, however, to at least give a baseline to compare it against previous Symfony versions. The post also links to another resource that shares these and other benchmarks related to various PHP projects.

tagged: symfony4 performance symfony framework version benchmark

Link: http://fabien.potencier.org/symfony4-performance.html

FormaPro Blog:
Yii PHP Framework has adopted AMQP Interop.
Dec 06, 2017 @ 09:20:16

On the FormaPro blog Maskim has written up a tutorial introducing you to a new feature that's been integrated into the Yii2 framework: AMPQ Interop, a standard structure for the handling of MQ messages (queuing).

Great News! Queue Interop is one step closer to PHP world domination.

Yii PHP Framework is the first of major frameworks that has placed a bet on AMQP Interop. A corresponding pull request “Add AMQP interop based driver.” has been merged to yiisoft/yii2-queue repository.

With this integration, the Yii framework now natively supports many AMPQ packages without having to create a custom interface layer. This includes enqueue/amqp-lib, enqueue/amqp-ext and enqueue/amqp-bunny.

tagged: formapro yii framework adoption ampq interoperability structure

Link: https://blog.forma-pro.com/yii-php-framework-has-adopted-amqp-interop-85ab47c9869f

Jerzy Zawadzki:
Symfony 4: New Hope
Dec 04, 2017 @ 11:16:56

In a new article to his Medium.com site Jerzy Zawadzki talks about why he things that Symfony 4 is "the new hope" for the framework. In the article he goes through the updates in their major version including code examples, commands and descriptions on each.

On November 30, 2017 new version of Symfony Framework has been released and it looks like core team followed the Star Wars numbering pattern, as 4th version is much better, leaving previous three behind as they look like ‘prequels’ now.

In this article, I will try to sum up all important changes made in Symfony 4, so if you are familiar with Symfony 3 and want to get known with new version? - ?this article is for YOU!

He talks about the changes in developer experience that come along with version 4 and updates to the installation process to make it even simpler. He lists out the packages that are installed in this new version and what's included by default. He then walks through the addition of other packages and tools, pulled in as custom options. Finally he talks about bundles, their use in Symfony 4 and the changes in how applications are structured based on their use.

tagged: symfony symfony4 changes framework version release feature

Link: https://medium.com/@zawadzki.jerzy/symfony-4-new-hope-dbf99dde91d8

Symfony Blog:
Symfony 4.0.0 released
Dec 01, 2017 @ 10:05:57

On the Symfony blog they've posted the official announcement about the release of Symfony 4.0.0, the latest major version of the popular framework.

Symfony 4.0.0 has just been released. [...] Read the Hello Symfony 4! blog post for a quick overview of the best new features of Symfony 4 and the best way to upgrade your existing applications to Symfony 4.

The post includes a listing of the items fixed since the previous version and links to an upgrade guide that can help you bring your apps up and working in this latest version.

tagged: symfony framework v4 release announcement

Link: http://symfony.com/blog/symfony-4-0-0-released