You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.
The hard dependency in composer.json on Twig can get removed, and the Twig related service definitions only have to get loaded when profiler is available and enabled.
Why?
Right now Twig is a hard requirement, although Twig does not need to be a dependency in this bundle.
As a result Twig will get loaded in production for API applications that don't use Twig
Twig solely is needed when the profiler is available and enabled in userland.
Hi @rvanlaak. I agree with your proposition. We could move out the Twig dependency, however it is important to note that the reason why it is here is that templates and extensions depend on specific versions of Twig. Hence the dependency is here in order to ensure that only compatible versions of Twig are pulled, or that only a bundle compatible with the version of Twig used by the project is pulled.
I would be delighted if we could either move the Twig dependency to suggests, but that won't help restrict the actual version of Twig (which is used to ensure backward compatibility).
However, I definitely agree with the extension loading service definitions when the profiler class exists.
If you wish to open a PR, I would be glad to review it and merge it.
The hard dependency in
composer.json
on Twig can get removed, and the Twig related service definitions only have to get loaded whenprofiler
is available and enabled.Why?
Right now Twig is a hard requirement, although Twig does not need to be a dependency in this bundle.
The minimum usage gets visible when searching the codebase for Twig, it all is related to the profiler.
If userland did require
symfony/web-profiler-bundle
, that will take care of requiringtwig/twig
(see related composer.json).Proposed solution
CsaGuzzleExtension
load service definitions when profiler class exists (instead of removing them when disabled)The text was updated successfully, but these errors were encountered: