endroid / qr-code

QR Code Generator
https://endroid.nl
MIT License
4.46k stars 727 forks source link

can not update to version 3.9.6 - requires endroid/qr-code (^2.0) #289

Closed pauLee closed 3 years ago

pauLee commented 3 years ago

Hello,

If I try to update to the latest version 3.9.6 I can not fullfill the requirements because it tells me that I need an old version of bacon-qr-code ^1.0.3. But this package itself is outdated - the latest version would be 2.0.3.

php composer.phar update --no-dev --with-all-dependencies Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.

This is my composer.json file:

{ "name": "roundcube/roundcubemail", "description": "The Roundcube Webmail suite", "license": "GPL-3.0-or-later", "repositories": [ { "type": "composer", "url": "https://plugins.roundcube.net/" }, { "type": "vcs", "url": "https://github.com/roundcube/Net_Sieve.git" }, { "type": "vcs", "url": "https://git.kolab.org/diffusion/PNL/php-net_ldap.git" }, { "type": "composer", "url": "https://plugins.roundcube.net" } ], "require": { "php": ">=5.4.0", "pear/pear-core-minimal": "~1.10.1", "pear/net_socket": "~1.2.1", "pear/auth_sasl": "~1.1.0", "pear/net_idna2": "~0.2.0", "pear/mail_mime": "~1.10.0", "pear/net_smtp": "~1.9.2", "pear/crypt_gpg": "~1.6.3", "roundcube/plugin-installer": "~0.2.0", "endroid/qr-code": "^2.0", "johndoh/contextmenu": "^3.0", "sblaisot/automatic_addressbook": "^0.4.2", "pear/net_sieve": "~1.4.3", "kitist/html5_notifier": "^0.6.2", "boressoft/ident_switch": "^4.3", "masterminds/html5": "^2.0", "roundcube/authres_status": "^0.5.2", "symfony/console": "^5.0", "khanamiryan/qrcode-detector-decoder": "^1.0.2", "bacon/bacon-qr-code": "^2.0", "sensiolabs/security-checker": "^6.0" }, "require-dev": { "phpunit/phpunit": "~5.7.15" }, "suggest": { "pear/net_ldap2": "~2.2.0 required for connecting to LDAP", "kolab/Net_LDAP3": "dev-master required for connecting to LDAP" } }

How can I solve that problem?

endroid commented 3 years ago

Hi @pauLee I see you have the version constraint of endroid/qr-code set to ^2.0. You should use something like ^3.0 if you want to install a 3.x version (see https://getcomposer.org/doc/articles/versions.md#caret-version-range-).

Further I see you require the following dependencies in your own composer.json

"khanamiryan/qrcode-detector-decoder": "^1.0.2",
"bacon/bacon-qr-code": "^2.0",

The endroid/qr-code library also requires these dependencies and specifies the correct versions so I advise you to not overrule these from your own composer.json if not needed for some other package because this might lead to conflicts or other unexpected behavior.

Good luck!

pauLee commented 3 years ago

Thank you @endroid for you help. I solved the dependencies now.