j0k3r / graby

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

Installing Graby with Symfony 6.1 #298

Closed augustin570 closed 1 year ago

augustin570 commented 1 year ago

Hi,

Nice project. :)

I am using Symfony 6.1 and when I try to install your package, I get this error :

Using version ^2.4 for j0k3r/graby
Using version ^1.0 for php-http/guzzle7-adapter
./composer.json has been updated
Running composer update j0k3r/graby php-http/guzzle7-adapter --with-all-dependencies
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "6.1.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires j0k3r/graby ^2.4 -> satisfiable by j0k3r/graby[2.4.0, 2.4.1].
    - j0k3r/graby[2.4.0, ..., 2.4.1] require symfony/options-resolver ^3.4|^4.4|^5.3 -> found symfony/options-resolver[v3.4.0, ..., v3.4.47, v4.4.0, ..., v4.4.44, v5.3.0, ..., v5.4.11] but these were not loaded, likely because it conflicts with another require.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require j0k3r/graby:*" to figure out if any version is installable, or "composer require j0k3r/graby:^2.1" if you know which you need.

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

For your information in the composer.lock, I have seen :

If you need further information, let me know.

jtojnar commented 1 year ago

Looks like symfony/options-resolver constraint is extended in master, we might want to backport it to 2.x branch.

Reading Monolog 3.0.0 upgrade guide, support for Monolog 3 will likely require moving many of the type hints introduced in https://github.com/j0k3r/graby/commit/f50a83f5201c36499487e214a4293cae1f1f9323 into a phpdoc comment. Or raising minimum PHP version to 8.0 for unions. But that is not an option in 2.x branch.

Or maybe we could drop the Monolog integration. But that also cannot happen in 2.x.

But 3.x is still not anywhere near, looking at https://github.com/j0k3r/graby/issues/275.

augustin570 commented 1 year ago

Thank you for your quick response. I will try tomorrow why symphony 5.4. I will keep you informed. :)

augustin570 commented 1 year ago

I have downgraded my app to Symfony 5.4 and it works well. Thank you for all! And I will keep an eye here to get the version 3.0 when it will be released. Take care guys and happy coding. :)