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

Error: Cannot install, require errors #1132

Closed
EnterVPL opened this issue Mar 24, 2023 · 4 comments
Closed

Error: Cannot install, require errors #1132

EnterVPL opened this issue Mar 24, 2023 · 4 comments

Comments

@EnterVPL
Copy link

Hi,

I create app with using Api Platoform and I need install lexik/jwt-authentication-bundle but I got some errors. I trying using command from the official doc https://api-platform.com/docs/core/jwt/ but it not helped.

I think it's just a php version bug but I can't downgrade it.
Can anyone help me?

My error is:

Problem 1
    - lexik/jwt-authentication-bundle[v1.4.0, ..., v1.7.1] require symfony/framework-bundle ~2.3|~3.0 -> satisfiable by symfony/symfony[v2.3.0, ..., v2.8.52].
    - lexik/jwt-authentication-bundle[v1.0.0, ..., v1.3.1] require symfony/symfony ~2.3 -> satisfiable by symfony/symfony[v2.3.0, ..., v2.8.52].
    - lexik/jwt-authentication-bundle[v2.0.0, ..., v2.7.0] require php ^5.5|^7.0 -> your php version (8.2.3) does not satisfy that requirement.
    - symfony/symfony[v2.3.0, ..., v2.6.1] require doctrine/common ~2.2 -> found doctrine/common[2.2.0, ..., 2.13.3] but the package is fixed to 3.4.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - symfony/symfony[v2.3.24, ..., v2.7.4] require doctrine/common ~2.3 -> found doctrine/common[2.3.0, ..., 2.13.3] but the package is fixed to 3.4.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - symfony/symfony[v2.3.33, ..., v2.8.52] require doctrine/common ~2.4 -> found doctrine/common[v2.4.0, ..., 2.13.3] but the package is fixed to 3.4.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - lexik/jwt-authentication-bundle[v2.8.0, ..., v2.9.0] require php ^5.6|^7.0 -> your php version (8.2.3) does not satisfy that requirement.
    - lexik/jwt-authentication-bundle v2.10.0 requires lcobucci/jwt ^3.2 -> found lcobucci/jwt[3.2.0, ..., 3.4.6] but it conflicts with your root composer.json require (^5.0).
    - lexik/jwt-authentication-bundle[v2.10.1, ..., v2.10.7] require lcobucci/jwt ^3.2|^4.0 -> found lcobucci/jwt[3.2.0, ..., 3.4.6, 4.0.0, ..., 4.3.0] but it conflicts with your root composer.json require (^5.0).
    - lexik/jwt-authentication-bundle[v2.11.0, ..., v2.18.1] require lcobucci/jwt ^3.4|^4.0 -> found lcobucci/jwt[3.4.0, ..., 3.4.6, 4.0.0, ..., 4.3.0] but it conflicts with your root composer.json require (^5.0).
    - Root composer.json requires lexik/jwt-authentication-bundle * -> satisfiable by lexik/jwt-authentication-bundle[v1.0.0, ..., v1.7.1, v2.0.0, ..., v2.18.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require lexik/jwt-authentication-bundle:*" to figure out if any version is installable, or "composer require lexik/jwt-authentication-bundle:^2.1" if you know which you need.

composer.json requires:

{    
    "require": {
        "php": ">=8.2",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "api-platform/core": "^3.1",
        "doctrine/doctrine-bundle": "^2.7",
        "doctrine/doctrine-migrations-bundle": "^3.2",
        "doctrine/orm": "^2.12",
        "lcobucci/jwt": "^5.0",
        "nelmio/cors-bundle": "^2.2",
        "phpdocumentor/reflection-docblock": "^5.3",
        "symfony/asset": "6.2.*",
        "symfony/console": "6.2.*",
        "symfony/dotenv": "6.2.*",
        "symfony/event-dispatcher": "6.2.*",
        "symfony/expression-language": "6.2.*",
        "symfony/flex": "^2.2",
        "symfony/framework-bundle": "6.2.*",
        "symfony/intl": "6.2.*",
        "symfony/mercure-bundle": "^0.3.5",
        "symfony/messenger": "6.2.*",
        "symfony/monolog-bundle": "^3.8",
        "symfony/property-access": "6.2.*",
        "symfony/property-info": "6.2.*",
        "symfony/runtime": "6.2.*",
        "symfony/security-bundle": "6.2.*",
        "symfony/serializer": "6.2.*",
        "symfony/twig-bundle": "6.2.*",
        "symfony/uid": "6.2.*",
        "symfony/validator": "6.2.*",
        "symfony/yaml": "6.2.*"
    },
    "require-dev": {
        "api-platform/schema-generator": "^5.2",
        "symfony/browser-kit": "6.2.*",
        "symfony/css-selector": "6.2.*",
        "symfony/debug-bundle": "6.2.*",
        "symfony/maker-bundle": "^1.44",
        "symfony/phpunit-bridge": "6.2.*",
        "symfony/stopwatch": "6.2.*",
        "symfony/var-dumper": "6.2.*",
        "symfony/web-profiler-bundle": "6.2.*"
    }
}

composer show

api-platform/core                   v3.1.5  Build a fully-featured hypermedia or GraphQL API in minutes!
api-platform/schema-generator       v5.2.0  Various tools to generate a data model based on Schema.org vocables
cebe/php-openapi                    1.7.0   Read and write OpenAPI yaml/json files and make the content accessable in PHP objects.
composer/pcre                       3.1.0   PCRE wrapping library that offers type-safe preg_* replacements.
composer/semver                     3.3.2   Semver library that offers utilities, version constraint parsing and validation.
composer/xdebug-handler             3.0.3   Restarts a process without Xdebug.
doctrine/annotations                2.0.1   Docblock Annotations Parser
doctrine/cache                      2.2.0   PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redi...
doctrine/collections                2.1.2   PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.
doctrine/common                     3.4.3   PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects d...
doctrine/dbal                       3.6.1   Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and manage...
doctrine/deprecations               v1.0.0  A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecat...
doctrine/doctrine-bundle            2.9.0   Symfony DoctrineBundle
doctrine/doctrine-migrations-bundle 3.2.2   Symfony DoctrineMigrationsBundle
doctrine/event-manager              2.0.0   The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine pr...
doctrine/inflector                  2.0.6   PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase...
doctrine/instantiator               1.5.0   A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                      2.1.0   PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations                 3.6.0   PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL)...
doctrine/orm                        2.14.1  Object-Relational-Mapper for PHP
doctrine/persistence                3.1.4   The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine o...
doctrine/sql-formatter              1.1.3   a PHP SQL highlighting library
friendsofphp/php-cs-fixer           v3.15.1 A tool to automatically fix PHP code style
justinrainbow/json-schema           5.2.12  A library to validate a json schema.
lcobucci/jwt                        5.0.0   A simple library to work with JSON Web Token and JSON Web Signature
league/html-to-markdown             5.1.0   An HTML-to-markdown conversion helper for PHP
masterminds/html5                   2.7.6   An HTML5 parser and serializer.
monolog/monolog                     3.3.1   Sends your logs to files, sockets, inboxes, databases and various web services
nelmio/cors-bundle                  2.3.1   Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application
nette/php-generator                 v4.0.6  🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.2 features.
nette/utils                         v4.0.0  🛠  Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/d...
nikic/php-parser                    v4.15.4 A PHP parser written in PHP
phpdocumentor/reflection-common     2.2.0   Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock   5.3.0   With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve informa...
phpdocumentor/type-resolver         1.6.2   A PSR-5 based resolver of Class names, Types and Structural Element Names
psr/cache                           3.0.0   Common interface for caching libraries
psr/clock                           1.0.0   Common interface for reading the clock.
psr/container                       2.0.2   Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher                1.0.0   Standard interfaces for event handling.
psr/link                            2.0.1   Common interfaces for HTTP links
psr/log                             3.0.0   Common interface for logging libraries
sebastian/diff                      5.0.1   Diff implementation
sweetrdf/easyrdf                    1.8.0   EasyRdf is a PHP library designed to make it easy to consume and produce RDF.
symfony/asset                       v6.2.7  Manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files
symfony/browser-kit                 v6.2.7  Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms progra...
symfony/cache                       v6.2.7  Provides extended PSR-6, PSR-16 (and tags) implementations
symfony/cache-contracts             v3.2.1  Generic abstractions related to caching
symfony/config                      v6.2.7  Helps you find, load, combine, autofill and validate configuration values of any kind
symfony/console                     v6.2.7  Eases the creation of beautiful and testable command line interfaces
symfony/css-selector                v6.2.7  Converts CSS selectors to XPath expressions
symfony/debug-bundle                v6.2.7  Provides a tight integration of the Symfony VarDumper component and the ServerLogCommand from MonologBridge in...
symfony/dependency-injection        v6.2.7  Allows you to standardize and centralize the way objects are constructed in your application
symfony/deprecation-contracts       v3.2.1  A generic function and convention to trigger deprecation notices
symfony/doctrine-bridge             v6.2.7  Provides integration for Doctrine with various Symfony components
symfony/dom-crawler                 v6.2.7  Eases DOM navigation for HTML and XML documents
symfony/dotenv                      v6.2.7  Registers environment variables from a .env file
symfony/error-handler               v6.2.7  Provides tools to manage errors and ease debugging PHP code
symfony/event-dispatcher            v6.2.7  Provides tools that allow your application components to communicate with each other by dispatching events and...
symfony/event-dispatcher-contracts  v3.2.1  Generic abstractions related to dispatching event
symfony/expression-language         v6.2.7  Provides an engine that can compile and evaluate expressions
symfony/filesystem                  v6.2.7  Provides basic utilities for the filesystem
symfony/finder                      v6.2.7  Finds files and directories via an intuitive fluent interface
symfony/flex                        v2.2.5  Composer plugin for Symfony
symfony/framework-bundle            v6.2.7  Provides a tight integration between Symfony components and the Symfony full-stack framework
symfony/http-client                 v6.2.7  Provides powerful methods to fetch HTTP resources synchronously or asynchronously
symfony/http-client-contracts       v3.2.1  Generic abstractions related to HTTP clients
symfony/http-foundation             v6.2.7  Defines an object-oriented layer for the HTTP specification
symfony/http-kernel                 v6.2.7  Provides a structured process for converting a Request into a Response
symfony/intl                        v6.2.7  Provides a PHP replacement layer for the C intl extension that includes additional data from the ICU library
symfony/maker-bundle                v1.48.0 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget abo...
symfony/mercure                     v0.6.3  Symfony Mercure Component
symfony/mercure-bundle              v0.3.6  Symfony MercureBundle
symfony/messenger                   v6.2.7  Helps applications send and receive messages to/from other applications or via message queues
symfony/monolog-bridge              v6.2.7  Provides integration for Monolog with various Symfony components
symfony/monolog-bundle              v3.8.0  Symfony MonologBundle
symfony/options-resolver            v6.2.7  Provides an improved replacement for the array_replace PHP function
symfony/password-hasher             v6.2.7  Provides password hashing utilities
symfony/phpunit-bridge              v6.2.7  Provides utilities for PHPUnit, especially user deprecation notices management
symfony/polyfill-uuid               v1.27.0 Symfony polyfill for uuid functions
symfony/process                     v6.2.7  Executes commands in sub-processes
symfony/property-access             v6.2.7  Provides functions to read and write from/to an object or array using a simple string notation
symfony/property-info               v6.2.7  Extracts information about PHP class' properties using metadata of popular sources
symfony/routing                     v6.2.7  Maps an HTTP request to a set of configuration variables
symfony/runtime                     v6.2.7  Enables decoupling PHP applications from global state
symfony/security-bundle             v6.2.7  Provides a tight integration of the Security component into the Symfony full-stack framework
symfony/security-core               v6.2.7  Symfony Security Component - Core Library
symfony/security-csrf               v6.2.7  Symfony Security Component - CSRF Library
symfony/security-http               v6.2.7  Symfony Security Component - HTTP Integration
symfony/serializer                  v6.2.7  Handles serializing and deserializing data structures, including object graphs, into array structures or other...
symfony/service-contracts           v3.2.1  Generic abstractions related to writing services
symfony/stopwatch                   v6.2.7  Provides a way to profile code
symfony/string                      v6.2.7  Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a ...
symfony/translation-contracts       v3.2.1  Generic abstractions related to translation
symfony/twig-bridge                 v6.2.7  Provides integration for Twig with various Symfony components
symfony/twig-bundle                 v6.2.7  Provides a tight integration of Twig into the Symfony full-stack framework
symfony/uid                         v6.2.7  Provides an object-oriented API to generate and represent UIDs
symfony/validator                   v6.2.7  Provides tools to validate values
symfony/var-dumper                  v6.2.7  Provides mechanisms for walking through any arbitrary PHP variable
symfony/var-exporter                v6.2.7  Allows exporting any serializable PHP data structure to plain PHP code
symfony/web-link                    v6.2.7  Manages links between resources
symfony/web-profiler-bundle         v6.2.7  Provides a development tool that gives detailed information about the execution of any request
symfony/yaml                        v6.2.7  Loads and dumps YAML files
twig/twig                           v3.5.1  Twig, the flexible, fast, and secure template language for PHP
webmozart/assert                    1.11.0  Assertions to validate method input/output with nice error messages.
willdurand/negotiation              3.1.0   Content Negotiation tools for PHP provided as a standalone library.
@EnterVPL
Copy link
Author

EnterVPL commented Mar 24, 2023

To get around the problem, I did the following:

  1. Downgrade lcobucci/jwt version to 4.3.0
  2. Use composer require lexik/jwt-authentication-bundle:^2.6 --ignore-platform-req=php -W command to install

I don't think this is a solution, but it will allow me to continue working

@mbabker
Copy link
Contributor

mbabker commented Mar 24, 2023

You need to wait for #1125 to ship to use lcobucci/jwt 5.0.

@chalasr chalasr closed this as completed Dec 1, 2023
@rohankumar1524
Copy link

rohankumar1524 commented Apr 17, 2024

@EnterVPL Instead of passing a version you can use * like
composer require lexik/jwt-authentication-bundle:* --ignore-platform-req=php -W

This works for me in PHP 8.2, Symfony 7

@Axel-Student
Copy link

@EnterVPL Instead of passing a version you can use * like composer require lexik/jwt-authentication-bundle:* --ignore-platform-req=php -W

This works for me in PHP 8.2, Symfony 7

THANK YOU it work

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

No branches or pull requests

5 participants