Summary
The package mrcnpdlk/regon-api version 2.0.0 requires psr/simple-cache ^1 which conflicts with other modern packages that require psr/simple-cache ^2 or ^3, making it impossible to install the package in current PHP projects.
Environment
- PHP Version: 8.1+ (modern environment)
- Composer Version: Latest
- mrcnpdlk/regon-api Version: 2.0.0
- Conflicting packages:
mobiledetect/mobiledetectlib ^4.8
Error Message
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires mobiledetect/mobiledetectlib ^4.8 -> satisfiable by mobiledetect/mobiledetectlib[4.8.01, ..., 4.8.09].
- Root composer.json requires mrcnpdlk/regon-api ^2.0 -> satisfiable by mrcnpdlk/regon-api[2.0.0].
- mobiledetect/mobiledetectlib[4.8.01, ..., 4.8.05] require psr/simple-cache ^3.0 -> satisfiable by psr/simple-cache[3.0.0].
- mobiledetect/mobiledetectlib[4.8.06, ..., 4.8.07] require psr/simple-cache ^2 || ^3 -> satisfiable by psr/simple-cache[2.0.0, 3.0.0].
- mobiledetect/mobiledetectlib[4.8.08, ..., 4.8.09] require psr/simple-cache ^3 -> satisfiable by psr/simple-cache[3.0.0].
- mrcnpdlk/regon-api 2.0.0 requires psr/simple-cache ^1 -> satisfiable by psr/simple-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/simple-cache[1.0.0, 1.0.1, 2.0.0, 3.0.0].
Steps to Reproduce
- Create a new PHP project with Composer
- Add
mrcnpdlk/regon-api: "^2.0" to composer.json
- Add
mobiledetect/mobiledetectlib: "^4.8" to composer.json (or any other modern package requiring psr/simple-cache ^2 or ^3)
- Run
composer install or composer update
- Observe the dependency conflict error
Current composer.json requirements
{
"require": {
"mrcnpdlk/regon-api": "^2.0",
"mobiledetect/mobiledetectlib": "^4.8"
}
}
Expected Behavior
The package should be installable alongside other modern PHP packages without dependency conflicts.
Proposed Solution
Update the composer.json of mrcnpdlk/regon-api to support newer versions of psr/simple-cache:
{
"require": {
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
}
}
This would maintain backward compatibility while allowing the package to work with modern dependencies.
Workarounds
Currently, users need to either:
- Use
composer update --with-all-dependencies -W (may cause other issues)
- Switch to alternative packages like
gusapi/gusapi
- Remove conflicting packages
Impact
This issue prevents the package from being used in modern PHP applications, limiting its adoption and forcing developers to seek alternatives.
Additional Context
- PSR-16 (Simple Cache) version 1.0 was released in 2017
- Most modern packages have moved to psr/simple-cache ^2.0 or ^3.0
- This conflict is becoming increasingly common as the PHP ecosystem evolves
Thank you for maintaining this package! A fix for this dependency conflict would be greatly appreciated.
Summary
The package
mrcnpdlk/regon-apiversion 2.0.0 requirespsr/simple-cache ^1which conflicts with other modern packages that requirepsr/simple-cache ^2or^3, making it impossible to install the package in current PHP projects.Environment
mobiledetect/mobiledetectlib ^4.8Error Message
Steps to Reproduce
mrcnpdlk/regon-api: "^2.0"to composer.jsonmobiledetect/mobiledetectlib: "^4.8"to composer.json (or any other modern package requiring psr/simple-cache ^2 or ^3)composer installorcomposer updateCurrent composer.json requirements
{ "require": { "mrcnpdlk/regon-api": "^2.0", "mobiledetect/mobiledetectlib": "^4.8" } }Expected Behavior
The package should be installable alongside other modern PHP packages without dependency conflicts.
Proposed Solution
Update the
composer.jsonofmrcnpdlk/regon-apito support newer versions ofpsr/simple-cache:{ "require": { "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" } }This would maintain backward compatibility while allowing the package to work with modern dependencies.
Workarounds
Currently, users need to either:
composer update --with-all-dependencies -W(may cause other issues)gusapi/gusapiImpact
This issue prevents the package from being used in modern PHP applications, limiting its adoption and forcing developers to seek alternatives.
Additional Context
Thank you for maintaining this package! A fix for this dependency conflict would be greatly appreciated.