SoCloz / SoclozMonitoringBundle

A profiling/monitoring Symfony2 bundle for production servers - alerts on exceptions, logs profiling data & sends data to statsd/graphite
MIT License
69 stars 6 forks source link

Fix error when using Symfony annotations on controller action #17

Closed jdecool closed 8 years ago

jdecool commented 8 years ago

When using the mailer, the template render attributes property of the Request. This property can contain object if we use some annotation of the SensionExtraFrameworkBundle which cause an exception on template rendering.

Example :

/**
 * @Route("/", name="homepage")
 * @Method({"GET", "POST"})
 */
public function indexAction(Request $request)
{
    return $this->render('default/index.html.twig', [
        'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..'),
    ]);
}

This PR is for fixing that issue. It introduce a MailerTransform to convert each properties to an array or a scalar value.

mhor commented 8 years ago

LGTM, ping @NoiseByNorthwest

jdecool commented 8 years ago

Hey, some news about this PR ?

It fix an error we currently have in production.

Thanks.

mhor commented 8 years ago

Thanks @jdecool . released as 1.2.3 . Sorry for late reply/merge

jdecool commented 8 years ago

Great ! Thank you.

A small contribution for a bundle we use in our production apps :)