Closed kohlerdominik closed 3 years ago
Hi @kohlerdominik I'm also still waiting for the merge and release. In the meanwhile I suggest you add the following to your composer.json if you really need the PHP 8 compatible version as I prefer not to create a tag / release with a fork in it. By the way, in the next major version the package will be optional.
"repositories": {
"qrcode-reader": {
"type": "vcs",
"url": "https://github.com/remicollet/php-qrcode-detector-decoder"
}
},
And require "khanamiryan/qrcode-detector-decoder": "dev-issue-php8".
I'm not sure if I'm missing something basic but I'm trying to apply the workaround as above, but Composer can't install the forked dependency:
$ composer update -W
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "5.2.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- endroid/qr-code[3.8.0, ..., 3.9.6] require khanamiryan/qrcode-detector-decoder ^1.0.2 -> satisfiable by khanamiryan/qrcode-detector-decoder[1.0.2, 1.0.3, 1.0.4] from composer repo (https://repo.packagist.org) but khanamiryan/qrcode-detector-decoder[dev-issue-lic, dev-master, dev-issue-perms, dev-issue-phpunit, dev-issue-php8, 0.0.1, 1] from vcs repo (github https://github.com/remicollet/php-qrcode-detector-decoder) has higher repository priority. The packages with higher priority do not match your constraint and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.
- Root composer.json requires endroid/qr-code ^3.8 -> satisfiable by endroid/qr-code[3.8.0, ..., 3.9.6].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Has anyone else got this workaround to work?
You did overwrite khanamiryan/qrcode-detector-decoder
as well, correct?
then you should define it as version like this:
"khanamiryan/qrcode-detector-decoder": "dev-issue-php8 as 1.0.5"
Thanks @kohlerdominik, it was the "as 1.0.5" I was missing :)
In the new 4.0.0 version which is PHP 8.0 compatible the validator is optional so if you don't need it you can now install.
Hi @endroid
In both recent major PHP updates (php7.4 and php8) I was waiting quite some time for khanamiryan/php-qrcode-detector-decoder to fix perfectly prepared PRs for merge. The php8 fix is still not merged, altough it's open now for 6 weeks...
Would you consider to create a fork where we can merge fixes faster than the original maintainer does? And using this fork as dependency for this library. I would be happy to help with this, if necessary.