Sbrillo's avatar

Sbrillo started a new conversation+100 XP

1w ago

Hello everyone, I’ve just registered on this forum. You have no idea how many times your posts have helped me over the years, but now I need help with something different.

I’m trying to use QR codes in my Laravel project (Laravel 12 with a starter kit and built-in authentication using Fortify). However, when I try to install Simple QR Code, I get the following error:

Problem 1 - Root composer.json requires simplesoftwareio/simple-qrcode * -> satisfiable by simplesoftwareio/simple-qrcode[1.0.1, ..., 1.5.1, 2.0.0, 3.0.0, 4.0.0, 4.1.0, 4.2.0]. - simplesoftwareio/simple-qrcode[1.0.1, ..., 1.5.1, 2.0.0] require bacon/bacon-qr-code 1.0.* -> found bacon/bacon-qr-code[1.0.0, 1.0.1, 1.0.2, 1.0.3] but the package is fixed to v3.1.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - simplesoftwareio/simple-qrcode 3.0.0 requires bacon/bacon-qr-code 2.0.0 -> found bacon/bacon-qr-code[2.0.0] but the package is fixed to v3.1.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - simplesoftwareio/simple-qrcode[4.0.0, ..., 4.2.0] require bacon/bacon-qr-code ^2.0 -> found bacon/bacon-qr-code[2.0.0, ..., 2.0.8] but the package is fixed to v3.1.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require simplesoftwareio/simple-qrcode:*" to figure out if any version is installable, or "composer require simplesoftwareio/simple-qrcode:^2.1" if you know which you need.

I tried using the options suggested in the error message, but I kept running into more compatibility issues.

I suspected there might be a conflict related to bacon/bacon-qr-code, so I ran the command composer why bacon/bacon-qr-code to check which dependencies are using it. It turns out that Fortify depends on it.

At this point, I’m stuck: I can’t remove it, I can’t upgrade it, and I can’t install Simple QR Code. Am I missing something, or is there a workaround for this situation?