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

Paul Jones:
Atlas ORM Integration with Symfony
Jul 31, 2018 @ 12:16:26

Paul Jones has a quick post covering the use of his Atlas.Orm package in a Symfony application, showing how to easily integrate the two.

Are you using Symfony 4? Do you want to use Atlas with it? We now have a Symfony bundle and Flex recipe that makes installation and integration a breeze. Two commands and one .env file edit, and you’re ready to go.

He includes the commands you'll need to get it installed and generate the skeleton mapper files from your database. Symfony then automatically injects the Atlas instance from the container (code example included). He ends the post linking to other resources about defining relationships, managing transactions and handling events with the Atlas.Orm package.

tagged: atlasorm integration symfony flex bundle package tutorial

Link: http://paul-m-jones.com/archives/6916

SitePoint PHP Blog:
Building an Image Gallery Blog with Symfony Flex (Parts 1 & 2)
Jun 21, 2018 @ 11:48:56

On the SitePoint PHP blog they've kicked off a series by Zoran Antolovic walking through the creation of a blog application using the latest from the Symfony project - Symfony Flex.

Our journey towards a stable, robust, high-performance web app will start with the simple but functional application — the so-called minimum viable product (MVP). We’ll populate the database with random content, do some benchmarks and improve performance incrementally. Every article in this series will be a checkpoint on our journey!

This article will cover the basics of setting up the project and organizing files for our Symfony Flex project. I’ll also show you some tips, tricks and helper scripts I’m using for speeding up the development.

So far they've posted the first two articles of the series:

  • Part one explaining some of the basics of Flex and getting the application set up (including some sample fixture data)
  • Part two showing how to populate the application with more realistic data, run some basic performance tests and create a first unit test

There's much more to come in the series including the creation of file (image) upload handling, user registration and login and the creation of image galleries from uploads.

tagged: image gallery blog tutorial symfonyflex symfony flex part1 part2

Link: https://www.sitepoint.com/building-image-gallery-blog-symfony-flex-setup/

Symfony Blog:
The end of the Symfony Standard Edition
Jan 10, 2018 @ 11:54:34

On the Symfony blog there's a post with a major announcement for the users of the framework - the end of the Symfony Standard Edition, a release version that tried to bundle in the common tools a developer might need.

When I started to work on Symfony 2 many moons ago, I decided to create a set of decoupled components instead of a monolith framework like symfony 1. This choice was probably one of the key reasons of the immediate success of Symfony 2. [...] Of course, people don't want to assemble the components themselves when starting a new project. To fill the gap, we created the Flex was born. [...] Thanks to the new Flex approach, we've decided to not provide the Symfony Standard Edition for Symfony 4.0.

In the post Fabien talks about some of the history behind the Standard Edition including why it was made and what problems it solved. He then points out that, with the introduction of Flex, many of the issues and flexibility the SE lacked are worked out. While it is a little more complex to get started with a Flex application, the unpacking functionality helps with bringing in bundles of packages related packages without having to require each individually.

tagged: symfony standard edition endoflife end community flex symfony4

Link: https://symfony.com/blog/the-end-of-the-symfony-standard-edition

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

SitePoint PHP Blog:
Symfony Flex: Paving the Path to a Faster, Better Symfony
Oct 19, 2017 @ 13:16:52

On the SitePoint PHP Blog, there's a tutorial posted from editor Bruno Skvorc giving an introduction to Symfony Flex and how it is "paving the way" to a more performant future for Symfony.

Symfony Flex is a modern replacement for the Symfony Installer and not the name of the next Symfony version.

Internally, Symfony Flex is a Composer plugin that modifies the behavior of the require and update commands. When installing or updating dependencies in a Flex-enabled application, Symfony can perform tasks before and after the execution of Composer tasks.

The new Symfony will be called just Symfony 4, and while this tutorial will deal only with the Flex tool, it will mention some Symfony 4 upgrades as well.

The tutorial starts with some of the basics about Flex including its current development status and what kinds of things have changed from previous Symfony setups. It then walks you through the creation of a new Flex application including the bootstrapping of the application and the setup and use of application bundles.

tagged: symfony flex symfonyflex introduction tutorial bundle bootstrap

Link: https://www.sitepoint.com/symfony-flex-paving-path-faster-better-symfony/

Symfony Finland:
PHP 7.1 vs 7.2 Benchmarks (with Docker and Symfony Flex)
Oct 17, 2017 @ 11:17:25

On the Symfony Finland site there's a new post sharing the results of some recent benchmarks of the differences between running the framework on PHP 7.1 and PHP 7.2:

PHP 7.2 will be launching soon, in fact, it has already reached Release Candidate status. I was exploring Symfony Flex with Docker setup and thought I would do a quick round of tests to compare the differences in PHP 7.1 and 7.2 (RC4) regarding performance with a few benchmarks.

