browscap-php
browscap-php copied to clipboard
browscap-php is incompatible with psr/cache 3 (e.g. Symfony Cache)
Tried to use browscap-php with Symfony 6 (symfony/skeleton) but there is dependency conflict:
- Root composer.json requires browscap/browscap-php 7.0 -> satisfiable by browscap/browscap-php[7.0.0].
- matthiasmullie/scrapbook 1.4.8 requires psr/cache ~1.0 -> satisfiable by psr/cache[1.0.0, 1.0.1].
- You can only install one version of a package, so only one of these can be installed: psr/cache[1.0.0, 1.0.1, 2.0.0, 3.0.0].
- symfony/cache-contracts v3.0.0 requires psr/cache ^3.0 -> satisfiable by psr/cache[3.0.0].
- symfony/cache v6.0.6 requires symfony/cache-contracts ^1.1.7|^2|^3 -> satisfiable by symfony/cache-contracts[v3.0.0].
- doctrine/doctrine-bundle 2.6.0 requires symfony/cache ^4.3.3|^5.0|^6.0 -> satisfiable by symfony/cache[v6.0.6].
- browscap/browscap-php 7.0.0 requires matthiasmullie/scrapbook ^1.4.8 -> satisfiable by matthiasmullie/scrapbook[1.4.8].
- doctrine/doctrine-bundle is locked to version 2.6.0 and an update of this package was not requested.
Is there any way to resolve this?
its been half a year... are there any updates? do you need help upgrading this?
If a patch can be made, sure, it would be welcome :+1: thanks.
Please note: we must retain support for psr/cache:^1.0
, which I think is where the difficulty lies.
That is the problem indeed - psr/cache:^1.0
is not compatible with Symfony (symfony/cache to be specific, which is part of symfony/skeleton). And since support for psr/cache:^1.0
must be retained, there is no solution.
Main reason for me bringing this up were release notes of v7.0.0 with #418 which made me think it should be compatible with Symfony 6, but it seems that was only about specific Symfony component.
You can reproduce this issue if you
- require symfony cache 5.4
- require this project at the latest stable version
- upgrade to symfony 6.* by following the instructions mentioned in the upgrade guide.
Additionally: matthiasmullie/scrapbook 1.4.8 requires psr/cache ~1.0
Since matthiasmullie/scrapbook
is a currently a hard dependency https://github.com/browscap/browscap-php/blob/c4d665a92558065e4df1647c344c63afdd91e931/composer.json#L36 this dependency also needs to support psr/cache ^2.0 || ^3.0
Requested this here https://github.com/matthiasmullie/scrapbook/issues/54
Isolate the Commands and reduce dependencies?
Another approach might be to isolate the Commands (which use matthiasmullie/scrapbook
) in a separate repository along with dependencies such as symfony/console
and league/flysystem
, only used in the Commands...