Symfony Day 2011 in Cologne

Symfony Day was amazing!!!

I love the community and it was great fun to see all the guys I already met during the last years and this year’s Symfony Live in Paris.

Again, a big THANK YOU to all organisers and of course all the people that make Symfony2 happen!

I just wanted to quickly paste my (sparse) notes that I took for myself – in case they help out someone else as well.

Basically, they are just some reminders for me of stuff that I wanted to check out.


  • Silex routes can use value() and assert() to be enhanced
  • Silex needs cookbook contributions
  • Silex can easily be functional tested (and require “” can have a return value!)


A shame, I never really looked at it before!? So take a closer look at and SPL in general

Links to follow/read

Pragmatic Programmer:


Check out – adminbundle

See, if it’s really that complicated as the talk made it seem

I did not note so much else, either because I already knew it, wanted to take a look at the presentations later, or player #sfdayjeopardy (thanks to Jeremy “Rick Astley” Mikola for that)

There’s one more thing

Actually, there were two things: Fabpot is a visionary! And his vision, of looking at Symfony2 not (only) as a framework but as a collection of several, individual and powerful components is great. MAYBE not for the developer looking for “a thing that does all the magik™” but for the more experienced one that can pick the best of a wide variety of components. Like some other PHP projects do now…

AND: Me, being a big fan of Propel, was happy to see all the momentum propulsion it got recently, including development support from inside sensio.

Hope to see you all again in June(?) in Paris and in November(?) in Berlin?

My biased view on Doctrine vs Propel

I’m getting old and I’m old fashioned.

I’m still using mysql, not mongoDB.

I’m using php and apache, not node.js, ruby, python or lighttpd, nginx or ….

And I’m using propel again (1.5), not doctrine. AND I’M LOVING IT!!

After #sfdaycng 2009, the presentations and talks there, I forced myself to giving Doctrine a try and really liked it then. A lot of reading through documentation in the beginning if you are new to it, but hey, that’s normal. However, today, even when writing a simple query, I still have to consult the docs. Why? The syntax seems not to be “my style” somehow, it won’t fit into my type of writing code.

But there is such a HUGE difference between Doctrine and Propel and Doctrine is SO MUCH BETTER

Is it? Do I care what’s inside if I’m only querying a database without using all possibilities? Remember sfLive 2010?

“Is Doctrine re-inventing propel” Hahaha LOL ROFL LMAO

At this years big symfony conference #sflive2010, in a Q&A session about Doctrine2, a poor guy obviously asked the question, that made it into a big running gag: “Are you trying to re-invent propel?”

I have to admit and regret that I was not there, but if you followed the #sflive2010 hashtag on twitter, it was not very long until this got tweeted over and over again. And everybody was making fun of it…

Sure, it is kind of funny to ask @jwage, (lead) developer of Doctrine that question… But hey? What’s really so funny about it?

While everybody in the audience laughed, it really would have been interesting to

a) see how many were trying to smirk, wondering whats so funny about that

b) know how many would have been able to give a good reply on that?

And with “good reply” I mean, explain the difference.

And with “difference” I mean, explain it beyond

  • “doctrine has the schema.yml and the model classes in a subfolder”
  • “propel uses two classes User and UserPeer, doctrine has User and UserTable”
  • “propel has a criteria object, doctrine a query object”

If you started with symfony 1.0 as a developer that did not work with frameworks like symfony before (like I did), everthing is “symfony” – may it be propel, phing, creole, PDO, … and getting into these differences was not really worth it in the first place if you wanted to get started with writing your first applications.

What I’m trying to say: I guess that a lot of symfony developers out there don’t know or care about “Doctrine” vs “Propel” – they use the default. And they call it “symfony”, thinking that it belongs to it. If they started with symfony <1.2, they’ll use propel, now they use doctrine – because it’s the default. You learn it, you use it, you stick to it.

And I sticked to propel throughout 1.2. And it was quite save for me getting along ignoring Doctrine. Just then, when I started using Doctrine after #sfdaycgn I found new things, new approaches, things I liked, things I had to learn and a lot of stuff I could not get the hang of.

So now, with propel 1.5 and the new Query objects, I gave it a try and was so excited, I decided to come back to Propel. Just because it “feels like home” and fits my personal style of thinking/coding.

And of course both ORMs have their features and behaviours and at #sfdaycng Doctrine had more of them and so on… But I also assume that a lot of those features are beyond most everyday developer’s needs

But Propel is dead

Oh no, it’s not!!!

With the new 1.5 it REALLY got amazingly easy to write your code, extend your Query Model and easy query creation. 1.6 is on it’s way and 2.0 was just recently announced to be based on Doctrine2, as a layer on top, providing the usability features… that’s something we will have to wait for, but I does sound very good.

But Benchmarks show that…

So what? I couldn’t care less. Why should I? I am not running sites that have gazillions of users with quadrubillions of tables and hexafoobarillions of rows – I don’t care if grabbing all posts with a certain topic and tag for a given user takes 111 ms or 132 ms. But I do care if I have to consult the docs for writing that query because I couldn’t remember the syntax or – on the other hand – my IDE (yeah, right, eclipse, I’m REALLY old fashioned) nearly automagically creates the query for me.

But what are you actually trying to say?

  • Most developers don’t need benchmarks to find their ORM – it’s about own style and preference (or customer specs, but thats another story)
  • Some symfony developers might not even have thought about giving “the other one” a try.
  • Personally, I get along with propel 1.5 better
  • I’m getting old

So, if you know Doctrine, give Propel 1.5 a try.

If you only use Propel, give Doctrine a try.

And if you still use Propel 1.4 – MAN!!! Get the 1.5!!!

Any comments appreciated, I really like to see what I’m missing

PS: I’m even more old fashioned: I’m using vi – not vim, but eclipse with the vi plugin. Why? REAL code completion! A wonderful thing with propel 1.5!

Der Umstellerei nicht genug…

Posted on 2009-11-24

Von symfony 1.0 über 1.1 zu 1.2 zu 1.4 und von propel zu doctrine und von prototype zu jquery

Das ist das, was ich gerade mit meinem Karopier-Code mache. Und irgendwie hab ich das Gefühl, dass kann nicht ewig so weitergehen. Kaum hab ich was fertig, kommt was neues und ich will’s einbauen/anpassen…

Aber ich glaube, mit symfony 1.4 (stable ist ja um die Ecke), doctrine und jquery hab ich jetzt etwas, das länger halten sollte. Von daher machen die Umstellungen jetzt, so früh, glaube ich sogar noch Sinn, auch wenn ich jetzt ein paar Sachen wieder neu machen muss, die vorher schon taten…

Move from Propel to doctrine

Original Date: 2009-09-11

Big day today!

My plan is to dive into doctrine today by converting a small application. I have been using propel all the time and now it looks like I need to change something, because doctrine will be the path forward for symfony.

BTW, I’ll write this one in English, because it might help some people out there (and not only Germans…)

So, first stop:

The symfony and Doctrine Book

So I ran

./symfony configure:database --name=doctrine --class=sfDoctrineDatabase "mysql:host=localhost;dbname=dbname" user secret

to get the basic connection set up. Afterwards, I needed to clean some old Propel line removed from the database.yml

My Database is alread existing, so I can recreate the schema from the DB.

php symfony doctrine:build-schema

et voilà – I have a subfolder doctrine with the schema.yml

Hmm, first question now: Where did the _attribute: { phpname: .. } go?

Looking at the schema, the big difference between propel and doctrine seems to be: doctrine specifies a tablename for a parent element called like the table, but propel specifies a phpname for a parent that IS the table…

In my example I have a mysql table called “plz” but the phpname was “Zip”.

So, doctrine created a classname “Plz:” with tableName: plz – I try to change “Plz:” into “Zip:” … keep your fingers crossed

The doc talks about multiple connectiosn and attributes now, I’ll skip that for now, got no clue what the attributes mean and I only need one connection.

BUILD!! Thats what I want to do!!!

I don’t want to erase the table, so I only

php symfony doctrine:build-model

and YES, as hoped, it created a “Zip.class.php”. COOL!

add some

php symfony doctrine:build-forms
php symfony doctrine:build-filters
php symfony doctrine:build-sql

and now we should be fine, right?

Mein erster Symfony-[PATCH]

Original Date: 2009-09-11

Ich habe mich zum ersten mal durch die tiefen Innereien von symfony gewühlt, um herauszufinden, warum propel:data-dump bei mir einfach Spalten verschluckt hat bzw. bei manchen Tabellen nur einen (den letzten) Datensatz geliefert hat.

Dabei wollte ich doch voller Begeisterung nen Unit-Test mit eigenen Daten schreiben – und bleib an einem Bug hängen.

Jedenfalls konnte ich’s lösen und hoffe, der Patch finden seinen Weg in den offiziellen Release.

Patch siehe hier: