php - How to set application version for Symfony WebProfiler? -


according this commit can set own application name , version webprofiler. i'm asking myself (and ^^) what's intended way this?

/**  * constructor.  *  * @param string $name name of application using web profiler  * @param string $version version of application using web profiler  */  public function __construct($name = null, $version = null)  {      $this->name = $name;      $this->version = $version;  } 

the collector defined in configdatacollector of httpkernel component , constructor has 2 parameters defaulting null. service configured in collectors.xml of frameworkbundle, there's no way set parameters.

i've overriden collector class setting data_collector.config.class in app/config/config.yml , injecting application's version way... totally feels wrong.

do miss something?

the commit message says (emphasis mine):

[webprofiler] added possibility override application name/version in wdt

i presume way way did it, is, use own class extends symfony\component\httpkernel\datacollector\configdatacollector , override constructor set properties (name , version).

if knows better way it, it'd appreciated!


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -