title: Symfony: Using global variables
body: <p>I know... stay away from globals.</p>
  
  <p>The thing is I really, really, need to have a value that is accessible and, most important <strong>modifiable</strong> from different parts of the application. It's a counter for some actions that I need to watch for debug purposes. Googling for anything related to Symfony and globals, always got me to results that suggests using the Container parameters or Twig globals, but the thing is that according to Symfony documentation:</p>
  
  <blockquote>
    <p>You can only set a parameter before the container is compiled: not at run-time.</p>
  </blockquote>
  
  <p>The Twig globals are pretty much out of scope given that I need them in controller, not in view.</p>
  
  <p>IMHO, both of these solutions are more like constants than variables.</p>
  
  <p>So, the question is: Is there a best practice to obtain what I need using Symfony or should I just use the PHP globals? </p>
  
  <p>Thank you!</p>