<p>The package <code>embed/embed</code> isn't the problem – the <a href="https://packagist.org/packages/embed/embed" rel="nofollow noreferrer">newest version</a> supports both PHP 7.4 and 8+. The problem is that you have two plugins that require different versions of that package:</p>
<ul>
<li><code>newism/craft3-fields 2.0.0 requires embed/embed ^4.0</code></li>
<li><code>spicyweb/craft-embedded-assets 3.1.5 requires embed/embed ^3.4.17</code></li>
</ul>
<p>The first plugin requires version ^4.0, the second version ^3.4.17. Those requirements aren't compatible, since you can only have one version of that library in your project.</p>
<p>The best solution would be to get the author of the second plugin to update their plugin to require version ^4.0 as well. There's already an open issue on this topic: <a href="https://github.com/spicywebau/craft-embedded-assets/issues/152" rel="nofollow noreferrer">https://github.com/spicywebau/craft-embedded-assets/issues/152</a><br />
I suggest you upvote this issue and post a comment explaining your situation to let the author know why this is important. You could also try to update the plugin yourself and open a pull request.</p>
<p>If you can't wait for the author to update the plugin, you have two options:</p>
<ul>
<li>Fork the plugin and update it to support <code>embed/embed</code> in version ^4.0. I don't recommend this as it places additional maintenance burden on your project.</li>
<li>Remove one of the two plugins to avoid the version conflict.</li>
</ul>

CC BY-SA 4.0
2023-06-06T11:47:05.827Z
Very clarifying answer. Thanks. I will remove whichever one causes the least pain.
nitech
CC BY-SA 4.0
2023-06-06T10:56:36.323Z
2023-06-06T10:56:36.323Z
MoritzLost
<p>I am upgrading a site from Craft CMS 3 to 4. I develop the site on ddev with docker desktop on Windows.</p>
<p>When running <code>composer update</code> on PHP 7.4 and docker 2 on ddev the following happens:</p>
<pre><code>$ ddev composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
 
  Problem 1
    - embed/embed[v4.0.0, ..., v4.2.7] require php ^7.4 -&gt; your php version (8.0.28) does not satisfy that requirement.
    - Root composer.json requires newism/craft3-fields ^2.0.0 -&gt; satisfiable by newism/craft3-fields[2.0.0].
    - newism/craft3-fields 2.0.0 requires embed/embed ^4.0 -&gt; satisfiable by embed/embed[v4.0.0, ..., v4.4.8].
    - You can only install one version of a package, so only one of these can be installed: embed/embed[3.4.17, v3.4.18, v4.0.0, ..., v4.4.8].
    - spicyweb/craft-embedded-assets 3.1.5 requires embed/embed ^3.4.17 -&gt; satisfiable by embed/embed[3.4.17, v3.4.18].
    - Root composer.json requires spicyweb/craft-embedded-assets ^3.1.5 -&gt; satisfiable by spicyweb/craft-embedded-assets[3.1.5].
</code></pre>
<p>If I modify <code>config.yaml</code> to use PHP 8, I get the following error:</p>
<pre><code>$ ddev composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
 
  Problem 1
    - Root composer.json requires born05/craft-twofactorauthentication ^3.2.0 -&gt; satisfiable by born05/craft-twofactorauthentication[3.2.0].
    - born05/craft-twofactorauthentication 3.2.0 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 2
    - Root composer.json requires craftcms/aws-s3 ^2.0.3 -&gt; satisfiable by craftcms/aws-s3[2.0.3].
    - craftcms/aws-s3 2.0.3 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 3
    - Root composer.json requires craftcms/ckeditor ^3.4.0 -&gt; satisfiable by craftcms/ckeditor[3.4.0].
    - craftcms/ckeditor 3.4.0 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 4
    - Root composer.json requires craftcms/commerce ^4.2.10 -&gt; satisfiable by craftcms/commerce[4.2.10].
    - craftcms/commerce 4.2.10 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 5
    - Root composer.json requires craftcms/feed-me ^5.1.3.1 -&gt; satisfiable by craftcms/feed-me[5.1.3.1].
    - craftcms/feed-me 5.1.3.1 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 6
    - Root composer.json requires craftcms/redactor ^3.0.4 -&gt; satisfiable by craftcms/redactor[3.0.4].
    - craftcms/redactor 3.0.4 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 7
    - Root composer.json requires craftcms/webhooks ^3.0.4 -&gt; satisfiable by craftcms/webhooks[3.0.4].
    - craftcms/webhooks 3.0.4 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 8
    - Root composer.json requires nystudio107/craft-seomatic ^4.0.27 -&gt; satisfiable by nystudio107/craft-seomatic[4.0.27].
    - nystudio107/craft-seomatic 4.0.27 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 9
    - Root composer.json requires putyourlightson/craft-blitz ^4.4.5 -&gt; satisfiable by putyourlightson/craft-blitz[4.4.5].
    - putyourlightson/craft-blitz 4.4.5 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 10
    - Root composer.json requires sebastianlenz/linkfield ^2.1.5 -&gt; satisfiable by sebastianlenz/linkfield[2.1.5].
    - sebastianlenz/linkfield 2.1.5 requires php ^8.0 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 11
    - Root composer.json requires spacecatninja/imager-x ^4.1.13 -&gt; satisfiable by spacecatninja/imager-x[4.1.13].
    - spacecatninja/imager-x 4.1.13 requires php ^8.0 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 12
    - Root composer.json requires spicyweb/craft-embedded-assets ^3.1.5 -&gt; satisfiable by spicyweb/craft-embedded-assets[3.1.5].
    - spicyweb/craft-embedded-assets 3.1.5 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 13
    - Root composer.json requires spicyweb/craft-neo ^3.7.9 -&gt; satisfiable by spicyweb/craft-neo[3.7.9].
    - spicyweb/craft-neo 3.7.9 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 14
    - Root composer.json requires trendyminds/algolia ^4.0.0 -&gt; satisfiable by trendyminds/algolia[4.0.0].
    - trendyminds/algolia 4.0.0 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 15
    - Root composer.json requires ttempleton/craft-category-groups-field ^2.0.1 -&gt; satisfiable by ttempleton/craft-category-groups-field[2.0.1].
    - ttempleton/craft-category-groups-field 2.0.1 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 16
    - Root composer.json requires venveo/craft-bulkedit ^4.0.1 -&gt; satisfiable by venveo/craft-bulkedit[4.0.1].
    - venveo/craft-bulkedit 4.0.1 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 17
    - Root composer.json requires verbb/cloner ^2.0.3 -&gt; satisfiable by verbb/cloner[2.0.3].
    - verbb/cloner 2.0.3 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 18
    - Root composer.json requires verbb/formie ^2.0.30 -&gt; satisfiable by verbb/formie[2.0.30].
    - verbb/formie 2.0.30 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 19
    - Root composer.json requires verbb/navigation ^2.0.18 -&gt; satisfiable by verbb/navigation[2.0.18].
    - verbb/navigation 2.0.18 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 20
    - Root composer.json requires verbb/super-table ^3.0.9 -&gt; satisfiable by verbb/super-table[3.0.9].
    - verbb/super-table 3.0.9 requires php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
  Problem 21
    - craftcms/cms[4.0.0, ..., 4.4.13] require php ^8.0.2 -&gt; your php version (7.4.33) does not satisfy that requirement.
    - Root composer.json requires craftcms/cms ^4.0.0 -&gt; satisfiable by craftcms/cms[4.0.0, ..., 4.4.13].
 
</code></pre>
<p>So it seems embed/embed requires PHP ^7.4 to update, while the other packages require 8.0. How can I approach this? Or am I interpreting the error wrong?</p>

<craft4><composer><upgrades><ddev>
PHP version problem when upgrading to Craft CMS 4
# PHP version problem when upgrading to Craft CMS 4

(Asked by: username_0 on 2023-06-06)

I am upgrading a site from Craft CMS 3 to 4. I develop the site on ddev with docker desktop on Windows.
When running composer update on PHP 7.4 and docker 2 on ddev the following happens:
$ ddev composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
 
  Problem 1
    - embed/embed[v4.0.0, ..., v4.2.7] require php ^7.4 -> your php version (8.0.28) does not satisfy that requirement.
    - Root composer.json requires newism/craft3-fields ^2.0.0 -> satisfiable by newism/craft3-fields[2.0.0].
    - newism/craft3-fields 2.0.0 requires embed/embed ^4.0 -> satisfiable by embed/embed[v4.0.0, ..., v4.4.8].
    - You can only install one version of a package, so only one of these can be installed: embed/embed[3.4.17, v3.4.18, v4.0.0, ..., v4.4.8].
    - spicyweb/craft-embedded-assets 3.1.5 requires embed/embed ^3.4.17 -> satisfiable by embed/embed[3.4.17, v3.4.18].
    - Root composer.json requires spicyweb/craft-embedded-assets ^3.1.5 -> satisfiable by spicyweb/craft-embedded-assets[3.1.5].

If I modify config.yaml to use PHP 8, I get the following error:
$ ddev composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
 
  Problem 1
    - Root composer.json requires born05/craft-twofactorauthentication ^3.2.0 -> satisfiable by born05/craft-twofactorauthentication[3.2.0].
    - born05/craft-twofactorauthentication 3.2.0 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 2
    - Root composer.json requires craftcms/aws-s3 ^2.0.3 -> satisfiable by craftcms/aws-s3[2.0.3].
    - craftcms/aws-s3 2.0.3 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 3
    - Root composer.json requires craftcms/ckeditor ^3.4.0 -> satisfiable by craftcms/ckeditor[3.4.0].
    - craftcms/ckeditor 3.4.0 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 4
    - Root composer.json requires craftcms/commerce ^4.2.10 -> satisfiable by craftcms/commerce[4.2.10].
    - craftcms/commerce 4.2.10 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 5
    - Root composer.json requires craftcms/feed-me ^5.1.3.1 -> satisfiable by craftcms/feed-me[5.1.3.1].
    - craftcms/feed-me 5.1.3.1 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 6
    - Root composer.json requires craftcms/redactor ^3.0.4 -> satisfiable by craftcms/redactor[3.0.4].
    - craftcms/redactor 3.0.4 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 7
    - Root composer.json requires craftcms/webhooks ^3.0.4 -> satisfiable by craftcms/webhooks[3.0.4].
    - craftcms/webhooks 3.0.4 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 8
    - Root composer.json requires nystudio107/craft-seomatic ^4.0.27 -> satisfiable by nystudio107/craft-seomatic[4.0.27].
    - nystudio107/craft-seomatic 4.0.27 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 9
    - Root composer.json requires putyourlightson/craft-blitz ^4.4.5 -> satisfiable by putyourlightson/craft-blitz[4.4.5].
    - putyourlightson/craft-blitz 4.4.5 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 10
    - Root composer.json requires sebastianlenz/linkfield ^2.1.5 -> satisfiable by sebastianlenz/linkfield[2.1.5].
    - sebastianlenz/linkfield 2.1.5 requires php ^8.0 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 11
    - Root composer.json requires spacecatninja/imager-x ^4.1.13 -> satisfiable by spacecatninja/imager-x[4.1.13].
    - spacecatninja/imager-x 4.1.13 requires php ^8.0 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 12
    - Root composer.json requires spicyweb/craft-embedded-assets ^3.1.5 -> satisfiable by spicyweb/craft-embedded-assets[3.1.5].
    - spicyweb/craft-embedded-assets 3.1.5 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 13
    - Root composer.json requires spicyweb/craft-neo ^3.7.9 -> satisfiable by spicyweb/craft-neo[3.7.9].
    - spicyweb/craft-neo 3.7.9 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 14
    - Root composer.json requires trendyminds/algolia ^4.0.0 -> satisfiable by trendyminds/algolia[4.0.0].
    - trendyminds/algolia 4.0.0 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 15
    - Root composer.json requires ttempleton/craft-category-groups-field ^2.0.1 -> satisfiable by ttempleton/craft-category-groups-field[2.0.1].
    - ttempleton/craft-category-groups-field 2.0.1 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 16
    - Root composer.json requires venveo/craft-bulkedit ^4.0.1 -> satisfiable by venveo/craft-bulkedit[4.0.1].
    - venveo/craft-bulkedit 4.0.1 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 17
    - Root composer.json requires verbb/cloner ^2.0.3 -> satisfiable by verbb/cloner[2.0.3].
    - verbb/cloner 2.0.3 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 18
    - Root composer.json requires verbb/formie ^2.0.30 -> satisfiable by verbb/formie[2.0.30].
    - verbb/formie 2.0.30 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 19
    - Root composer.json requires verbb/navigation ^2.0.18 -> satisfiable by verbb/navigation[2.0.18].
    - verbb/navigation 2.0.18 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 20
    - Root composer.json requires verbb/super-table ^3.0.9 -> satisfiable by verbb/super-table[3.0.9].
    - verbb/super-table 3.0.9 requires php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
  Problem 21
    - craftcms/cms[4.0.0, ..., 4.4.13] require php ^8.0.2 -> your php version (7.4.33) does not satisfy that requirement.
    - Root composer.json requires craftcms/cms ^4.0.0 -> satisfiable by craftcms/cms[4.0.0, ..., 4.4.13].
 

So it seems embed/embed requires PHP ^7.4 to update, while the other packages require 8.0. How can I approach this? Or am I interpreting the error wrong?

**Tags:** craft4, composer, upgrades, ddev


---

## 1 answers

### Answer by username_1 on 2023-06-06. Score: 4 | Accepted answer

The package `embed/embed` isn't the problem – the [newest version](https://packagist.org/packages/embed/embed) supports both PHP 7.4 and 8+. The problem is that you have two plugins that require different versions of that package:

* `newism/craft3-fields 2.0.0 requires embed/embed ^4.0`
* `spicyweb/craft-embedded-assets 3.1.5 requires embed/embed ^3.4.17`

The first plugin requires version ^4.0, the second version ^3.4.17. Those requirements aren't compatible, since you can only have one version of that library in your project.

The best solution would be to get the author of the second plugin to update their plugin to require version ^4.0 as well. There's already an open issue on this topic: <https://github.com/spicywebau/craft-embedded-assets/issues/152>  
I suggest you upvote this issue and post a comment explaining your situation to let the author know why this is important. You could also try to update the plugin yourself and open a pull request.

If you can't wait for the author to update the plugin, you have two options:

* Fork the plugin and update it to support `embed/embed` in version ^4.0. I don't recommend this as it places additional maintenance burden on your project.
* Remove one of the two plugins to avoid the version conflict.

> **Comments:**
> **username_0**: Very clarifying answer. Thanks. I will remove whichever one causes the least pain.  

---

