samwilson / phpflickr

A PHP wrapper for the Flickr API, including OAuth.
https://packagist.org/packages/samwilson/phpflickr
GNU General Public License v2.0
39 stars 15 forks source link

dependency issue upgrading to Symfony 6.2 #55

Closed mcrauwel closed 1 year ago

mcrauwel commented 1 year ago

Symfony 6.2 requires psr/cache ^2 or ^3 while phpflickr requires psr/cache ^1

Composer update snippets... When upgrading from Symfony 5.4 to 6.2

    - symfony/cache[v6.2.0, ..., v6.2.4] require psr/cache ^2.0|^3.0 -> found psr/cache[2.0.0, 3.0.0] but it conflicts with your root composer.json require (^1).

When changing the requirement for psr/cache from ^1 -> ^3

    - samwilson/phpflickr[4.14.0, ..., 4.14.3] require psr/cache ^1.0 -> found psr/cache[1.0.0, 1.0.1] but it conflicts with your root composer.json require (3.*).
samwilson commented 1 year ago

Hmm. Maybe we can do "psr/cache": "^1|^2|^3"? What are the non-BC changes that they've made to the psr/cache API? I think we're using only CacheItemPoolInterface::getItem(), CacheItemPoolInterface::save(), CacheItemInterface::set() and CacheItemInterface::expiresAfter().

mcrauwel commented 1 year ago

Looking at the releases page, they compatibility to PHP8 in version 2 And they added return types in version 3

samwilson commented 1 year ago

Well that sounds hopeful. I'll test later and see how it goes. Maybe it'll be super simple. :-)

samwilson commented 1 year ago

I've updated the psr/cache version requirement, see what you think of #56.

mcrauwel commented 1 year ago

that does the trick!

...
-        "psr/cache": "^1",
+        "psr/cache": "^3",
...
-        "samwilson/phpflickr": "^4.14",
+        "samwilson/phpflickr": "dev-cache-update",
...
-        "symfony/asset": "5.4.*",
-        "symfony/console": "5.4.*",
-        "symfony/dotenv": "5.4.*",
-        "symfony/expression-language": "5.4.*",
+        "symfony/asset": "6.2.*",
+        "symfony/console": "6.2.*",
+        "symfony/dotenv": "6.2.*",
+        "symfony/expression-language": "6.2.*",
...

works like a charm!

samwilson commented 1 year ago

Great, thanks for testing. I've made a new release.

mcrauwel commented 1 year ago

🙇