title: Symfony 1.4 using deprecated functions in php 5.5
body: <p>I recently upgraded PHP from version 5.3.27 to 5.5.0. 
  Everything is working fine in my Symfony 2.3.2 project, and I can enjoy the latest PHP functionalities.</p>
  
  <p>Now when I am going back to my other Symfony 1.4.16 project, I get a PHP error about preg_replace being deprecated with the /e modifier.</p>
  
  <p>I can find no reference about this error in the forums: Has anyone had this problem before ? Is there any kind of patch that I could apply out of the box ? Is an upgrade to Symfony 1.4.20 going to fix this issue ?</p>
  
  <p>The error message goes like this:</p>
  
  <blockquote>
    <p>Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /myproject/lib/vendor/symfony/lib/response/sfWebResponse.class.php on line 409</p>
  </blockquote>
  
  <p>One way to go may be to modify the code as recommended in the message, and in the <a href="http://php.net/manual/en/function.preg-replace.php" rel="noreferrer">manual</a>. 
  How can I change my preg_replace expression to a preg_replace_callback call ?</p>
  
  <p>Any help / hint will be very welcome.</p>
  
  <p>EDIT:</p>
  
  <p>To this date, there is no patch for this (and Symfony 1.4.20 does not address the issue). The solution is to replace failing calls to preg_replace with corresponding call to preg_replace_callback in the sourche, which is easily done in the sfWebResponse class (thanks for the hint Jon). Now <a href="https://github.com/symfony/symfony1/blob/1.4/lib/util/sfToolkit.class.php#L362" rel="noreferrer">next failing occurrence</a> is slightly more complex, unfortunately... And on the other hand, we probably would have to grep for preg_replace uses with /e option in order to find out where Symfony is likely to break. Which gives quite a few results :o</p>
  
  <p>So... My conclusion would be that Symfony 1.4 users would better not upgrade PHP to version 5.5 until some serious patch comes out. What do you think ? Any alternative ?</p>