j0k3r / graby

Graby helps you extract article content from web pages
MIT License
362 stars 73 forks source link

Using Graby with Laravel #331

Open kolaente opened 1 year ago

kolaente commented 1 year ago

Trying to install Graby in a Laravel application fails because of different monolog requirements:

$ composer require 'j0k3r/graby dev-master' php-http/guzzle7-adapter
./composer.json has been updated
Running composer update j0k3r/graby php-http/guzzle7-adapter
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 j0k3r/graby dev-master -> satisfiable by j0k3r/graby[dev-master].
    - j0k3r/graby dev-master requires monolog/monolog ^1.18.0|^2.3 -> found monolog/monolog[1.18.0, ..., 1.27.1, 2.3.0, ..., 2.9.1] but the package is fixed to 3.4.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.

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

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

(Trying the 2.x release fails because the guzzle versions are not compatible)

Laravel appears to require at least monolog 3:

$ composer why monolog/monolog
laravel/framework v10.13.5 requires monolog/monolog (^3.0)

Any way to solve this? Or do I need to wait for 3.0?

If there's interest, I could put up a PR with a migration for monolog 3.

kolaente commented 1 year ago

Opened a PR: https://github.com/j0k3r/graby/pull/332