barryvdh / laravel-ide-helper

IDE Helper for Laravel
MIT License
14.14k stars 1.16k forks source link

Unable to be installed on a new laravel installation #1261

Closed tkuijer closed 7 months ago

tkuijer commented 2 years ago

Versions:

Description:

After creating a new laravel application I am unable to install the laravel-ide-helper due to an error being thrown by composer.

Steps To Reproduce:

Expected Result:

The ide-helper is installed

Actual Result:

Composer throwing an error:

Using version ^2.10 for barryvdh/laravel-ide-helper
./composer.json has been updated
Running composer update barryvdh/laravel-ide-helper
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - composer/composer[dev-master, 2.0.14, ..., 2.1.9] require psr/log ^1.0 -> found psr/log[1.0.0, ..., 1.1.4] but the package is fixed to 2.0.0 (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.
    - composer/composer[1.10.18, ..., 1.10.x-dev] require composer/semver ^1.0 -> found composer/semver[1.0.0, ..., 1.x-dev] but the package is fixed to 3.2.5 (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.
    - composer/composer[1.6.0-RC, ..., 1.10.17, 2.0.0-alpha1] require php ^5.3.2 || ^7.0 -> your php version (8.0.10) does not satisfy that requirement.
    - composer/composer[2.0.0-alpha2, ..., 2.0.13] require composer/xdebug-handler ^1.1 -> found composer/xdebug-handler[1.1.0, ..., 1.4.x-dev] but the package is fixed to 2.0.2 (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.
    - barryvdh/laravel-ide-helper v2.10.0 requires composer/composer ^1.6 || ^2 -> satisfiable by composer/composer[1.6.0-RC, ..., 1.10.x-dev, 2.0.0-alpha1, ..., 2.1.x-dev (alias of dev-master)].
    - composer/composer 2.1.x-dev is an alias of composer/composer dev-master and thus requires it to be installed too.
    - Root composer.json requires barryvdh/laravel-ide-helper ^2.10 -> satisfiable by barryvdh/laravel-ide-helper[v2.10.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
tkuijer commented 2 years ago

When constraining the version of the psr/log to ^1.0 the installation is succesful:

composer require psr/log:^1.0
araeuchle commented 2 years ago

Can confirm that fixing psr/log helps! Thank you for exposing the answer @tkuijer :)

ghuniyu commented 2 years ago

just tried and not working on "laravel/framework": "^8.54" (v8.63.0)

\$ composer require psr/log:^1.0 -W


Running composer update psr/log --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

vrajroham commented 2 years ago

Thanks @tkuijer

composer require psr/log:^1.0

Works for me.

go5ub commented 2 years ago

Having the same issue:

Your requirements could not be resolved to an installable set of packages.

Problem 1

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

mfn commented 2 years ago

Having the same issue:

Please try the fix in https://github.com/barryvdh/laravel-ide-helper/issues/1261#issuecomment-934637120

Please paste the full log output of composer (so it also includes the exact same command).

Is this maybe fixed with the latest laravel/framework? At least when installing from scratch, there are no issues:

~/tmp $ composer ccomposer create-project laravel/laravel ide-helper-test
Creating a "laravel/laravel" project at "./ide-helper-test"
Installing laravel/laravel (v8.6.3)
  - Downloading laravel/laravel (v8.6.3)
  - Installing laravel/laravel (v8.6.3): Extracting archive
Created project in /Users/neo/tmp/ide-helper-test
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies
Lock file operations: 111 installs, 0 updates, 0 removals
  - Locking asm89/stack-cors (v2.0.3)
  - Locking brick/math (0.9.3)
  - Locking dflydev/dot-access-data (v3.0.1)
  - Locking doctrine/inflector (2.0.3)
  - Locking doctrine/instantiator (1.4.0)
  - Locking doctrine/lexer (1.2.1)
  - Locking dragonmantank/cron-expression (v3.1.0)
  - Locking egulias/email-validator (2.1.25)
  - Locking facade/flare-client-php (1.9.1)
  - Locking facade/ignition (2.15.0)
  - Locking facade/ignition-contracts (1.0.2)
  - Locking fakerphp/faker (v1.16.0)
  - Locking filp/whoops (2.14.4)
  - Locking fruitcake/laravel-cors (v2.0.4)
  - Locking graham-campbell/result-type (v1.0.2)
  - Locking guzzlehttp/guzzle (7.3.0)
  - Locking guzzlehttp/promises (1.5.0)
  - Locking guzzlehttp/psr7 (2.1.0)
  - Locking hamcrest/hamcrest-php (v2.0.1)
  - Locking laravel/framework (v8.64.0)
  - Locking laravel/sail (v1.12.0)
  - Locking laravel/sanctum (v2.11.3)
  - Locking laravel/serializable-closure (v1.0.3)
  - Locking laravel/tinker (v2.6.2)
  - Locking league/commonmark (2.0.2)
  - Locking league/config (v1.1.1)
  - Locking league/flysystem (1.1.5)
  - Locking league/mime-type-detection (1.8.0)
  - Locking mockery/mockery (1.4.4)
  - Locking monolog/monolog (2.3.5)
  - Locking myclabs/deep-copy (1.10.2)
  - Locking nesbot/carbon (2.53.1)
  - Locking nette/schema (v1.2.1)
  - Locking nette/utils (v3.2.5)
  - Locking nikic/php-parser (v4.13.0)
  - Locking nunomaduro/collision (v5.10.0)
  - Locking opis/closure (3.6.2)
  - Locking phar-io/manifest (2.0.3)
  - Locking phar-io/version (3.1.0)
  - Locking phpdocumentor/reflection-common (2.2.0)
  - Locking phpdocumentor/reflection-docblock (5.2.2)
  - Locking phpdocumentor/type-resolver (1.5.1)
  - Locking phpoption/phpoption (1.8.0)
  - Locking phpspec/prophecy (1.14.0)
  - Locking phpunit/php-code-coverage (9.2.7)
  - Locking phpunit/php-file-iterator (3.0.5)
  - Locking phpunit/php-invoker (3.1.1)
  - Locking phpunit/php-text-template (2.0.4)
  - Locking phpunit/php-timer (5.0.3)
  - Locking phpunit/phpunit (9.5.10)
  - Locking psr/container (1.1.1)
  - Locking psr/event-dispatcher (1.0.0)
  - Locking psr/http-client (1.0.1)
  - Locking psr/http-factory (1.0.1)
  - Locking psr/http-message (1.0.1)
  - Locking psr/log (1.1.4)
  - Locking psr/simple-cache (1.0.1)
  - Locking psy/psysh (v0.10.9)
  - Locking ralouphie/getallheaders (3.0.3)
  - Locking ramsey/collection (1.2.2)
  - Locking ramsey/uuid (4.2.3)
  - Locking sebastian/cli-parser (1.0.1)
  - Locking sebastian/code-unit (1.0.8)
  - Locking sebastian/code-unit-reverse-lookup (2.0.3)
  - Locking sebastian/comparator (4.0.6)
  - Locking sebastian/complexity (2.0.2)
  - Locking sebastian/diff (4.0.4)
  - Locking sebastian/environment (5.1.3)
  - Locking sebastian/exporter (4.0.3)
  - Locking sebastian/global-state (5.0.3)
  - Locking sebastian/lines-of-code (1.0.3)
  - Locking sebastian/object-enumerator (4.0.4)
  - Locking sebastian/object-reflector (2.0.4)
  - Locking sebastian/recursion-context (4.0.4)
  - Locking sebastian/resource-operations (3.0.3)
  - Locking sebastian/type (2.3.4)
  - Locking sebastian/version (3.0.2)
  - Locking swiftmailer/swiftmailer (v6.2.7)
  - Locking symfony/console (v5.3.7)
  - Locking symfony/css-selector (v5.3.4)
  - Locking symfony/deprecation-contracts (v2.4.0)
  - Locking symfony/error-handler (v5.3.7)
  - Locking symfony/event-dispatcher (v5.3.7)
  - Locking symfony/event-dispatcher-contracts (v2.4.0)
  - Locking symfony/finder (v5.3.7)
  - Locking symfony/http-client-contracts (v2.4.0)
  - Locking symfony/http-foundation (v5.3.7)
  - Locking symfony/http-kernel (v5.3.9)
  - Locking symfony/mime (v5.3.8)
  - Locking symfony/polyfill-ctype (v1.23.0)
  - Locking symfony/polyfill-iconv (v1.23.0)
  - Locking symfony/polyfill-intl-grapheme (v1.23.1)
  - Locking symfony/polyfill-intl-idn (v1.23.0)
  - Locking symfony/polyfill-intl-normalizer (v1.23.0)
  - Locking symfony/polyfill-mbstring (v1.23.1)
  - Locking symfony/polyfill-php72 (v1.23.0)
  - Locking symfony/polyfill-php73 (v1.23.0)
  - Locking symfony/polyfill-php80 (v1.23.1)
  - Locking symfony/polyfill-php81 (v1.23.0)
  - Locking symfony/process (v5.3.7)
  - Locking symfony/routing (v5.3.7)
  - Locking symfony/service-contracts (v2.4.0)
  - Locking symfony/string (v5.3.7)
  - Locking symfony/translation (v5.3.9)
  - Locking symfony/translation-contracts (v2.4.0)
  - Locking symfony/var-dumper (v5.3.8)
  - Locking theseer/tokenizer (1.2.1)
  - Locking tijsverkoyen/css-to-inline-styles (2.2.3)
  - Locking vlucas/phpdotenv (v5.3.1)
  - Locking voku/portable-ascii (1.5.6)
  - Locking webmozart/assert (1.10.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 111 installs, 0 updates, 0 removals
  - Downloading facade/ignition-contracts (1.0.2)
  - Downloading facade/flare-client-php (1.9.1)
  - Downloading facade/ignition (2.15.0)
  - Downloading asm89/stack-cors (v2.0.3)
  - Downloading psr/http-client (1.0.1)
  - Downloading guzzlehttp/promises (1.5.0)
  - Downloading guzzlehttp/guzzle (7.3.0)
  - Downloading laravel/sail (v1.12.0)
  - Downloading laravel/sanctum (v2.11.3)
  - Downloading psy/psysh (v0.10.9)
  - Downloading laravel/tinker (v2.6.2)
  - Downloading filp/whoops (2.14.4)
  - Downloading nunomaduro/collision (v5.10.0)
  - Installing doctrine/inflector (2.0.3): Extracting archive
  - Installing doctrine/lexer (1.2.1): Extracting archive
  - Installing symfony/polyfill-ctype (v1.23.0): Extracting archive
  - Installing webmozart/assert (1.10.0): Extracting archive
  - Installing dragonmantank/cron-expression (v3.1.0): Extracting archive
  - Installing symfony/polyfill-php80 (v1.23.1): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.23.1): Extracting archive
  - Installing symfony/var-dumper (v5.3.8): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.23.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.23.1): Extracting archive
  - Installing symfony/string (v5.3.7): Extracting archive
  - Installing psr/container (1.1.1): Extracting archive
  - Installing symfony/service-contracts (v2.4.0): Extracting archive
  - Installing symfony/polyfill-php73 (v1.23.0): Extracting archive
  - Installing symfony/deprecation-contracts (v2.4.0): Extracting archive
  - Installing symfony/console (v5.3.7): Extracting archive
  - Installing psr/log (1.1.4): Extracting archive
  - Installing monolog/monolog (2.3.5): Extracting archive
  - Installing voku/portable-ascii (1.5.6): Extracting archive
  - Installing phpoption/phpoption (1.8.0): Extracting archive
  - Installing graham-campbell/result-type (v1.0.2): Extracting archive
  - Installing vlucas/phpdotenv (v5.3.1): Extracting archive
  - Installing symfony/css-selector (v5.3.4): Extracting archive
  - Installing tijsverkoyen/css-to-inline-styles (2.2.3): Extracting archive
  - Installing symfony/routing (v5.3.7): Extracting archive
  - Installing symfony/process (v5.3.7): Extracting archive
  - Installing symfony/polyfill-php72 (v1.23.0): Extracting archive
  - Installing symfony/polyfill-intl-idn (v1.23.0): Extracting archive
  - Installing symfony/mime (v5.3.8): Extracting archive
  - Installing symfony/http-foundation (v5.3.7): Extracting archive
  - Installing symfony/http-client-contracts (v2.4.0): Extracting archive
  - Installing psr/event-dispatcher (1.0.0): Extracting archive
  - Installing symfony/event-dispatcher-contracts (v2.4.0): Extracting archive
  - Installing symfony/event-dispatcher (v5.3.7): Extracting archive
  - Installing symfony/error-handler (v5.3.7): Extracting archive
  - Installing symfony/http-kernel (v5.3.9): Extracting archive
  - Installing symfony/finder (v5.3.7): Extracting archive
  - Installing symfony/polyfill-iconv (v1.23.0): Extracting archive
  - Installing egulias/email-validator (2.1.25): Extracting archive
  - Installing swiftmailer/swiftmailer (v6.2.7): Extracting archive
  - Installing symfony/polyfill-php81 (v1.23.0): Extracting archive
  - Installing ramsey/collection (1.2.2): Extracting archive
  - Installing brick/math (0.9.3): Extracting archive
  - Installing ramsey/uuid (4.2.3): Extracting archive
  - Installing psr/simple-cache (1.0.1): Extracting archive
  - Installing opis/closure (3.6.2): Extracting archive
  - Installing symfony/translation-contracts (v2.4.0): Extracting archive
  - Installing symfony/translation (v5.3.9): Extracting archive
  - Installing nesbot/carbon (2.53.1): Extracting archive
  - Installing league/mime-type-detection (1.8.0): Extracting archive
  - Installing league/flysystem (1.1.5): Extracting archive
  - Installing nette/utils (v3.2.5): Extracting archive
  - Installing nette/schema (v1.2.1): Extracting archive
  - Installing dflydev/dot-access-data (v3.0.1): Extracting archive
  - Installing league/config (v1.1.1): Extracting archive
  - Installing league/commonmark (2.0.2): Extracting archive
  - Installing laravel/serializable-closure (v1.0.3): Extracting archive
  - Installing laravel/framework (v8.64.0): Extracting archive
  - Installing facade/ignition-contracts (1.0.2): Extracting archive
  - Installing facade/flare-client-php (1.9.1): Extracting archive
  - Installing facade/ignition (2.15.0): Extracting archive
  - Installing fakerphp/faker (v1.16.0): Extracting archive
  - Installing asm89/stack-cors (v2.0.3): Extracting archive
  - Installing fruitcake/laravel-cors (v2.0.4): Extracting archive
  - Installing psr/http-message (1.0.1): Extracting archive
  - Installing psr/http-client (1.0.1): Extracting archive
  - Installing ralouphie/getallheaders (3.0.3): Extracting archive
  - Installing psr/http-factory (1.0.1): Extracting archive
  - Installing guzzlehttp/psr7 (2.1.0): Extracting archive
  - Installing guzzlehttp/promises (1.5.0): Extracting archive
  - Installing guzzlehttp/guzzle (7.3.0): Extracting archive
  - Installing laravel/sail (v1.12.0): Extracting archive
  - Installing laravel/sanctum (v2.11.3): Extracting archive
  - Installing nikic/php-parser (v4.13.0): Extracting archive
  - Installing psy/psysh (v0.10.9): Extracting archive
  - Installing laravel/tinker (v2.6.2): Extracting archive
  - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive
  - Installing mockery/mockery (1.4.4): Extracting archive
  - Installing filp/whoops (2.14.4): Extracting archive
  - Installing nunomaduro/collision (v5.10.0): Extracting archive
  - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
  - Installing phpdocumentor/type-resolver (1.5.1): Extracting archive
  - Installing phpdocumentor/reflection-docblock (5.2.2): Extracting archive
  - Installing sebastian/version (3.0.2): Extracting archive
  - Installing sebastian/type (2.3.4): Extracting archive
  - Installing sebastian/resource-operations (3.0.3): Extracting archive
  - Installing sebastian/recursion-context (4.0.4): Extracting archive
  - Installing sebastian/object-reflector (2.0.4): Extracting archive
  - Installing sebastian/object-enumerator (4.0.4): Extracting archive
  - Installing sebastian/global-state (5.0.3): Extracting archive
  - Installing sebastian/exporter (4.0.3): Extracting archive
  - Installing sebastian/environment (5.1.3): Extracting archive
  - Installing sebastian/diff (4.0.4): Extracting archive
  - Installing sebastian/comparator (4.0.6): Extracting archive
  - Installing sebastian/code-unit (1.0.8): Extracting archive
  - Installing sebastian/cli-parser (1.0.1): Extracting archive
  - Installing phpunit/php-timer (5.0.3): Extracting archive
  - Installing phpunit/php-text-template (2.0.4): Extracting archive
  - Installing phpunit/php-invoker (3.1.1): Extracting archive
  - Installing phpunit/php-file-iterator (3.0.5): Extracting archive
  - Installing theseer/tokenizer (1.2.1): Extracting archive
  - Installing sebastian/lines-of-code (1.0.3): Extracting archive
  - Installing sebastian/complexity (2.0.2): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive
  - Installing phpunit/php-code-coverage (9.2.7): Extracting archive
  - Installing doctrine/instantiator (1.4.0): Extracting archive
  - Installing phpspec/prophecy (1.14.0): Extracting archive
  - Installing phar-io/version (3.1.0): Extracting archive
  - Installing phar-io/manifest (2.0.3): Extracting archive
  - Installing myclabs/deep-copy (1.10.2): Extracting archive
  - Installing phpunit/phpunit (9.5.10): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: facade/ignition
Discovered Package: fruitcake/laravel-cors
Discovered Package: laravel/sail
Discovered Package: laravel/sanctum
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
78 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

> @php artisan vendor:publish --tag=laravel-assets --ansi
No publishable resources for tag [laravel-assets].
Publishing complete.
Project configuration is disabled: "symfony/flex" not found in the root composer.json
> @php artisan key:generate --ansi
Application key set successfully.
~/tmp/ide-helper-test $ composer require --dev barryvdh/laravel-ide-helper
Using version ^2.10 for barryvdh/laravel-ide-helper
./composer.json has been updated
Running composer update barryvdh/laravel-ide-helper
Loading composer repositories with package information
Updating dependencies
Lock file operations: 18 installs, 0 updates, 0 removals
  - Locking barryvdh/laravel-ide-helper (v2.10.0)
  - Locking barryvdh/reflection-docblock (v2.0.6)
  - Locking composer/ca-bundle (1.2.11)
  - Locking composer/composer (2.1.9)
  - Locking composer/metadata-minifier (1.0.0)
  - Locking composer/package-versions-deprecated (1.11.99.4)
  - Locking composer/semver (3.2.5)
  - Locking composer/spdx-licenses (1.5.5)
  - Locking composer/xdebug-handler (2.0.2)
  - Locking doctrine/cache (2.1.1)
  - Locking doctrine/dbal (3.1.3)
  - Locking doctrine/deprecations (v0.5.3)
  - Locking doctrine/event-manager (1.1.1)
  - Locking justinrainbow/json-schema (5.2.11)
  - Locking react/promise (v2.8.0)
  - Locking seld/jsonlint (1.8.3)
  - Locking seld/phar-utils (1.1.2)
  - Locking symfony/filesystem (v5.3.4)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 18 installs, 0 updates, 0 removals
  - Downloading composer/package-versions-deprecated (1.11.99.4)
  - Downloading doctrine/event-manager (1.1.1)
  - Downloading doctrine/deprecations (v0.5.3)
  - Downloading doctrine/cache (2.1.1)
  - Downloading doctrine/dbal (3.1.3)
  - Downloading barryvdh/reflection-docblock (v2.0.6)
  - Downloading barryvdh/laravel-ide-helper (v2.10.0)
  - Installing composer/package-versions-deprecated (1.11.99.4): Extracting archive
  - Installing doctrine/event-manager (1.1.1): Extracting archive
  - Installing doctrine/deprecations (v0.5.3): Extracting archive
  - Installing doctrine/cache (2.1.1): Extracting archive
  - Installing doctrine/dbal (3.1.3): Extracting archive
  - Installing symfony/filesystem (v5.3.4): Extracting archive
  - Installing seld/phar-utils (1.1.2): Extracting archive
  - Installing seld/jsonlint (1.8.3): Extracting archive
  - Installing react/promise (v2.8.0): Extracting archive
  - Installing justinrainbow/json-schema (5.2.11): Extracting archive
  - Installing composer/xdebug-handler (2.0.2): Extracting archive
  - Installing composer/spdx-licenses (1.5.5): Extracting archive
  - Installing composer/semver (3.2.5): Extracting archive
  - Installing composer/metadata-minifier (1.0.0): Extracting archive
  - Installing composer/ca-bundle (1.2.11): Extracting archive
  - Installing composer/composer (2.1.9): Extracting archive
  - Installing barryvdh/reflection-docblock (v2.0.6): Extracting archive
  - Installing barryvdh/laravel-ide-helper (v2.10.0): Extracting archive
Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: barryvdh/laravel-ide-helper
Discovered Package: facade/ignition
Discovered Package: fruitcake/laravel-cors
Discovered Package: laravel/sail
Discovered Package: laravel/sanctum
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
91 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

> @php artisan vendor:publish --tag=laravel-assets --ansi
No publishable resources for tag [laravel-assets].
Publishing complete.
mfn commented 2 years ago

There was an update on composer, maybe this fixes it once a new composer release is out? (laravel-ide-helper explicitly depends on composer)

Please see https://github.com/composer/composer/pull/10158

mfn commented 7 months ago

Closing due to lack of feedback, also no other psr/log related issues were reported.

Joshua20b commented 7 months ago

Install of fakerphp/faker failed Install of nesbot/carbon failed Install of monolog/monolog failed Install of league/commonmark failed Install of laravel/prompts failed Install of laravel/framework failed Install of laravel/sanctum failed Install of nikic/php-parser failed Install of psy/psysh failed