

Symfony 2.0 is now available - j0k3r
http://symfony.com/blog/symfony-2-0

======
deweller
I've looked through some source code in the Symfony 2 components. The code is
well organized, commented, and most of all it is of high quality.

As far as I am concerned, Symfony 2 is the gold standard example for
developing a PHP project of any kind.

~~~
eurohacker
what do you think about Yii framework which is also gaining popularity these
days,

~~~
ryeguy
I think it's disgusting. It tries to use the component model, similar to
ASP.NET. Even Microsoft realized what a disaster it was, and the community
moving to ASP.NET MVC, which is similar to traditional frameworks.

------
retro212
If you need a lightweight - Sinatra like framework check <http://silex-
project.org/> it is built from Symfony components and works like a charm

~~~
bergie
Silex is cool. I did a quick-and-dirty benchmark with it and AiP a while back,
and performance was comparable to Node.js and Express:

[http://bergie.iki.fi/blog/php_can_perform_better_than_node-j...](http://bergie.iki.fi/blog/php_can_perform_better_than_node-
js/)

------
neovive
The project team did an amazing job with this release. I'm not a Symfony user
myself, but their website is very professional and well organized and the
documentation is excellent -- very thorough and updated for the new release.

Beyond methodology and community, one of the major decisions involved when
selecting a framework is being confident that your codebase will be supported
in the near future. The Symfony developers and community seem very committed
to their framework. Great Job!

------
websirnik
I'm woking with Symfony 2 now for a half-year. And I can say that it is
brilliant. Dependency Injection that they have implemented is a really nice
feature. It is also great that it consists of de-coupled components. You can
use any of the components including Dependency Injection in ur PHP projects.

~~~
pcole
Same here, I have been using it on a new project since November 2010 and it
has been great, following the commits on Github and upgrading when necessary
has been relatively easy. This project has really opened my eyes to the power
that Git + Github (when used properly) can bring to open source software.

I would also like to add that Fabien Potencier has been amazing and is
officially a coding Robot!

------
celalo
For those wants to know more about Symfony, I can assure you Symfony and Yii
are at different leagues. Symfony is so much more featured than any PHP
framework out there. Yml based settings and modeling plus the Admin Generator
is one of a kind. I believe it is even better than Django and Rails, when it
comes to flexibility and extensibility.

~~~
narcissus
Just curious about that first sentence there... are you saying that Symfony
and Yii are both in the same league, different from everything else, or that
Symfony is in a league different from the one that Yii is in?

I haven't looked at Symfony, but I was really impressed by the event driven
nature of Yii, and I couldn't wipe the smile off my face when I started
looking into the active page elements.

I think 2.0 is as good an excuse as any to check out Symfony though, so
goodbye to the weekend :)

~~~
celalo
I was meaning "Symfony is in a league different from the one that Yii is in"

I value Symfony so much because you can create all model classes, crud forms
etc from command line (as much as you want as you update your schema) just
based on specifications from a easy to manage yml file. Also with ORM
behaviors, you are in control of everything about your model.

~~~
cruiseControl
In that case I wonder what makes you compare the two frameworks and what you
actually think the two are in such a separate league. You keep talking about
Symfony without actually comparing it with Yii as your initial statement made
me think you would. :)

~~~
celalo
Sorry about misleading, when I talk about symfony and tell about its features,
I tried to pick superior parts where Yii lacks

------
ericfrenkiel
Congratulations to Fabien and the Sensio team! Fabien is an amazing evangelist
for the framework, and I've had the good fortune to attend Fabien's talks on
multiple occasions. I've used Symfony since 2007 and it's clear the framework
has staying power and significant adoption with each new year. Congrats again!

------
bergie
I'm currently in process of building compatibility layers from our two old PHP
frameworks (MidCOM and Midgard MVC) to Symfony, and have been very pleasantly
surprised with both the code quality and the responsiveness of the community.

As part of this work I will also write new Symfony2 bundles for whatever
functiolity our old frameworks had a SF2 misses. The first one is the ability
to run Symfony2 apps under AppServer-in-PHP, a pure-PHP application/HTTP
server. No Apache required! :-)

<https://github.com/bergie/MidgardAppServerBundle>

~~~
mweibel
Since PHP 5.4 there's a web server built-in:
<http://php.net/manual/en/features.commandline.webserver.php>

Maybe you could rely on that, instead of aip :)

~~~
bergie
Maybe, though AiP gives us nice control of the process. And it also supports
other modes than HTTP, like Mongrel2 and SCGI:

[https://github.com/indeyets/appserver-in-
php/tree/master/AiP...](https://github.com/indeyets/appserver-in-
php/tree/master/AiP/Protocol)

Anyway, based on your suggestion I posted a quick ticket about adding support
for the built-in PHP webserver:

<https://github.com/indeyets/appserver-in-php/issues/17>

------
ecaron
I wish they would stop referring to their documentation as a "book." The keep
calling the link to <http://symfony.com/doc/current/book/index.html> as their
book, yet it offers no ebook manner of being accessed (my kingdom for a PDF.)

I can't help but wonder who this "book" is being marketed to because of this
"you can only access the book while you're fully online" limitation.

------
corry
Can someone comment on Symfony vs. CodeIgniter? I've done a few projects in CI
- any big compelling reason to switch to Symfony for the next one?

~~~
eropple
CodeIgniter is a fundamentally PHP4 system that is, today, wedged into more
modern PHP5.3 programming practices. Personally, I can't see a good reason to
use CI today (and I say that as someone who has used it extensively in the
past--my capstone project at school was based on it!). If you want something
CI-esque, you're better off looking at Kohana...but Kohana seems to give short
shrift to certain important aspects, e.g. security is something of an
afterthought.

