A successful upgrade from Symfony 2 to 3

As Feed-io-bundle is now Symfony 3 compliant, the next logical move was to upgrade its demo. The application is just composed of the bundle itself and Bootstrap so the upgrade process should be easy to follow. Let’s see what’s in the documentation :

There are a couple of steps to upgrading a major version:

  1. Make your code deprecation free
  2. Update to the new major version via Composer
  3. Update your code to work with the new version

Three steps and every thing seems cristal clear, here we go.

Replace deprecated code and configuration

According to the cookbook, you’ll have to replace everything that became deprecated during Symfony 2’s evolution. To go through the first step, Symfony provides a package called symfony/phpunit-bridge which detects deprecated parts of your code and shows you the way to correct it. Another way to go is to pay attention to deprecations Symfony notices to your application’s log, which means to manually test the whole application. Good luck with that. feedio-demo has unit tests (well in fact, one), I’ll use the bridge :

image

OK, that’s easy. Only one configuration to fix and feedio-demo is ready for the dependencies upgrade.

Continue reading

A factory in feed-io v2.2

In feed-io 2.2, I introduced a Factory class built to get a FeedIo instance in one single line of code :

$feedIo = \FeedIo\Factory::create()->getFeedIo();

Obviously this works assuming that you installed feed-io using Composer and you have included vendor/autoload.php before.

Factory’s main method : Factory::create()

The factory comes with the ability to configure feed-io before getting its main class. For that, you will provide one or two configuration arrays depending on which dependency you want to configure.

Continue reading

feed-io-bundle 3.0 to support Symfony 3.0

Edit : the bundle is no longer supported, see this announcement

I recently released version 3.0 of feed-io-bundle. Symfony 3.0 introduced a backward compatibility break in forms support, so it became impossible to maintain a code base compatible with both versions.

Symfony 2.x support

I created a branch called release/2.x to maintain feed-io-bundle version 2. It will last until the end of the Symfony 2.x official support. This branch will be used for bug fixes only, all the new features will be committed to the master branch.

feed-io-bundle v2.1.1 is out

Edit : the bundle is no longer supported, see this announcement

I recently released version 2.1.1 of feed-io-bundle. This is a major release as it introduces a web interface made to manage feeds and their content which you can try live here : http://feedio-demo.herokuapp.com/.

It’s also official : feed-io-bundle replaces rss-atom-bundle. If you’re starting a new Symfony project, I highly recommend you to use feed-io-bundle instead of rss-atom-bundle. feed-io-bundle will be upgraded regularly with new features and fixes among compatibility with Symfony.

Rss-atom-bundle’s support

rss-atom-bundle is not condemned to disappear immediately, I will provide a “passive support” until it’s not used anymore. By passive support, I mean taking care of open issues and pull requests until the end. So if you already have a project depending on rss-atom-bundle you don’t have to be afraid of this announcement, I’ll always be able to help.

Coming next

I’m working on two things by now :
– Symfony 3 compatibility
– the ability to analyse feed’s quality with feed-io

To write PHP applications with Android : use GNURoot Debian

In a previous post I wrote about the possibility to develop PHP applications using a tablet. The main trouble was to find a reliable application to run a web server with a recent version of PHP featuring xDebug and the ability to run unit tests. It’s manageable but not fully satisfying so I kept looking for another solution.

Then I found GNURoot Debian and it changed everything : Debian Jessie running inside a virtual machine, you can’t ask for more.

I tried several Linux emulators and GNURoot Debian was the only one to work easily without tweaking its configuration. For instance, LinuxDeploy seems very powerful but it never managed to write its configuration on the file system. Even the higher level of logging didn’t point out what the real problem was.

Continue reading

Coding everywhere using an Android device

screen-shot

Some while ago, I used to code with my laptop on my knees in the public transportation. That way, I made significants contributions to rss-atom-bundle and I’m sure this bundle wouldn’t be the same today without it. Meanwhile, coding with a 15” laptop in the subway means troubles with other passengers or the laptop itself like complaints, purse shots in the screen or a computer getting very hot on your knees. So I decided to keep it home.

But I couldn’t resist, I needed to keep working on open source projects so I tried to do it with a system closed to what I know on a smaller device. The Nexus 7 tablet is a good candidate for that and you’ll see in this post how I managed to set up a development environment using applications available on Google Play. I ended up with the ability to push commits on Github and to run PHPunit inside my projects.

Continue reading