jonaswouters / XhprofBundle

XHProf bundle for Symfony 2
210 stars 49 forks source link

Throw error if bundle is enabled but xhprof library is not #61

Closed mathielen closed 9 years ago

mathielen commented 10 years ago

Bundle should not be enabled if extension is not present.

Metabor commented 9 years ago

OK now the change is in and I can not use the same code on a windows machine (no xhprof available there) after updating this bundle that only on some testing server should profile. adding something like: if (function_exists('xhprof_enable')) { $bundles[] = new Jns\Bundle\XhprofBundle\JnsXhprofBundle(); } doesn't work, because then I got problems with: "There is no extension able to load the configuration for "jns_xhprof"" Any idea how I can share the same codebase without having the xhprof installed everywhere.

Metabor commented 9 years ago

Now I solved it by putting the value for enabled into parameter.yml so I can set it for each machine individual without having different configs_dev.yml on it. Maybe this will help someone else who trapped also into this problem.