Symfony2, on the other hand, can be pretty safely termed a modern system: it's
almost completely modular (and not in the "override some files, it's like
magic!" method of Kohana or CI), expects modern programming practices (it
doesn't treat you like an idiot; you can use PHP 5.3 stuff like anonymous
functions and it's cool with it), and is blazingly, blazingly fast when
configured properly.

~~~
boringpun
I disagree with your view of CodeIgniter. It's one of the best documented
frameworks out there; it's quick to learn; and it doesn't require a lot of
typing/coding. It's best suited for smaller projects, I would say, but for
those projects it rocks.

~~~
eropple
CodeIgniter's documentation is indeed very good. Much better than Symfony2's,
at least. I'd agree with you on that.

CodeIgniter also has no conception of how to actually work in PHP5.3. Perhaps
CodeIgniter will acquire that down the road, but right now it's a poor routing
kernel surrounded by a lot of inconsistent and very ugly modules that are
duplicated or improved upon in the other major frameworks in common use.

"Doesn't require a lot of coding" is nonsensical; I can build a Symfony2
application to do nontrivial task in less time, with better and more reliable
code, than I can the equivalent in CodeIgniter. And I used CodeIgniter since
around the time of the original release. There are not many cases where
something is top-to-bottom dominant in its field, but aside from
documentation, which is being improved upon incrementally, Symfony2 really
does fit that bill.

------
skrebbel
> _Everything is a Bundle in Symfony2: A bundle is a directory containing a
> set of files (PHP files, stylesheets, JavaScripts, images, ...) that
> implement a single feature (a blog, a forum, etc). That changes everything.
> Share your bundles between your projects or publish them in the wild._

I have no idea whether this is novel, but it is to me, and I _really_ like it.

~~~
wulczer
Sounds a little like apps in Djangoland. Maybe someone who knows both
frameworks could confirm.

~~~
bergie
This has been a core idea in both Midgard MVC and MidCOM PHP frameworks,
though we called them components.

<http://wiki.openpsa2.org/index.php/MidCOM_Components>

[https://github.com/midgardproject/midgardmvc_core/blob/maste...](https://github.com/midgardproject/midgardmvc_core/blob/master/documentation/index.markdown)

~~~
john2x
I really hate why Django calls them 'apps'. Kinda difficult to distinguish
between a working application or a Django 'app'.

~~~
code_duck
I agree, I might have one 'app' that is what I consider my actual application,
but then alongside it at the same level, something like Django OAuth. It would
be a stretch to call django-registration or OAuth an 'app', since they can't
do anything alone.

------
ZoFreX
Very, very excited about this and have been for some time, congratulations to
the team on the release! For those that don't know it, Symfony is a very
impressive framework that puts a lot more into "Doing Things Right" than most
other PHP frameworks, and some of their components (such as Assetic) are
amazing contributions to the PHP ecosystem in their own right.

------
gary4gar
Congrats to Symfony2 Team!

FYI, Symfony2 requires minimum PHP version 5.3.2

PHP 5.3 which is not something every shared hosting provider will support,
most are still on 5.2.series. so everyone should keep that in mind while
writing PHP app with Symfony2

~~~
abredow
I hear these sorts of things regarding hosting all of the time. However, in my
experience, if you are working on an app that is large enough to warrant using
a framework like Symfony or Zend Framework, you are probably going to also be
using your own server. People don't build large expensive applications and
then deploy to GoDaddy or something :)

~~~
te_chris
Agree completely. CodeIgniter used to use this as an argument for supporting
PHP4 (!!?!?!?), but it seems so bankrupt. I (anecdotal, I know) don't know a
single person writing an application (what these frameworks are designed for)
who would deploy to a classic shared hosting environment over a VPS or app
cloud service.

------
j_col
Well done to everyone involved, looking forward to checking out all of the new
features.

------
mrspeaker
I'd never heard of Symfony before. Can someone point to some tech details
about the framework? The site does a lot of explaining what a framework is,
and some general philosophies - but not what this particular framework is.

~~~
siphr
Same here. No Idea where this came from. To be honest the effort put into this
could've just contributed to an existing open source framework for
improvement.

~~~
skrebbel
You sound like a PHP coder telling DHH to stop doing Rails 3 and get working
on some existing open source framework instead.

I know that HN is somewhat ignorant of the PHP community due to the large set
of idiots there and the _so not cool_ factor, but you're taking this to the
extreme. Symfony is probably one of the most decent and most widely used
pieces of open source PHP out there.

~~~
eropple
Sadly, Symfony/Symfony2 are not widely used _enough_. :/

(This may be a bit flippant, but seriously--there's not really a good reason
to be using stuff like CakePHP, etc. in 2011.)

~~~
joverholt
I may be in the process of updating a very neglected cakephp site. When I
created the site, I had heard of Symfony but went with cakephp. I've not
followed either framework for well over a year, so could you please give your
reasons for Symfony and against cakephp?

~~~
skrebbel
To my experience, Cake simply does not grow beyond their own blog tutorial.

Maybe they fixed this, but last time I used Cake, for instance, if you were
overriding hooks in the Model to e.g. change the data as returned to the
view/controller, you had to do this different depending on how the data was
collected. So in the same hook method of the BananaPeer, you either got a
single Banana, or an array of Banana objects, or an array with a key "Bananas"
which had an array of Banana objects. There was no way to figure this out
except with a lot of testing. There was no uniform way to implement standard
features and constraints inside the model.

Cake was full of this kind of shit. It was, simply, horribly badly designed
and to my impression only popular because its web site was pretty. The source
code was horribly undocumented and the internal SQL query building process was
a disaster.

~~~
eropple
Personally, I think that Cake was popular because it was one of the first
frameworks out there. It's been surpassed by all sorts of folks (Symfony2 now
chief among them).

I think that, next time someone asks me why Cake sucks, I'm just going to say
"BananaPeer" over and over again.

Because bananas don't have peers.

------
kayoone
have been using Symfony since 2007. Today it powers the backend and website of
my gaming startup and we still love it very much. Project is still SF 1.4
though, would love to upgrade to 2.0 but that would be too much work right now
as 2.0 changes alot of basic principles.

------
thesorrow
In the meantime Zend Framework folks are designing Zend Framework 2.0 for PHP
5.4. U mad symfony ? :)

------
AlexMuir
I highly recommend Yii ( <http://www.yiiframework.com/> ) for people looking
for a PHP framework. I've never used Symfony so can't compare the two, but Yii
has done everything I've asked of it.

~~~
andypants
I highly recommend Python for people looking into web development. I've never
used PHP so can't compare the two, but Python has done everything I've asked
of it.

 _(end joke)_

