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

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

Joey Masip Romeu:
Namespaces and organizing business logic services in Symfony
Dec 08, 2017 @ 11:04:35

In a post on his Medium site Joey Masip Romeu shares some suggestions about how you can organize your business logic in a Symfony application with some simple namespacing and service definitions.

I want to talk about namespacing services in Symfony, specifically Symfony3.

These are exciting times, Symfony 4 is just round the corner?— -coming out on November 30th? - ?so this blog post might be irrelevant soon! Nevertheless, concepts are still the same so let´s get into it!

He offers three "rules" that he and his team at SlowCode have defined to help with their own organization:

  • using a folder for logic services
  • using a folder for the domain name
  • using . for folder separation and _ for word separation

Code and configuration examples are provided for each suggestion helping to illustrate the point. He ends the post mentioning public and private services and how they're changing in upcoming Symfony releases.

tagged: namespace organize business logic symfony rule domain

Link: https://medium.com/@joeymasip/namespaces-and-organizing-business-logic-services-in-symfony-d80452adc4f7

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 Finland:
Adding a GraphQL API to your Symfony Flex application
Dec 01, 2017 @ 11:49:05

On the Symfony Finland site there's a new post sharing a tutorial showing how to add a GraphQL API to your application with the help of the overblog/graphql-bundle bundle.

I've been using GraphQL for some API thingamajigs, and it's been working fine. Now with Symfony 4 out, I figured a write-up on how to use GraphQL with Symfony Flex could be useful for someone.

We'll expand on a previous demo app that I built. That app already uses Doctrine ORM as storage, so let's bridge that to a GraphQL API.

He starts by linking to "a quick read" about GraphQL for those not familiar and listing out the basic structure of the application he'll build out. Next comes the installation of the bundle and a debug bundle to help make it easier to locate errors. He then updates the application configuration to add routes and define the schema for the objects in the system. Using the GUI that comes with the debug package, he shows how to access the API and how to create a "resolver" that will relay the information back to the client from the GraphQL API request.

tagged: symfony graphql api symfonyflex tutorial bundle debug gui

Link: https://symfony.fi/entry/adding-a-graphql-api-to-your-symfony-flex-app

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

Symfony Blog:
The Diversity Initiative
Nov 30, 2017 @ 12:05:22

On the Symfony blog the project has posted an announcement about a new effort to help make the Symfony community even better - the Diversity Initiative.

I like to say that docs are more important than code in a tech project. Docs are a challenge for any project as developers like to write code, not docs. But the real success of a project is best measured by its community: the people working on/with the project. Without people, code is nothing.

[...] What's the biggest challenge for Symfony as a community? Diversity. Through the years, we've made some baby steps. [...] But we can do better. Much better. That's not enough.

The post talks about some of the efforts that have been made so far to help increase the diversity of the members of the Symfony community and ensure everyone has a voice. In an effort to help drive a larger adoption of the ideals and processes around the effort, they've named Lukas Kahwe Smith as a community leader for the diversity initiative and a mention of some of the work he's already doing to improve things.

tagged: diversity initiative symfony community lukassmith

Link: https://symfony.com/blog/the-diversity-initiative

Symfony Finland:
Four things I like about Symfony 4
Nov 28, 2017 @ 12:17:36

On the Symfony Finland site they've posted a new article covering the four things they like about Symfony 4, the next major version of the popular PHP framework.

Symfony 4 launches on November 30th 2017, some two years after the previous major release that was Symfony 3. Symfony 3 can be thought of as a stabilization release with code cleanup, some new functionality and housekeeping Standard Edition (AKA Full Stack Framework).

In the latest incarnation, there are more significant changes, especially to the framework and some key components. Let's take a look at four features that address frustrations that I've had in the past.

The four features in the list are:

  • Simplified project structure
  • Easier installation of extensions
  • Dependency Injection improvements
  • Symfony Encore for asset management

Each section comes with a description of the update and links to other resources where you can find out more information about them. The post wraps up with an overall look at this new version (and Symfony Flex) and how they can improve a Symfony developer's life in the future.

tagged: symfony symfony4 symfonyflex top4 opinion

Link: https://symfony.fi/entry/four-things-i-like-about-symfony-4

Fabien Potencier:
Symfony Flex Private Repositories
Nov 27, 2017 @ 11:45:25

Fabien Potencier has a new post to his site covering the addition of support for private repositories to the features Symfony Flex provides.

Many Flex early adopters asked for it. The Symfony Flex server now supports private recipes repositories as announced during my keynote at SymfonyCon Cluj.

Creating a repository for your private recipes is easy. Create a regular Github repository (probably a private one) to store the recipes. The directory structure is the same as for the official Flex recipes repositories. Then, register the repository as a recipes repository. Done.

The private repositories will behave just like the other public ones in your application. You can also use them to override aliases. There are a few differences between public and private, however, like auto-merge not being supported.

tagged: symfony symfonyflex private repository support addition

Link: http://fabien.potencier.org/symfony4-flex-private-repositories.html

Fabien Potencier:
Symfony 4: An Update on Flex
Nov 21, 2017 @ 10:01:46

In a new post to his site Fabien Potencier has posted an update about Symfony 4/Flex and what can be expected from this upcoming release.

Symfony 4 is just around the corner. And Symfony Flex is one of the main selling point for the upgrade. Developers love the new philosophy. And a lot of changes happened since my last blog post. Let me recap the recent changes that you might not be aware of. Most of these changes were prompted by feedback from early adopters.

Included in his list are things like the easier use of recepie contributions, Makefile support changes and minimum PHP version requirements. He also links to an upgrade tutorial and a best practices guide to help you get your application and its code prepared for this new release.

tagged: symfony symfony4 flex update project changes

Link: http://fabien.potencier.org/symfony4-flex-update.html

Symfony Finland:
State of GraphQL PHP libraries and Symfony integrations in 2017
Nov 15, 2017 @ 11:16:39

On the Symfony Finland site, there's a post that looks at the current state of GraphQL PHP libraries in 2017 and how they are integrated with applications using the Symfony framework.

GraphQL has continued to gain momentum over the course of 2017. While it's certainly not a replacement for REST in all cases, it does provide consumers of Content APIs, etc. better ergonomics than general purpose RESTful interfaces. For PHP there are currently two popular libraries, both of which have Symfony integration Bundles.

The post starts by talking about implementing GraphQL functionality in your own application and mentions the two main libraries currently used: Webonyx GraphQL PHP and Youshido GraphQL. It goes on to talk about the integrations both of these provide as bundles and a bit about what each has to offer. The post then wraps up with a look forward to the Symfony Flex support they provide and a few links to other resources about GraphQL and its use in Symfony applications.

tagged: symfony framework graphql library bundle webonyx yushido

Link: https://symfony.fi/entry/state-of-graphql-php-libraries-and-symfony-integrations-in-2017