jae-jae / QueryList

:spider: The progressive PHP crawler framework! 优雅的渐进式PHP采集框架。
https://querylist.cc
2.64k stars 442 forks source link

laravel 9.19版本安装composer require jaeger/querylist 出现版本冲突 #182

Closed zh7314 closed 3 weeks ago

zh7314 commented 1 month ago

系统windows 11 php版本 8.0.2 laravel 9.19.* Composer version 2.2.23

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - jaeger/querylist[V4.2.0, ..., V4.2.8] require jaeger/g-http ^1.1 -> satisfiable by jaeger/g-http[V1.1, ..., V1.7.3].
    - jaeger/g-http[V1.7.1, ..., V1.7.3] require cache/filesystem-adapter ^1 -> satisfiable by cache/filesystem-adapter[1.0.0, 1.1.0, 1.2.0].
    - jaeger/g-http V1.7.0 requires cache/filesystem-adapter ^1.0 -> satisfiable by cache/filesystem-adapter[1.0.0, 1.1.0, 1.2.0].
    - cache/filesystem-adapter 1.0.0 requires php ^5.6 || ^7.0 -> your php version (8.0.2) does not satisfy that requirement.
    - cache/filesystem-adapter[1.1.0, ..., 1.2.0] require league/flysystem ^1.0 -> found league/flysystem[1.0.0, ..., 1.1.10] but the package is fixed to 3.28.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.
    - jaeger/g-http[V1.1, ..., V1.6.0] require guzzlehttp/guzzle ^6.2 -> found guzzlehttp/guzzle[6.2.0, ..., 6.5.8] but it conflicts with your root composer.json require (^7.2).
    - Root composer.json requires jaeger/querylist ^4.2 -> satisfiable by jaeger/querylist[V4.2.0, ..., V4.2.8].

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 jaeger/querylist:*" to figure out if any version is installable, or "composer require jaeger/querylist:^2.1" if you know which you need.

使用 composer require jaeger/querylist:* 只能兼容到 V3.2.1

- Installing jaeger/phpquery-single (0.9.9): Extracting archive
  - Installing jaeger/querylist (V3.2.1): Extracting archive
jae-jae commented 1 month ago

强制指定一下版本号,安装 V4.4.3,看看提示什么:

composer require jaeger/querylist:V4.4.3
zh7314 commented 1 month ago

使用腾讯云镜像会出现

\laravel9> composer require jaeger/querylist:V4.4.3
./composer.json has been updated
Running composer update jaeger/querylist
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - symfony/cache[v7.0.0, ..., v7.1.1] require php >=8.2 -> your php version (8.0.2) does not satisfy that requirement.
    - jaeger/querylist V4.4.3 requires jaeger/g-http ^2.0 -> satisfiable by jaeger/g-http[V2.0.0].
    - jaeger/g-http V2.0.0 requires symfony/cache ^7.0 -> satisfiable by symfony/cache[v7.0.0, ..., v7.1.1].
    - Root composer.json requires jaeger/querylist V4.4.3 -> satisfiable by jaeger/querylist[V4.4.3].

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

还发现一个问题,阿里云会出现一个问题就是,就是找不到版本

\NEW\laravel9> composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
(base) PS D:\phpstudy_pro\NEW\laravel9> composer require jaeger/querylist:V4.4.3
./composer.json has been updated
Running composer update jaeger/querylist
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires jaeger/querylist V4.4.3, found jaeger/querylist[dev-master, dev-develop, V3.1, ..., V3.2.1, V4.0.0, ..., V4.2.8] but it does not match the constraint.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
zh7314 commented 1 month ago

laravel9上php8.2也不太可能,8..0.x还行

zh7314 commented 1 month ago
(base) PS D:\phpstudy_pro\NEW\laravel9> php -v
PHP 8.2.9 (cli) (built: Aug  1 2023 12:41:16) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.9, Copyright (c) Zend Technologies
(base) PS D:\phpstudy_pro\NEW\laravel9> composer require jaeger/querylist:V4.4.3
./composer.json has been updated
Running composer update jaeger/querylist
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package fruitcake/laravel-cors is abandoned, you should avoid using it. No replacement was suggested.
Package sebastian/resource-operations is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   INFO  Discovering packages.

  barryvdh/laravel-ide-helper ................................................................................... DONE
  fruitcake/laravel-cors ........................................................................................ DONE
  intervention/image ............................................................................................ DONE
  laravel/sail .................................................................................................. DONE
  laravel/sanctum ............................................................................................... DONE
  laravel/tinker ................................................................................................ DONE
  mews/captcha .................................................................................................. DONE
  nesbot/carbon ................................................................................................. DONE
  nunomaduro/collision .......................................................................................... DONE
  nunomaduro/termwind ........................................................................................... DONE
  spatie/laravel-ignition ....................................................................................... DONE

91 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan vendor:publish --tag=laravel-assets --ansi --force

   INFO  No publishable resources for tag [laravel-assets].

(base) PS D:\phpstudy_pro\NEW\laravel9>

总结,在php8.2,laravel9可以执行成功