[GH-ISSUE #1876] Uncaught Error: Class "Monolog\Logger" not found #799

Closed
opened 2026-03-04 02:18:08 +03:00 by kerem · 9 comments
Owner

Originally created by @Justman100 on GitHub (Apr 1, 2024).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1876

Hi, if i use Composer, this comes:

PHP Fatal error: Uncaught Error: Class "Monolog\Logger" not found in /home/mt/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php:60
Stack trace:

I use the version 3.5.0

Originally created by @Justman100 on GitHub (Apr 1, 2024). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1876 Hi, if i use Composer, this comes: > PHP Fatal error: Uncaught Error: Class "Monolog\Logger" not found in /home/mt/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php:60 Stack trace: I use the version 3.5.0
kerem 2026-03-04 02:18:08 +03:00
  • closed this issue
  • added the
    Support
    label
Author
Owner

@stof commented on GitHub (Apr 1, 2024):

This error does not make any sense. The Monolog\Logger class exists in Monolog. Make sure you don't have a corrupted vendor/monolog/monolog folder (you can use composer reinstall monolog/monolog)

<!-- gh-comment-id:2029651857 --> @stof commented on GitHub (Apr 1, 2024): This error does not make any sense. The `Monolog\Logger` class exists in Monolog. Make sure you don't have a corrupted `vendor/monolog/monolog` folder (you can use `composer reinstall monolog/monolog`)
Author
Owner

@Justman100 commented on GitHub (Apr 1, 2024):

This error does not make any sense. The Monolog\Logger class exists in Monolog. Make sure you don't have a corrupted vendor/monolog/monolog folder (you can use composer reinstall monolog/monolog)

Still comes

<!-- gh-comment-id:2029907875 --> @Justman100 commented on GitHub (Apr 1, 2024): > This error does not make any sense. The `Monolog\Logger` class exists in Monolog. Make sure you don't have a corrupted `vendor/monolog/monolog` folder (you can use `composer reinstall monolog/monolog`) Still comes
Author
Owner

@Justman100 commented on GitHub (Apr 1, 2024):

It occurs a another error too

PHP Fatal error: Declaration of Monolog\Logger::emergency(Stringable|string $message, array $context = []): void must be compatible with PsrExt\Log\LoggerInterface::emergency($message, array $context = []) in /home/mt/vendor/monolog/monolog/src/Monolog/Logger.php on line 681

<!-- gh-comment-id:2029919751 --> @Justman100 commented on GitHub (Apr 1, 2024): It occurs a another error too > PHP Fatal error: Declaration of Monolog\Logger::emergency(Stringable|string $message, array $context = []): void must be compatible with PsrExt\Log\LoggerInterface::emergency($message, array $context = []) in /home/mt/vendor/monolog/monolog/src/Monolog/Logger.php on line 681
Author
Owner

@stof commented on GitHub (Apr 2, 2024):

Do you have the psr PHP extension installed ? If yes, please remove it. This extension is totally broken because it does not account for the fact that all psr/* packages have multiple versions. The working way is to rely on the userland implementation of the PSR interfaces which are managed by composer.

<!-- gh-comment-id:2031359811 --> @stof commented on GitHub (Apr 2, 2024): Do you have the `psr` PHP extension installed ? If yes, please remove it. This extension is totally broken because it does not account for the fact that all `psr/*` packages have multiple versions. The working way is to rely on the userland implementation of the PSR interfaces which are managed by composer.
Author
Owner

@Justman100 commented on GitHub (Apr 2, 2024):

Do you have the psr PHP extension installed ? If yes, please remove it. This extension is totally broken because it does not account for the fact that all psr/* packages have multiple versions. The working way is to rely on the userland implementation of the PSR interfaces which are managed by composer.

Hmm, removed! But still comes

<!-- gh-comment-id:2031708560 --> @Justman100 commented on GitHub (Apr 2, 2024): > Do you have the `psr` PHP extension installed ? If yes, please remove it. This extension is totally broken because it does not account for the fact that all `psr/*` packages have multiple versions. The working way is to rely on the userland implementation of the PSR interfaces which are managed by composer. Hmm, removed! But still comes
Author
Owner

@Justman100 commented on GitHub (May 3, 2024):

@Seldaek

<!-- gh-comment-id:2092636706 --> @Justman100 commented on GitHub (May 3, 2024): @Seldaek
Author
Owner

@Seldaek commented on GitHub (May 3, 2024):

@Justman100 yeah sorry i have no idea.. this seems to be an environment issue.

<!-- gh-comment-id:2093105024 --> @Seldaek commented on GitHub (May 3, 2024): @Justman100 yeah sorry i have no idea.. this seems to be an environment issue.
Author
Owner

@keshavvin commented on GitHub (Dec 12, 2024):

Fatal error: Uncaught Error: Class "Monolog\Logger" not found in C:\wamp\www\donor\modules\Vtiger\helpers\Logger.php:83 Stack trace: #0 C:\wamp\www\donor\include\logging.php(24): require_once() #1 C:\wamp\www\donor\include\database\PearDatabase.php(16): require_once('C:\wamp\www\don...') #2 C:\wamp\www\donor\include\utils\UserInfoUtil.php(12): require_once('C:\wamp\www\don...') #3 C:\wamp\www\donor\vtlib\Vtiger\Access.php(10): include_once('C:\wamp\www\don...') #4 C:\wamp\www\donor\vtlib\Vtiger\ModuleBasic.php(10): include_once('C:\wamp\www\don...') #5 C:\wamp\www\donor\vtlib\Vtiger\Module.php(12): include_once('C:\wamp\www\don...') #6 C:\wamp\www\donor\prospect.php(3): include_once('C:\wamp\www\don...') #7 {main} thrown in C:\wamp\www\donor\modules\Vtiger\helpers\Logger.php on line 83
how to resolve this error in vtiger v- 8

<!-- gh-comment-id:2538519825 --> @keshavvin commented on GitHub (Dec 12, 2024): Fatal error: Uncaught Error: Class "Monolog\Logger" not found in C:\wamp\www\donor\modules\Vtiger\helpers\Logger.php:83 Stack trace: #0 C:\wamp\www\donor\include\logging.php(24): require_once() #1 C:\wamp\www\donor\include\database\PearDatabase.php(16): require_once('C:\\wamp\\www\\don...') #2 C:\wamp\www\donor\include\utils\UserInfoUtil.php(12): require_once('C:\\wamp\\www\\don...') #3 C:\wamp\www\donor\vtlib\Vtiger\Access.php(10): include_once('C:\\wamp\\www\\don...') #4 C:\wamp\www\donor\vtlib\Vtiger\ModuleBasic.php(10): include_once('C:\\wamp\\www\\don...') #5 C:\wamp\www\donor\vtlib\Vtiger\Module.php(12): include_once('C:\\wamp\\www\\don...') #6 C:\wamp\www\donor\prospect.php(3): include_once('C:\\wamp\\www\\don...') #7 {main} thrown in C:\wamp\www\donor\modules\Vtiger\helpers\Logger.php on line 83 how to resolve this error in vtiger v- 8
Author
Owner

@bhuyInfinitalk279 commented on GitHub (Jan 31, 2025):

make sure you imported this code require 'vendor/autoload.php';

<!-- gh-comment-id:2626209877 --> @bhuyInfinitalk279 commented on GitHub (Jan 31, 2025): make sure you imported this code `require 'vendor/autoload.php';`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#799
No description provided.