xyNNN / GoogleTagManagerBundle

Google Tag Manager Bundle for Symfony 2
https://github.com/xyNNN/GoogleTagManagerBundle
GNU Lesser General Public License v3.0
27 stars 15 forks source link

Add state resetting at the end of the request #31

Closed dnna closed 6 years ago

dnna commented 6 years ago

When using this plugin with https://github.com/php-pm/php-pm the events are added multiple times because they are saved internally and carried over to the next request. This PR fixes this by using Symfony's kernel.reset tag that is designed for this purpose.

stefandoorn commented 6 years ago

@dnna Got some docs about that kernel.reset event? Can't find anything, but would like to read about it :-)

dnna commented 6 years ago

I don't think its well documented but you can read about it in https://github.com/symfony/symfony/issues/23984 and https://github.com/symfony/symfony/pull/24155 :)

stefandoorn commented 6 years ago

Looks good to me :-)

xyNNN commented 6 years ago

I will give you asap feedback, merge it and create a new release ;)

xyNNN commented 6 years ago

Looks also good to me, thank you for your contribution @dnna and @stefandoorn for your review 👍