Simple Authentication for Symfony using Facebook Login

Following on from an earlier post, facebook changed the way you authenticate with their site.

The steps to authenticate have not changed too much, and the only change is to part 4.

  1. Create a new facebook application
  2. Add your website URL to it
  3. Add the facebook Login link to your page
  4. Process the return visit from facebook

Continue reading Simple Authentication for Symfony using Facebook Login

Functional test helpers for symfony 1.4 code

We you come to write functional tests in symfony 1.4 you can end up with a lot of duplicated code when testing basic things like the routing. To make life easier you can add helper functions to your tests to reduce the amount of duplication, and speed up test writing. So let’s start with the routing example.
Continue reading Functional test helpers for symfony 1.4 code

Simple Authentication for Symfony using Facebook Login

A few days ago I set about the task of writing an authentication system for DropoutUK based around Facebook Connect / Facebook Login Button. I was pleasantly surprised to learn just how simple it seems to be these days, compared to the first implementation I played with back in 2009. Which, OK is 2 years now, but the new social plugins make life so much easier.

So what is involve? Just 4 simple actions

  1. Create a new facebook application
  2. Add your website URL to it
  3. Add the facebook Login Button to the page
  4. Check for the facebook cookie and process a login action if possible.

Continue reading Simple Authentication for Symfony using Facebook Login

Symfony2 – it’s finally ready…

Back in April we saw the first BETA release of Symfony2. Since then we’ve seen 5 beta versions, but earlier today the final version of 2.0 was released. So I’m left with the question on the back of my mind, how many companies will be upgrading their projects from 1.x? Or will they just accept that their existing projects are staying on 1.x and new ones shall be commissioned to build replacements on the new platform?

Continue reading Symfony2 – it’s finally ready…

Creating a search tool with the Searchable behaviour in Doctrine

Once you’ve set up a searchable behaviour on a doctrine model, and have indexed all the keywords on the model, you are going to want to build a search tool. First we should create a simple symfony form.

Continue reading Creating a search tool with the Searchable behaviour in Doctrine

Re-indexing a doctrine object with a symfony task

Yesterday I explained how to add the Searchable behaviour to a doctrine object,  to I’ll cover that how to create a symfony task to re-index all the existing objects. The basic idea of the task is to retrieve all the objects from your database, mark them as dirty and re-save them. If you don’t mark them as dirty, nothing will update when you save, which is what you would expect from doctrine.

Continue reading Re-indexing a doctrine object with a symfony task

Adding the Searchable behaviour to a Doctrine model in Symfony

The searchable behaviour within Doctrine is a brilliant and powerful way to add a quick and simple search to your symfony code. The basics of this behaviour are to create an index table for your given model, which contains 4 things, a keyword, the field it was in, the position and the object id it was in.

Continue reading Adding the Searchable behaviour to a Doctrine model in Symfony

Symfony2: Beta1 available!

It’s here, Symfony 2.0 Beta1 is now available to download and play with. You can Download Symfony 2.0 Standard Edition beta1, a good place to start is the quick tour, or the book, both of which should give you a good push in the right direction on how this new version of Symfony fits together. Continue reading Symfony2: Beta1 available!

Michael Owen Online relaunch

Michael Owen OnlineThe DNS has migrated and the new code is online. The new version of Michael Owen Online has gone up with almost no problems. The only issues that were seen were 2 HTML files Google Webmaster tools looks for to prove you own the website, and a collection of wordpress URLs which were not identified and 301’d when the new code went up. As re-launch issues go they were pretty minor. Continue reading Michael Owen Online relaunch