[...] The benchmarked application is the Symfony Flex port of the hybrid application I did back in January. The project now has the required configuration to run it with Docker, and you can find the full source on GitHub.

The post then shares some of the results and conclusions of the test runs, showing the differences between the two versions. In one set of tests, they're calling the front page controller with Twig rendering and in the other a backend controller without the display rendering. PHP 7.2 ends up performing slightly better than PHP 7.1 overall but not by very much in most cases. The more dramatic change is on the backend, though, with a good jump in performance for a Symfony Flex application.

tagged: symfony flex application benchmark php71 php72 compare results graph

Link: https://symfony.fi/entry/php-7-1-vs-7-2-benchmarks-with-docker-and-symfony-flex

Symfony Finland:
Symfony Flex set to enable RAD (Rapid Application Development)
Dec 05, 2016 @ 11:58:37

On the Symfony Finland site there's a post that gets into the details of one of the new advancements in the Symfony ecosystem recently announced by Fabien Potencier at SymfonyCon Berlin 2016 - Symfony Flex.

The Symfony team has acknowledged this gap in their offering. And at SymfonyCon Berlin 2016 project lead Fabien Potencier announced what is known as Symfony Flex. Details are not precise, as I was not attending conference, but the tag line for Symfony Flex is: "Composition over Inheritance"

In essence it seems that Flex will allow for zero-config installation of Bundles. This is done using a Composer plugin. You will simply install packages with Composer and if the Bundle supports it, Composer will also author the necessary integration code and configuration.

As with any new thing, Flex support will start out pretty limited but as it grows in support the community should help it thrive in the Symfony ecosystem. The first release of the tooling for Flex will be available in early 2017.

tagged: symfony flex composer package bundle composition installation

Link: https://www.symfony.fi/entry/symfony-flex-to-enable-rad-rapid-application-development

Community News:
Zagreb PHP User Group December 2011 Meeting - 13th @ 6pm
Nov 30, 2011 @ 08:29:30

Miro has submitted some information about the latest meeting of the Zagreb PHP User Group happening December 13th at 6pm in the Multimedia Institute:

Although Zagreb PHP Meetup started only 3 months ago with monthly meetups (up to 30 developers coming), our next meeting will be first meetup with organized talks. December meetup will have 5 talks with themes like 'How to write readable code?', 'Flex & PHP development' , 'Introduction to test driven development' && 'MySQL - explain explained'.

We would like to invite all interested PHP and non-PHP developers that would like to listen to some of best Croatian PHP devs (and understand Croatian language) to come on December 13th from 6PM to Mama, Preradoviceva 18 in Zagreb. Unfortunately we are limited with number of available seats so please signup at http://zgphp.eventbrite.com/.

Due to space limitations, there's only 12 seats available so hurry and reserve your spot if you'd like to attend (it's free)!

Have a user group meeting you'd like announced? Let us know!

tagged: zagreb usergroup meeting ttd flex mysql explain december

Link:

Kevin Schroeder's Blog:
Authentication Using Zend_Amf
Jul 07, 2011 @ 09:39:47

Kevin Schroeder has a new post to his blog today showing how you can use the Zend_Amf component in your Flex+PHP application to authenticate users with the same authentication structure the rest of the application uses.

I forget why, but a few days ago I started doing some digging around with authentication in Zend_Amf_Server. I had figured that I would add an adapter to the Zend_Amf_Server::setAuth() method and that would be it. But I was wrong.

Zend_Auth is used to validate the login information that's passed along and the Zend_Acl checks to see if they have access. To make this work for a connection from Flex, you need to make an authentication adapter and add it (as well as a basic ACL) into your Zend_Amf_Server call.

tagged: zendamf zendacl zendauth authentication tutorial flex

Link:

Kevin Schroeder's Blog:
Passing typed ActionScript objects to Flex using PHP and a message queue
Jun 07, 2011 @ 08:20:12

Continuing on in his Flex and PHP series Kevin Schroeder has a new post to his blog today looking at how to send typed ActionScript objects to Flex so he could pass PHP objects and their structure directly back to the waiting frontend.

What I wanted to do was use the sales notification mechanism to pass PHP objects to Flex using the message queue. But I could not get the unserialization mechanism to work and so I had to settle for passing a simple message that a sale had been made. However, because you can pass typed objects back and forth between PHP and ActionScript over HTTP using Zend_Amf_Server I figured that there MUST be a way of doing it automatically.

He walks you through the steps to discovery that eventually got him to his end goal - making a simple valueObject class to use for the connection, a basic PHP script (using Zend_Amf) to parse the object's data and a bit of code to send it back to the waiting MQ queue via a Zend_Queue adapter.

tagged: flex message queue actionscript object mq

Link: