Blog posts tagged with symfony
Nginx configuration for Symfony projects
Recent release of Nginx 1.0.0 triggered me to refresh my knowledge about its configuration options. There were quite some additions since I looked in the docs for the last time. New variables and directives let me to simplify my configuration for Symfony projects (both 1.x and 2).
Compiling doctrine in symfony 1.4
When profiling symfony 1.x applications hydrating Doctrine objects occurs to be one of the most time consuming operations. Recently I experienced something different. Loading ORM classes was one of the most expensive tasks. Usually such operations don't even show up during profiling.
Multistage deployment of Symfony applications with capifony
Capifony is a collection of Capistrano deployment recipes for both symfony and Symfony2 applications. Multistage is an extension for Capistrano which enables deployments to multiple servers with varying configurations or deployment procedures.
Heard in the Community (2010.08.08)
Jonathan Wage wrote on his blog about Doctrine Annotations Library. It's used in Doctrine2 ORM for mapping information specified in doc-blocks. I'm really excited about it, especially because it is an independent library. It makes it a perfect tool for meta-programming. I can't wait to put my hands on it!
Heard in the Community (2010.08.01)
Symfony2 development moves forward quickly. Last week the API documentation was generated and put online by Fabien Potencier. Also, the translation process is now described so translators can start contributing.
Symfony meets APC (Alternative PHP Cache)
Up to last week I was exclusively an XCache user if we talk about PHP accelerators. Recently I needed to use APC with a symfony application. As symfony offers nice APC integration it went quite smooth.
Reply to PHP 5.3 and the Future
Mark Evans wrote on his blog interesting post about PHP 5.3 and the Future. I guess the main concern here is similar we used to have with PHP4 to PHP5 migration (GoPHP5 campaign). Mark raised three questions to the community which I'd like to reply to.
Using SimpleXML with sfWebBrowser to parse html documents
sfWebBrowser is a class that emulates browser calls. It gives us nice object oriented interface to navigate through document structure in a programmed way. It can return response as SimpleXML which enables us to use xpath queries on the document being parsed. Unfortunately html pages are hardly ever XML valid documents. That's why in most cases sfWebBrowser rather throws and exception than returns something. Here is how we can write a workaround for it.
Put your stylesheets at the top and your scripts at the bottom
Putting the stylesheets at the top of your web page and moving the scripts to the bottom are only two of thirty four rules described in Best Practices for Speeding Up Your Website (by Yahoo). Following these two rules, however, can really decrease visible time of page rendering. I will present a simple solution to achieve this in symfony framework.
Looking at the website's source code
Most of the web programmers have some kind of deviation that tells them to look into the source code of the websites they visit. In many cases author planned to have nice indented output. In other cases author just didn't care.


















