Open mathroc opened 8 years ago
Hi @mathroc, I'm actually not very happy with the hardcoding of the filter and function either.
The SecurityBundle
only requires symfony/yaml
in dev but needs them to dump collected data in the profiler panel.
I think we could use composer suggestion in SecurityBundle
for both symfony/twig-bridge
and symfony/yaml
and suggest the symfony/security-bundle
in this repo.
All these suggestions for using the data collector.
Any thought on how to improve that would be helpful, thanks!
maybe we could just require symfony/yaml
and symfony/security-bundle
here. it would install a few useless things sometimes but would have a the benefit of making everything works without intervention.
I would even go as far as adding every "optional" dependencies to silex/web-profiler
as required dependencies and remove all class_exists
from the WebProfilerServiceProvider.php.
I always find it annoying to manually composer require --dev
those packages just to make the profiler work.
Perhaps a short-term solution would be to add a suggest
with a note to install symfony/yaml
too if you are using the security panel? The composer would pop that message only if the package is not installed.
the security panel does not work without the symfony/yaml package
I don't think it can be added to composer.json dependencies (unless symfony/security-bundle is also added)
maybe
dump
orvar_dump
can used when theYaml
class does not exists ?