Preparing for Symfony BugHuntDay

Symfony
That’s right, the title says it all: we’re having another BugHuntDay. After the success of the previous one, we (PHPBenelux) decided to host another one. Last time around it was all about Zend Framework. This time we feel that we should dedicate some attention to the Symfony framework.

To be perfectly honest, we were discussing it for a while, but we didn’t reach the planning stage. That was until the kind people at Intracto decided to take the lead. I knew they were pretty fond of Symfony, but now they decided it was time to give back to the community by sponsoring and hosting the event.
PHPBenelux
The event takes place Saturday November 14th at Frame21 in Herentals. More details can be found on the PHPBenelux website. You can still register for this event and we kindly invite you to do so by filling up the following form.

This blog post will assist you in preparing for the actual event. You shouldn’t be a rocket scientist to participate. A good knowledge of PHP and an open mind will get you a long way.

About Symfony BugHuntDay

A BugHuntDay is a community event where people gather to find/fix bugs in open source software. As I already mentioned, we picked the Symfony framework which is a well known PHP framework which delivers a full stack MVC solution. Our goal is to find/fix as many bugs as possible for the upcoming 1.3 release.

Finding bugs is quite easy, the Trac issue tracker that Symfony uses has a nice overview of all tickets. But finding a bug that you are able to fix is a different story all together.

Getting to know Symfony

The framework

You can get to know the Symfony framework by downloading and installing the Symfony sandbox. The sandbox offers a pre-packaged Symfony project you can play and experiment with. It includes the application default document structure and the complete Symfony framework library.

There’s also plenty of documentation available. Go to the Symfony documentation pages to read all about it. If you have difficulties installing Symfony or the sandbox, you should consult the Symfony installation guide.

The source

Once you’ve gained some basic experience, it’s time to take a look at the source code. Since we are working on the upcoming 1.3 release, you should check out the 1.3 Subversion branch. You can also view this branch via the Trac panel.

Coaching

Once you know your way around the framework, it’s time to find yourself a nice bug to fix. That will not be so easy. You are free to browse the tickets, but I guess some coaching will be required.

The good thing about PHPBenelux is that we have lots of contacts in the PHP community. We managed to invite some people who are important to the Symfony project. They will coordinate the event and provide proper coaching. We have confirmed the following Symfony team members:

  • Stefan Koopmanschap is the community manager for the Symfony project. He’s also one of our board members, so it was quite easy to confirm him.
  • Fabien Potencier is the project leader for Symfony. It’s a real honor to have him at the event.
  • Fabian Lange is the release manager for the 1.2 release. His presence is also greatly appreciated.

Not only will they help us with the issues we encounter, but they’ll make a selection of bugs that are quite manageable to fix. It’s also a great opportunity for them to have a group of people who will contribute to the project. If you have difficulties finding the right bug to fix, talk to the coaches, they will guide you.

For those of you who can’t make it to Herentals: you can also participate over the internet. The entire event will also be hosted on the internet via IRC. It will be the main communication channel to get in touch with the coaches and the onsite contributors.

Fixing a bug

Once you have found a bug that you can fix, you still need to take some things into account before you start coding away. It’s very important to read the wiki article on how to contribute.

The Submitting patches chapter is an essential part that describes:
- Coding standards
- Patch styles
- Commit procedure
- procedure

When it comes to preparing, this is a crucial step that cannot be skipped. If you really want to commit a patch It will have to be according the standards.

Testing

When can you really guarantee a bug is fixed? And can you guarantee that your patch hasn’t triggered another bug?

Unit tests are the answer to that question. The assumption that your patch is absolutely flawless is not enough. It’s very easy to trip over a proverbial wire and trigger one or more additional bugs. Unit tests allow you to test your patches via a set of fixtures.

An initial testcase should make your testcase fail and should reproduce the actual bug. This is a solid way of proving that the bug is actually a bug and not a feature. Again, assumptions aren’t enough.

After fixing the bug, the testcase will succeed and this should be a proof that the patch is a valid bugfix. If the patch makes other unit tests fail, you’ve obviously did something horribly wrong and you should review the patch before submitting it.

It’s obvious that unit tests are saveguards that protect the integrity of the project. There are many tools to perform unit tests. The people at Symfony have created there own testing framework which is called The Lime Testing Framework. Again, the Trac wiki provides the necessary information on how to use this testing framework.

Hope to see you there

Don’t be afraid to participate, even if you aren’t that experienced. It will be a great opportunity to learn a lot about the framwork, about bugfixing and about PHP in general.

You will meet lots of interesting people and if your not part of the PHP community yet, this is your chance to take the first step.

See you there !
Thijs


2 Responses to “Preparing for Symfony BugHuntDay”

Leave a Reply