<p>Answer - for some reason the highest version of Craft the update was offering was 3.7.19</p>
<p>Checking online showed that 3.8.12 was available, going straight to this version with php craft update craft:3.8.12 resolved the issue and the update was successful.</p>

CC BY-SA 4.0
2023-08-23T04:07:03.573Z
This was tremendously helpful, thank you!
Nick Benson
CC BY-SA 4.0
2023-05-24T11:20:42.897Z
2023-05-24T11:20:42.897Z
Mark
<p>I had yiisoft/yii2 4.0.48.1 installed when I tried to upgrade and experienced the exact same issue above craftcms/cms &quot;3.7.8.  The version of yii2 to use wasn't specified in my composer.json file.  I downgraded yiisoft/yii2 to version 2.0.43 with <code>composer require  yiisoft/yii2 2.0.42.1</code> and then it worked fine.</p>

CC BY-SA 4.0
2023-09-19T15:51:40.113Z
Helped a lot, thanks
RomanAvr
CC BY-SA 4.0
2023-06-16T19:09:14.740Z
2023-06-16T19:09:14.740Z
LeeMel
<p>I'm trying to update Craft to the latest version of Craft 3, I can get as far as version 3.7.8, but any version higher than that causes an error 500 on both front and backend.</p>
<p>I'm using a Mac and Mamp and in phperrors.log, I can see this error:</p>
<p><code>[24-May-2023 10:38:40 UTC] PHP Fatal error:  Declaration of craft\helpers\FileHelper::getExtensionByMimeType($mimeType): string must be compatible with yii\helpers\BaseFileHelper::getExtensionByMimeType($mimeType, $preferShort = false, $magicFile = null) in /Users/user/Desktop/Websites/SiteName/craft/vendor/craftcms/cms/src/helpers/FileHelper.php on line 719</code></p>

<updates>
3.7.9 and above update issue
# 3.7.9 and above update issue

(Asked by: username_0 on 2023-05-24)

I'm trying to update Craft to the latest version of Craft 3, I can get as far as version 3.7.8, but any version higher than that causes an error 500 on both front and backend.

I'm using a Mac and Mamp and in phperrors.log, I can see this error:

`[24-May-2023 10:38:40 UTC] PHP Fatal error: Declaration of craft\helpers\FileHelper::getExtensionByMimeType($mimeType): string must be compatible with yii\helpers\BaseFileHelper::getExtensionByMimeType($mimeType, $preferShort = false, $magicFile = null) in /Users/user/Desktop/Websites/SiteName/craft/vendor/craftcms/cms/src/helpers/FileHelper.php on line 719`

**Tags:** updates


---

## 2 answers

### Answer by username_0 on 2023-05-24. Score: 6

Answer - for some reason the highest version of Craft the update was offering was 3.7.19

Checking online showed that 3.8.12 was available, going straight to this version with php craft update craft:3.8.12 resolved the issue and the update was successful.

> **Comments:**
> **username_1**: This was tremendously helpful, thank you!  

---

### Answer by username_2 on 2023-06-16. Score: 2

I had yiisoft/yii2 4.0.48.1 installed when I tried to upgrade and experienced the exact same issue above craftcms/cms "3.7.8. The version of yii2 to use wasn't specified in my composer.json file. I downgraded yiisoft/yii2 to version 2.0.43 with `composer require yiisoft/yii2 2.0.42.1` and then it worked fine.

> **Comments:**
> **username_3**: Helped a lot, thanks  

---

