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

Why you should learn Symfony in 2017
Jul 18, 2017 @ 12:39:09

On the Hackermoon site there's a new post from developer advocate Mickaƫl Andrieu sharing a few reasons why he thinks you should learn Symfony in 2017 if you haven't already.

In 2011, when I started my studies in computer sciences I learned the PHP using symfony 1.3, and I realized my very first student project on the beta of Symfony 2. At the time, we were moving from a fully integrated full stack framework with a back office provided to a framework that followed what was found in the Java community: besides, many components of Symfony2 were strongly inspired by JEE.

PHP 5.3 had just come out and with it the ability to start designing object-oriented correctly. [...] Large Open Source projects have started to migrate on Symfony components: if it was not first, SensioLabs has talked a lot about Drupal8 because it is one of the biggest CMS on the market. EzPublish, PHPBB, PrestaShop and many others followed, some with a full stack framework approach and others by incorporating only a few software bricks.

He then talks about the "vibrant and mature ecosystem", listing some of the packages that use Symfony components. He also looks forward to the next major iteration of the framework: Symfony Flex. He ends with his reasoning why you should learn Symfony if you haven't worked with it (or at least how it handles common things like requests and services).

tagged: learn symfony framework ecosystem future symfonyflex opinion

Link: https://hackernoon.com/why-you-should-learn-symfony-in-2017-e0cf564f0b21

Fabien Potencier:
Symfony 4: Directory Structure Updates
Jul 05, 2017 @ 10:06:21

Fabien Potencier has a quick post to his site that may be of interests to the Symfony developers out there related to directory updates coming in Symfony 4:

After a long discussion in the community, the directory structure has been slightly changed.

etc/ was renamed to config/, and web/ to public/. My blog posts about Symfony 4 have just been updated to reflect these changes.

He also includes instructions about how, if you're already running a Symfony Flex application, you can make these changes manually including updating the Flex version.

tagged: symfony symfonyflex directory update project discussion

Link: http://fabien.potencier.org/symfony4-directory-structure-updates.html

Symfony Finland:
Porting a Symfony 3 application to Flex
Jun 26, 2017 @ 11:42:12

On the Symfony Finland site they've posted a retrospective about moving an application from Symfony 3 to Flex including the work that was done in the switch and the performance of the result.

Earlier this year I did some experimenting with a Hybrid state object between Symfony Twig templates and front end JavaScript frameworks. Since that time I did that experiment, the Symfony Flex project has progressed. I thought I would try how to port the state prototype to Symfony Flex.

[...] In my case the application was rather simple and all built in the AppBundle, which is best-practise in Symfony3 for many applications. I mostly had to move files and configurations around and change namespaces.

He starts by spending some time talking about the difference between a Symfony 3 environment and the environment Flex provides. He then goes through the eight or so steps to move from one to the other including file/directory changes and configuration updates. Next comes the look at performance differences between the two. Unsurprisingly Flex came out on top in every measurement he threw at it.

In addition to the new structure, the apparent improvement in performance is obviously welcome. This would likely be even more evident where I could leave more dependencies out, for example in API workloads. This obviously won't magically push Symfony/PHP into Golang or Node.js territory for raw API throughput, but for existing large code bases it could provide a low-effort boost.
tagged: symfony symfony3 symfonyflex migration performance benchmark process tutorial

Link: https://symfony.fi/entry/porting-a-symfony-3-application-to-flex

Fabien Potencier:
Symfony 4: Contributing Recipes
Apr 19, 2017 @ 10:23:34

Fabien Potencier has posted another in his series of tutorials looking at the next major release of the Symfony framework - Symfony v4. In this series he's covered some of the changes that will be coming in this release and what you can do to prepare. In this latest post he looks at the idea of "recipes" and how you can contribute them back to the project

Symfony Flex is not Open-Sourced yet, but I can already feel the excitement in the community. [...] You know, that "one more feature" that will make Symfony Flex the next killer application for the Symfony community.

People are worried about the opinionated recipe repository. Keep in mind that one of the main goals of Symfony Flex is to automate your day-to-day workflow for the happy path.

He reassures those reading the post that a package doesn't need a recipe to be installed and the "opinions" that the main repository uses around packages. He also talks about another recipe configuration option not mentioned previously: aliases. These allow for shortened versions of the Composer installation commands that are easier to remember than the full package name. He covers a bit about how it works in Flex and the process it follows behind the scenes when installing the package.

tagged: symfony4 symfony contribute recipe framework symfonyflex

Link: http://fabien.potencier.org/symfony4-contributing-recipes.html

Fabien Potencier:
Symfony 4: Automate your Workflow
Apr 13, 2017 @ 10:33:24

Fabien Potencier has continued his series looking at Symfony 4 with a new post to his site today. This time he focuses on workflow automation and removing some of the daily application management tasks.

Symfony 4's most "innovative" feature is the way it drives the day-to-day application management. No more tedious copy/paste from README files. No more boilerplate code. Automation to the max. On a curated list of Composer packages.

He starts the post talking about Symfony Flex (the main engine behind Symfony 4) and how it can help with package management and installation/integration. He uses the sensiolabs/security-checker package as an example, showing how Flex understands the package and knows to run the checks on future composer install commands. He then digs into other areas Flex helps with:

  • bundles
  • configuration
  • environment variables
  • makefile tasks
  • Composer scripts

...and a few others. Examples are provided for each of the sections in the composer.json configuration and the post finishes with an example of the full configuration file, putting everything together.

tagged: symfony4 automation workflow integration installation symfonyflex framework

Link: http://fabien.potencier.org/symfony4-workflow-automation.html