Skip to content
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

Cannot setup for latest Symfony5.2.x #446

Closed
SCIF opened this issue Feb 17, 2021 · 9 comments
Closed

Cannot setup for latest Symfony5.2.x #446

SCIF opened this issue Feb 17, 2021 · 9 comments

Comments

@SCIF
Copy link

SCIF commented Feb 17, 2021

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
Bundled

Steps to Reproduce

  1. Setup Symfony 5.2
  2. composer require sentry/sentry-symfony dev-master

Expected Result

Success installation

Actual Result

Script cache:clear returned with error code 1
!!  
!!  In DefinitionErrorExceptionPass.php line 54:
!!                                                                                 
!!    Cannot autowire service "Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFacto  
!!    ry": argument "$serverRequestFactory" of method "__construct()" references   
!!    interface "Psr\Http\Message\ServerRequestFactoryInterface" but no such serv  
!!    ice exists. Did you create a class that implements this interface?           
!!                                                                                 
!!  
!!  
Script @auto-scripts was called via post-update-cmd

Quick digging gets me an idea of having prerequisite step composer require nyholm/psr7. Worked then.

@SCIF
Copy link
Author

SCIF commented Feb 17, 2021

@ste93cry
Copy link
Contributor

Albeit the error is slightly different, I think it's still related to #379. I've added a warning notice in the README about it a few days ago 😉

@ste93cry
Copy link
Contributor

I'm not sure I understand what the customization of the HTTP factory/transport has to do with the issue you have, so I assume you wanted to write the link to the notice which is present in the master branch and not yet in develop

@SCIF
Copy link
Author

SCIF commented Feb 17, 2021

@ste93cry , ah, I missed it as it was added to non-Flex installation instruction. But flex installations are affected as well

@ste93cry
Copy link
Contributor

Right 😃 When I added it at the bottom of the install instructions the intention was not to mean that it was affecting just the non-Flex method, but it looks so because it has no proper section title. A PR to move the notice around so that it's either more prominent or more clear about it affecting both ways of installation is welcome. Not sure which solution is the best though, since giving it a big header imho is not appropriate as it's a warning and not a section of the README

@SCIF
Copy link
Author

SCIF commented Feb 17, 2021

Looks like the installation process could be a little bit revised and made the single merged version:

  1. Explanation about psr-7. Install something if you didn't.
  2. composer require sentry/sentry-symfony // as common for both ways
  3. Do you use symfony/flex?
    2.1) if yes, then just click y
    2.2) otherwise, register the bundle in the Kernel

That's just my humble opinion and not the proper solution :) Sorry, I'm not going to make a PR for that because of lack of knowledge what's going on and pretty generic english skills :)

@ste93cry
Copy link
Contributor

I've opened a PR to improve the README. Give it a look if you want and let me know what you think 😉 In the meanwhile, I think we can close this, can't I?

@SCIF
Copy link
Author

SCIF commented Feb 22, 2021

Fixed in #452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants