Skip to content

Move to XML services and remove Yaml dependency #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 28, 2018
Merged

Move to XML services and remove Yaml dependency #155

merged 1 commit into from
Sep 28, 2018

Conversation

Pierstoval
Copy link
Contributor

I don't know why, but we had a bug on our project on production while upgrading to v2 of the bundle:

Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passed to Sentry\SentryBundle\EventListener\ExceptionListener::__construct() must be an instance of Raven_Client, instance of Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage given, called in /app/var/cache/prod/ContainerPhwac6d/appProdProjectContainer.php on line 1867 in /app/vendor/sentry/sentry-symfony/src/EventListener/ExceptionListener.php:54 Stack trace: #0 /app/var/cache/prod/ContainerPhwac6d/appProdProjectContainer.php(1867): Sentry\SentryBundle\EventListener\ExceptionListener->__construct(Object(Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage), Object(Symfony\Component\Security\Core\Authorization\AuthorizationChecker), Object(Sentry\SentryBundle\SentrySymfonyClient), Array, Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher)) #1 /app/var/cache/prod/ContainerPhwac6d/appProdProjectContainer.php(1069): ContainerPhwac6d\appProdProjectContainer->getS in /app/vendor/sentry/sentry-symfony/src/EventListener/ExceptionListener.php on line 54

I could reproduce this bug locally, and I couldn't find any problem.

First fix I tested was to name all arguments in the services.yml config file for the listener's definition, but when I thought about moving from Yaml to XML, everything started to work like a charm… at least locally.

Anyway, XML is better because it can help drop Yaml direct dependency, so let's propose this change here anyway 👍 (I hope I didn't make any mistake while migrationg 🤣 )

@Jean85
Copy link
Contributor

Jean85 commented Sep 28, 2018

This is a nice improvement! Can you solve the conflicts?

@Pierstoval
Copy link
Contributor Author

Done @Jean85 😄

@Jean85 Jean85 merged commit 7c76ba5 into getsentry:master Sep 28, 2018
@Pierstoval Pierstoval deleted the xml-services branch September 28, 2018 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants