Symfony Live 2014 NYC recap

sflive_nycLast week I had the honor and privilege of speaking at Symfony Live 2014 in New York City. This was my second opportunity to speak in Symfony Live in the US (last year was in Portland when Symfony Live shared the venue with DrupalCon).

The conference was a single track and I was scheduled to speak at the first day, first slot right after Fabien’s keynote. No pressure. The room was quite full, about 90% so I estimate between 100 and 150 attendees.

Fabien’s keynote was informative, speaking about the Symfony 2.6 upcoming release, and giving hints of what to expect for Symfony 3. For the first time, it was mentioned that the target release date will be November of 2015, probably around the 2015 edition of SymfonyCon. Now, don’t get too excited. With the main focus on avoiding backwards compatibility unless really needed, don’t expect anything as revolutionary as Symfony2 when it was announced back in 2012. He also introduced the new Best Practices document which has made the rounds of Twitter early this week.

My talk followed and in my opinion went quite well. I have given this presentation in previous conferences, but for this occasion I included quite a few updates. But I was a bit concerned with the fact that the slot was only of 40 minutes. This is 10 or 20 minutes less than other conferences, so I had to trim some fat and make sure I stayed on track. I think the result was very good. And the confirmation is that today I received the news that I will be giving this talk in SymfonyCon in Madrid, Spain!

Before the lunch break, Kris Wallsmith presented “The view from inside” where he shared his experience of going through an accelerator/incubator program while building a startup and mobile app. It was full of stories and reflections that many of us are or have shared. Something that stuck with me was a a quote that went something like “while building this company, you will lose your friends, your wife, etc”. Having gone through a startup and successful business, I can assure you this is very true. I have not lost my wife, but many times it’s been quite close, and without her endless patience, it would surely happened.

Brent Shaffer gave a great talk about building APIs with Symfony and Jeremy Mikola presented “Developing Beautiful, Measurable Software” where he shared tips on how to make sure our code quality stays in check as the application grows.

To close the first day of talks, we had a set of lightning talks. Most of the sponsors got an opportunity to share their products, but of course we got a chance to have Jeremy Mikola on stage for his lightning talk about lightning which never gets old, in fact, every time I see it there is something new. Remarkable!

After the conference, a bunch of us headed to have a quick bite before heading to the official bar for the Cocktail party. It was quite crowded and loud, and I was quite tired (having arrived from Europe the day before, I was still jetlagged) so I went back to the hotel.

The second day started with David Zuelke from Heroku talking about the Twelve Factor App. David is a great presenter and his talks are always fun and full of good content, and it was great to see his awesome work in action at Heroku. Before lunch, Lukas Smith shared ways to create APIs using the FOSRestBundle and friends. Even though I have been using this for a few APIs, I was able to learn of a few new bundles that have been released recently.

One of tIMG_2331he highlights of the second day was the talks from Ryan Szrama about “Solving the Hard Parts of eCommerce”. Ryan comes from the Drupal world where he is part of the team behind Drupal Commerce. His presentation style was really nice, and talked about a bunch of the hard parts, reminded me how lucky I am not having to deal with those things.

The last talk of the day was by Ryan Weaver where he shared his views about helping developers get more productive through the The Developer Experience (DX) Initiative that he has spearheaded.  Ryan is one of my favorite speakers and it was a great way to close the conference. He even got his shoes off before getting started.

The last activity of the day was the Karaoke party nearby which unfortunately I could not attend.

I think it was a great conference. I had the opportunity to meet a bunch of new people, while going back to New York, one of the coolest cities in the world. Looking forward to SymfonyCon Madrid in November, not too long ahead.

Posted in Symfony Tagged with: , ,

Creating PHAR files with Box

PHAR files are the “executable”‘s of the PHP world. It allows you to create a package of your application for easy delivery. The most popular projects providing PHAR files are PHPUnit and Composer, but there are many more, and if you have a project that contains command line tools, you should too.

The process boils down to a few basic steps:

  • create a PHAR compiler
  • collect all files that need to be packaged
  • produce PHAR file and sign it

The Box project provides an easy way of creating a PHAR file for your project. Installation is simple:

curl -LSs | php

I like putting all phar and other custom commands that I use regularly in my ~/bin directory. If you do so, make sure you add the directory to your PATH environment variable:

# edit .bash_profile or .profile
export PATH=~/bin:$PATH

Then, create a box.json file which will be used to configure box and create your PHAR file. The content could be something like this:

    "directories": ["src"],
    "finder": [
            "name": "*.php",
            "exclude": ["Tests", "tests"],
            "in": "vendor"
    "main": "bin/command",
    "output": "your.phar",
    "stub": true

This configuration will create a file named your.phar, and will run bin/command when it is executed. It will include in it all files inside the directories src and vendor (except Tests).

Once you are done with this, run the build command:

box build -v

Compiling a PHAR with box

Posted in PHP Tagged with: ,

Copy SSH keys for easy and quick access to servers

SSH keys are great. It allows you to login to servers and SSH-based serveices without using passwords.

Before using SSH keys, you need to create an key:

ssh-keygen -t dsa

Answer a few questions, and then you will have a new pair of keys. Now, copy the key to the remote server:

ssh-copy-id user@remote-host

If you are on OSX, you can install the utility with homebrew:

brew install ssh-copy-id

Or download it using the following command from this github repo:

curl -L | sh

If you are on Windows, you can use the following command (credit to Andres Gonzalez):

cat ~/.ssh/ | ssh user@remote-host “mkdir ~/.ssh; cat <<; ~/.ssh/authorized_keys”

Posted in devops Tagged with: