TAG | symfony
31
gjShortUrlPlugin – Creating SEO landing pages and manage redirection of legacy URLs with the symfony and Doctrine plugin
0 Comments | Posted by Christian in The real job
At my work place at Gruner+Jahr I had to find a simple yet effective solution to the requirement of redirecting old legacy URLs to new and shiny symfony URLs after a relaunch.
Another requirement was to be able to build campaign and SEO landing pages that redirect to and article or search result or whatsit.
As a result of just a few hours of writing routing related code there is now a new kid in town: gjShortUrlPlugin.
30
Options for setting up a Doctrine database connection when PHPUnit testing symfony plugins
2 Comments | Posted by Christian in The real job
It is rarely the case that your unit tests actually test your database. It is however not so rare that the code your unit test tries to cover needs a database connection of some sorts.
In symfony 1.x you will find quite some tightly coupled code. Together with Doctrines (1.x) implementation of the active record pattern you will get a lot of exceptions complaining about no open database connection.
So if your tests need a database connection how should you do that?
27
Why Doctrine_Core::getTable(‘BarFoo’) is not such a good idea.. when PHPUnit testing a symfony plugin
10 Comments | Posted by Christian in Miscellaneous
If you have a look at the symfony and Doctrine documentation you will notice that whenever you want to get the table object for a model you will call Doctrine_Core::getTable(‘ModelName’).
Apparently this is considered a best practice however I came to thing quite the opposite.
26
Applying best practices for PHPUnit testing symfony plugins
3 Comments | Posted by Christian in The right tool
By now I have been writing quite a bit about how to utilise PHPUnit when developing symfony plugins. But symfony is of course still bundled with lime so before starting right away every plugin needs to be prepared with small changes like adjusting the bootstrap.
And because all these little changes have to be repeated over and over again for every plugin you start they tend to get tedious.
But I’ve got an idea!
25
[Question] What would you expect of a best practice document when developing symfony 1.4 form widgets?
3 Comments | Posted by Christian in Question
I am currently working on some symfony form customisation which includes writing widgets or better still extending existing ones.
However this proves to be much more complicated as I thought it would as the functionality for validating, form elements, object saving, dynamic javascripts and so forth seem to be scattered all over the place. A lot of non default widgets that you can find are hard to extend as they often do not separate javascript not HTML.
So what should be the best practice form/widget development guidelines?
23
Setting up Continuous Integration for a symfony plugin using Hudson and Sebastian Bergmanns (PHPUnit) Template for Hudson Jobs for PHP Projects
0 Comments | Posted by Christian in The right tool
I must admit that I have been lazy with my efforts on continuous integration lately. Eventually my server crashed unnoticed and I didn’t get any emails about broken builds anymore and by now I think I’ve stacked up some work to do.
First of course I’ve got to get my CI server up and running again, that’s why I installed Hudson again.
But there is room for improvement too. Sebastian Bergmann of PHPUnit fame spent some time on a template Hudson job for PHP projects that includes much more than PHPUnit. So I decided to use that!
(more…)
20
[workshop] Integrating sfImageTransformExtraPlugin into your symfony backend application – Part 2
In the first part of this two part workshop series I demonstrated how you can easily integrate sfimageTransformExtraPlugin in your administrative backend application.
But you will have realised that all images generated have ugly path and file names. That might not matter much to your backend application but it will to what the user sees. So today I will focus on those nice URLs.
I’m going to use Doctrine in this post but everything will work exactly the same for Propel.
18
[workshop] Integrating sfImageTransformExtraPlugin into your symfony backend application – Part 1
6 Comments | Posted by Christian in Workshop
Now after I finally implemented a way to remove outdated thumbnails it is time to put it to use and integrate it in our symfony backend application.
In this part I will focus on a rather simple integration with the following requirements:
- Show thumbnails generated by sfImageTransformExtraPlugin in edit form instead of the original
- Show thumbnails generated by sfImageTransformExtraPlugin in list instead of the original
- Automatically remove outdated thumbnails when the source has changed
17
How to automatically and manually delete thumbnails in symfony with sfImageTransformExtraPlugin
3 Comments | Posted by Christian in The real job
As I promised yesterday there is a new version of sfImageTransformExtraPlugin out which not only allows you to selectively delete generated thumbnails manually using a symfony task but also provides a generic API for doing this automatically using the symfony event dispatcher.
16
The missed multiplier – How me working more on sfImageTransformExtraPlugin could’ve saved someone elses time
5 Comments | Posted by Christian in Good to know
I am flattered. Benjamin Steininger (Robo47) uses my symfony plugin sfImageTransformExtraPlugin and blogged about it.
He was looking for a solution to delete the generated images again, when for example the source changes with a new upload. And this is actually where I felt bad..



