Trouble upgrading plugin with Composer due to conflict with roots/bedrock

Hi there,

Today I was updating some plugins and I came across an error that I haven’t seen before.

When I try to upgrade Lingotek (a language translation plugin) I get:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - roots/bedrock is present at version dev-main and cannot be modified by Composer
    - roots/bedrock dev-main conflicts with wpackagist-plugin/lingotek-translation 1.6.1.
    - Root composer.json requires wpackagist-plugin/lingotek-translation 1.6.1 -> satisfiable by wpackagist-plugin/lingotek-translation[1.6.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Any ideas how I might go about troubleshooting this?


I found this line in my composer.json:

 "conflict": {
    "wpackagist-plugin/lingotek-translation": ">1.5.9",
    "roots/acorn": "^3.0.0"

Obviously this is the problem, any ideas why that line might be in there? I’ve inherited this code base,

Should I just remove the line and see what happens?

Update 2:

Well I did it and everything seems to still be working. I’m going to test it a little more but I think we’re good.

composer.json conflict field:

Map of packages that conflict with this version of this package. They will not be allowed to be installed together with your package.

So this was put in as apparently no wpackagist-plugin/lingotek-translation package newer than or equal to 1.5.9 should be installed on this Bedrock site.
(The same for acorn 3 by the way).

In the composer.json the wpackagist-plugin/lingotek-translation version 1.6.1 package is required, and the used version constraint does not allow for a version below 1.5.9 to be installed for this package.

Check the commit that added those conflict lines (as git blame) and there may be an explanation in the commit message for why this was added in the first place. For some reason newer versions of that plugin should have been prevented from being installed. Maybe because an incompatibility was introduced with newer versions or a bug? You should check the whole site, ideally with snapshots and tests against a working copy of the site (with the older plugin).

Thanks so much for taking the time to reply to me.

And that blame command is amazing, thanks for introducing me to that.

I’ve found a commit message that does indeed tell me why this was added.

“update info for same blocks on page”

So I’m guessing there might be a problem when there are 2 blocks of the same type on one page.

Thank you!

Correlating the date of that commit you may be able to find a corresponding WordPress plugins directory plugin issue (plugin with slug lingotek-translation) that was created for that plugin with more details and even a closure (whether this had been fixed in an previous release).

Thanks so much! You have made me smarter :slight_smile: