Answers.Body: <p>Anyone still looking for how to fix this, the answer is givin in the link above specifically the comment here: <a href="https://github.com/craftcms/cms/issues/13963#issuecomment-1830116976" rel="noreferrer">https://github.com/craftcms/cms/issues/13963#issuecomment-1830116976</a></p>
  <blockquote>
  <p>If you can't run php craft update because the incompatible psr/log version is already installed, you need to update to 4.5.11.1 manually using Composer. First, require that specific version of Craft with Composer:
  <code>composer require craftcms/cms:4.5.11.1</code>
  This will upgrade Craft to the specified version, which pins the psr/log dependency, so it will also downgrade that library to the supported version. After that, you can run php craft update again.
  Alternatively, if you're on an older version and can't update Craft for any reason, you can workaround this issue by explicitly requiring psr/log 1.x in your project:
  <code>composer require psr/log:^1.0.0</code>
  This will downgrade the package and fix the compatibility issue. Once you upgrade to Craft 4.5.11.1, you can remove the direct depency again.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-02T15:28:34.930Z
Answers.LastActivityDate: 2023-12-02T15:28:34.930Z
Answers.UserDisplayName: jpwdesigns
Answers.Body: <p>for now you might try to downgrade :</p>
  <ul>
  <li>psr/log to 1.1.4</li>
  <li>samdark/yii2-psr-log-target to 1.1.3</li>
  </ul>
  <p>this error cause of update <code>samdark/yii2-psr-log-target</code> from 1.1.3 to 1.1.4</p>
  <p>based : <a href="https://github.com/craftcms/cms/issues/13963" rel="nofollow noreferrer">https://github.com/craftcms/cms/issues/13963</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-24T06:26:39.250Z
Answers.Text: Thank you so much! That solved it.
Answers.UserDisplayName: kr37
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-24T06:36:52.847Z
Answers.Text: For clarity, this is just a (hopefully temporary) bug in a dependency package which was introduced within the past 48 hours. With any luck, it’ll soon be fixed by the package maintainer (or patched within Craft itself).
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-24T09:22:22.970Z
Answers.Text: Yup it's already fixed
Answers.UserDisplayName: Nixxian365
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-26T17:45:34.767Z
Answers.Text: This was fixed in Craft 4.5.11.1 https://github.com/craftcms/cms/releases/tag/4.5.11.1
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-28T14:57:09.453Z
Answers.Text: How do I fix this? How do I downgrade samdark/yii2-psr-log-target?
  
  I am unable to upgrade craft as this has already broken it. Thanks
Answers.UserDisplayName: Mark
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-24T03:54:13.210Z
Answers.LastActivityDate: 2023-11-28T18:20:53.537Z
Answers.LastEditDate: 2023-11-28T18:20:53.537Z
Answers.UserDisplayName: Nixxian365
Body: <p><code>&lt;Irrelevent preliminary context&gt;</code> Somewhere in the process not understanding modules and whether they get to have Variable classes, and running <code>php craft make module</code> and <code>composer dump-autoload -a</code> <code>&lt;/Irrelevant preliminary context&gt;</code> I edited the main craft/composer.json and ran into troubles. Ended up nuking the vendor folder and reinstalling, but now I have this error, which I can't get rid of after many hours, and which seems to happen very early in Craft's initialization process:</p>
  <p><strong>Type of craft\log\MonologTarget::$logger must be ?Psr\Log\LoggerInterface (as in class samdark\log\PsrTarget)</strong></p>
  <p>coming in
  <code>craft/vendor/craftcms/cms/src/log/MonologTarget.php</code> at the class definition of MonologTarget</p>
  <p>Any suggestions other than a complete reinstall of Craft?</p>
  
Tags: <composer>
Title: Monolog Logger error
ThreadText: # Monolog Logger error
  
  (Asked by: username_0 on 2023-11-23)
  
  `<Irrelevent preliminary context>` Somewhere in the process not understanding modules and whether they get to have Variable classes, and running `php craft make module` and `composer dump-autoload -a` `</Irrelevant preliminary context>` I edited the main craft/composer.json and ran into troubles. Ended up nuking the vendor folder and reinstalling, but now I have this error, which I can't get rid of after many hours, and which seems to happen very early in Craft's initialization process:
  
  **Type of craft\log\MonologTarget::$logger must be ?Psr\Log\LoggerInterface (as in class samdark\log\PsrTarget)**
  
  coming in
  `craft/vendor/craftcms/cms/src/log/MonologTarget.php` at the class definition of MonologTarget
  
  Any suggestions other than a complete reinstall of Craft?
  
  **Tags:** composer
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2023-11-24. Score: 4 | Accepted answer
  
  for now you might try to downgrade :
  
  * psr/log to 1.1.4
  * samdark/yii2-psr-log-target to 1.1.3
  
  this error cause of update `samdark/yii2-psr-log-target` from 1.1.3 to 1.1.4
  
  based : <https://github.com/craftcms/cms/issues/13963>
  
  > **Comments:**
  > **username_0**: Thank you so much! That solved it.  
  > **username_3**: For clarity, this is just a (hopefully temporary) bug in a dependency package which was introduced within the past 48 hours. With any luck, it’ll soon be fixed by the package maintainer (or patched within Craft itself).  
  > **username_2**: Yup it's already fixed  
  > **username_4**: This was fixed in Craft 4.5.11.1 https://github.com/craftcms/cms/releases/tag/4.5.11.1  
  > **username_5**: How do I fix this? How do I downgrade samdark/yii2-psr-log-target?  I am unable to upgrade craft as this has already broken it. Thanks  
  
  ---
  
  ### Answer by username_1 on 2023-12-02. Score: 6
  
  Anyone still looking for how to fix this, the answer is givin in the link above specifically the comment here: <https://github.com/craftcms/cms/issues/13963#issuecomment-1830116976>
  
  > If you can't run php craft update because the incompatible psr/log version is already installed, you need to update to 4.5.11.1 manually using Composer. First, require that specific version of Craft with Composer:
  > `composer require craftcms/cms:4.5.11.1`
  > This will upgrade Craft to the specified version, which pins the psr/log dependency, so it will also downgrade that library to the supported version. After that, you can run php craft update again.
  > Alternatively, if you're on an older version and can't update Craft for any reason, you can workaround this issue by explicitly requiring psr/log 1.x in your project:
  > `composer require psr/log:^1.0.0`
  > This will downgrade the package and fix the compatibility issue. Once you upgrade to Craft 4.5.11.1, you can remove the direct depency again.
  
  
  ---
  
  