flagception-bundle icon indicating copy to clipboard operation
flagception-bundle copied to clipboard

FeatureDataCollector should not be registered in kernel debug mode

Open ndench opened this issue 2 years ago • 3 comments

After upgrading to version 4.3 which hides the TraceableDataCollector when APP_DEBUG=0 (https://github.com/bestit/flagception-bundle/pull/89), I now get the following error when running tests with debug mode disabled:

TypeError: Flagception\Bundle\FlagceptionBundle\Profiler\FeatureDataCollector::__construct(): Argument #1 ($chainActivator) must be of type Flagception\Bundle\FlagceptionBundle\Activator\TraceableChainActivator, Flagception\Activator\ChainActivator given

I think that maybe the FeatureDataCollector should not be registered when debug mode is disabled? Or perhaps it just needs the data_collector tag removed?

ndench avatar Apr 29 '22 02:04 ndench

Is there any work around for this error? At the moment it seems i cannot turn debug mode off 😕

yakobe avatar Sep 01 '22 13:09 yakobe

I haven't found one. Although I'll admit I haven't looked very hard either. I just locked to a previous version.

I'm happy to submit a PR to fix it if someone can point me in the right direction.

ndench avatar Sep 02 '22 00:09 ndench

Hi.

temporary solution is forced service registration: Flagception\Bundle\FlagceptionBundle\Activator\TraceableChainActivator

flagception.activator.chain_activator:
      class: Flagception\Bundle\FlagceptionBundle\Activator\TraceableChainActivator

vitsadecky avatar Nov 22 '22 06:11 vitsadecky