Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: Class "Monolog\Logger" not found #1876

Open
Justman100 opened this issue Apr 1, 2024 · 7 comments
Open

Uncaught Error: Class "Monolog\Logger" not found #1876

Justman100 opened this issue Apr 1, 2024 · 7 comments
Labels

Comments

@Justman100
Copy link

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

@Justman100 Justman100 added the Bug label Apr 1, 2024
@stof
Copy link
Contributor

stof commented 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)

@Justman100
Copy link
Author

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

@Justman100
Copy link
Author

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

@stof
Copy link
Contributor

stof commented 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.

@Justman100
Copy link
Author

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

@Seldaek Seldaek added Support and removed Bug labels Apr 12, 2024
@Justman100
Copy link
Author

@Seldaek

@Seldaek
Copy link
Owner

Seldaek commented May 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants