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

[4.x] Can't update sentry package to 4.x from symfony 4.4.19 #440

Closed
martygraphy opened this issue Feb 9, 2021 · 11 comments
Closed

[4.x] Can't update sentry package to 4.x from symfony 4.4.19 #440

martygraphy opened this issue Feb 9, 2021 · 11 comments

Comments

@martygraphy
Copy link

Environment

Which SDK and version?
PHP 7.4

Steps to Reproduce

Hello ,
I can't upgrade the symfony package to the latest version because the symfony/security module must be in ^4.4.11 on your package.

I encountred this error :

sentry/sentry-symfony [4.0.0, ..., 4.0.1] require symfony/security-core ^3.4.43||^4.4.11|^5.0.11 -> found symfony/security-core [v3.4.43, ..., v3.4.47, v4.4.11, ..., v4.4.19, v5.0.11, ..., v5.2.3] but it conflicts with another require.

Would it be possible to allow the use of 4.4.19 of this package?

Sincerely

@stayallive
Copy link
Collaborator

Hi there,

On 4.x we allow the following versions: ^3.4.43||^4.4.11||^5.0.11:

"symfony/security-core": "^3.4.43||^4.4.11||^5.0.11"

This should also include Symfony 4.4.19, but it looks like you might possibly be on a lower version or another package requires a lower version (we require at least 4.4.11).

Are you able to share your composer.json so we can possibly help you out a bit better?

@Jean85
Copy link
Collaborator

Jean85 commented Feb 10, 2021

composer why-not "symfony/security-core:^3.4.43||^4.4.11|^5.0.11" should also output the reason for this conflict.

@carlcasbolt
Copy link

Just hit this issue as well so cannot install it on Symfony 4.4.13

@stayallive
Copy link
Collaborator

stayallive commented Feb 11, 2021

@carlcasbolt can you please show us the output for:

composer why-not "symfony/security-core:^3.4.43||^4.4.11|^5.0.11"

And if possible share your full composer.json?

@carlcasbolt
Copy link

output

$ composer require sentry/sentry-symfony
Using version ^4.0 for sentry/sentry-symfony
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install symfony/console v4.4.19
    - Conclusion: don't install symfony/console v4.4.18
    - Conclusion: don't install symfony/console v4.4.17
    - Conclusion: don't install symfony/console v4.4.16
    - Conclusion: don't install symfony/console v4.4.15
    - Conclusion: don't install symfony/console v4.4.14
    - Conclusion: don't install symfony/console v4.4.13
    - Installation request for symfony/console (locked at v4.4.9, required as ^4.0) -> satisfiable by symfony/console[v4.4.9].
    - Conclusion: don't install symfony/console v4.4.12
    - sentry/sentry-symfony 4.0.0 requires symfony/console ^3.4.43||^4.4.11||^5.0.11 -> satisfiable by symfony/console[v4.4.11, v4.4.12, v4.4.13, v4.4.14, v4.4.15, v4.4.16, v4.4.17, v4.4.18, v4.4.19].
    - sentry/sentry-symfony 4.0.1 requires symfony/console ^3.4.43||^4.4.11||^5.0.11 -> satisfiable by symfony/console[v4.4.11, v4.4.12, v4.4.13, v4.4.14, v4.4.15, v4.4.16, v4.4.17, v4.4.18, v4.4.19].
    - Conclusion: don't install symfony/console v4.4.11
    - Installation request for sentry/sentry-symfony ^4.0 -> satisfiable by sentry/sentry-symfony[4.0.0, 4.0.1].


Installation failed, reverting ./composer.json to its original content.

composer.json

@carlcasbolt
Copy link

console version

$ bin/console --version
Symfony 4.4.13 (env: dev, debug: true)

I'll see if pulling the version up to the latest 4.4.x helps

@ste93cry
Copy link
Collaborator

ste93cry commented Feb 11, 2021

Installation request for symfony/console (locked at v4.4.9, required as ^4.0)

This is the culrprit of the issue: in the composer.lock the symfony/console version is locked at 4.4.9, but we require any version starting from 4.4.11 onwards. Please try running this command instead: composer require sentry/sentry-symfony --update-with-all-dependencies

@carlcasbolt
Copy link

getting a different error now that I have updated all packages

Console version:

$ bin/console --version
Symfony 4.4.19 (env: dev, debug: true)

Command:

composer require sentry/sentry-symfony
Using version ^4.0 for sentry/sentry-symfony
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 23 installs, 0 updates, 0 removals
  - Installing composer/package-versions-deprecated (1.11.99.1): Loading from cache
  - Installing symfony/security-core (v5.2.3): Loading from cache
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing symfony/psr-http-message-bridge (v2.0.2): Loading from cache
  - Installing symfony/http-client (v5.2.3): Loading from cache
  - Installing ralouphie/getallheaders (3.0.3): Loading from cache
  - Installing guzzlehttp/psr7 (1.7.0): Loading from cache
  - Installing psr/http-factory (1.0.1): Loading from cache
  - Installing http-interop/http-factory-guzzle (1.0.0): Loading from cache
  - Installing symfony/polyfill-uuid (v1.22.0): Loading from cache
  - Installing clue/stream-filter (v1.5.0): Loading from cache
  - Installing php-http/message-factory (v1.0.2): Loading from cache
  - Installing php-http/message (1.11.0): Loading from cache
  - Installing php-http/promise (1.1.0): Loading from cache
  - Installing psr/http-client (1.0.1): Loading from cache
  - Installing php-http/httplug (2.2.0): Loading from cache
  - Installing php-http/discovery (1.13.0): Loading from cache
  - Installing php-http/client-common (2.3.0): Loading from cache
  - Installing jean85/pretty-package-versions (1.6.0): Loading from cache
  - Installing guzzlehttp/promises (1.4.0): Loading from cache
  - Installing sentry/sentry (3.1.4): Loading from cache
  - Installing sentry/sdk (3.1.0)
  - Installing sentry/sentry-symfony (4.0.1): Loading from cache
Package sensiolabs/security-checker is abandoned, you should avoid using it. Use https://github.com/fabpot/local-php-security-checker instead.
Writing lock file
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
64 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Symfony operations: 1 recipe (27482162fab829d1004a28fd3fc0bd7e)
  -  WARNING  sentry/sentry-symfony (>=3.0): From github.com/symfony/recipes-contrib:master
    The recipe for this package comes from the "contrib" repository, which is open to community contributions.
    Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/sentry/sentry-symfony/3.0

    Do you want to execute this recipe?
    [y] Yes
    [n] No
    [a] Yes for all packages, only for the current installation session
    [p] Yes permanently, never ask again for this project
    (defaults to n): y
  - Configuring sentry/sentry-symfony (>=3.0): From github.com/symfony/recipes-contrib:master
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!  Symfony\Component\ErrorHandler\Error\ClassNotFoundError {#33
!!    #message: """
!!      Attempted to load class "Psr17Factory" from namespace "Nyholm\Psr7\Factory".\n
!!      Did you forget a "use" statement for another namespace?
!!      """
!!    #code: 0
!!    #file: "./var/cache/dev/ContainerF26mCEo/srcApp_KernelDevDebugContainer.php"
!!    #line: 3088
!!    trace: {
!!      ./var/cache/dev/ContainerF26mCEo/srcApp_KernelDevDebugContainer.php:3088 {
!!        ContainerF26mCEo\srcApp_KernelDevDebugContainer->getSensioFrameworkExtra_Psr7_HttpMessageFactoryService()
!!        › {
!!        ›     $a = ($this->privates['nyholm.psr7.psr17_factory'] ?? ($this->privates['nyholm.psr7.psr17_factory'] = new \Nyholm\Psr7\Factory\Psr17Factory()));
!!        › 
!!      }
!!      ./var/cache/dev/ContainerF26mCEo/srcApp_KernelDevDebugContainer.php:1482 { …}
!!      ./var/cache/dev/ContainerF26mCEo/srcApp_KernelDevDebugContainer.php:1438 { …}
!!      ./var/cache/dev/ContainerF26mCEo/srcApp_KernelDevDebugContainer.php:679 { …}
!!      ./vendor/symfony/event-dispatcher/EventDispatcher.php:279 { …}
!!      ./vendor/symfony/event-dispatcher/EventDispatcher.php:90 { …}
!!      ./vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:334 { …}
!!      ./vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:162 { …}
!!      ./vendor/symfony/console/Application.php:1024 { …}
!!      ./vendor/symfony/framework-bundle/Console/Application.php:97 { …}
!!      ./vendor/symfony/console/Application.php:273 { …}
!!      ./vendor/symfony/framework-bundle/Console/Application.php:83 { …}
!!      ./vendor/symfony/console/Application.php:149 { …}
!!      ./bin/console:42 { …}
!!    }
!!  }
!!  2021-02-11T12:17:46+00:00 [critical] Uncaught Error: Class 'Nyholm\Psr7\Factory\Psr17Factory' not found
!!  
Script @auto-scripts was called via post-update-cmd

Installation failed, reverting ./composer.json to its original content.

@ste93cry
Copy link
Collaborator

Sadly, you're one more person that got hit by #379. Apart from writing some note in the README about the issue, I don't think there is nothing on our side that we can do to improve things: will do it asap as it's a too frequent issue to ignore it

@ste93cry
Copy link
Collaborator

Since the original author of this issue didn't answer anymore I take for granted that the issue has been solved. Feel free to reopen should you have still need for help

@alcohol
Copy link

alcohol commented Mar 4, 2021

FYI this seems related composer/composer#9749

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

6 participants