Type error: Argument 1 passed to Monolog\Utils::getClass() must be an instance of Monolog\object
Error reason.
Because the PHP version is too high, 2.x minimum requirement PHP7.2 The official original words are as follows:
https://github.com/Seldaek/monolog
Requirements
Monolog ^2.0
works with PHP 7.2 or above, use Monolog ^1.25
for PHP 5.3+ support.
Solution:
composer downgrade monolog/monolog version
"require": {
"monolog/monolog": "^1.25",
}
Read More:
- PHP Error Object of class mysqli could not be converted to string in
- [Solved] Model Error: must return a relationship instance
- Using $this when not in object context in (How to Fix)
- PHP use __Sleep() and __wakeup() method serializes the object
- How to Solve PHP Fatal error: Namespace declaration statement has to be the very first statement
- [Solved] TP5 Post receive array error: variable type error: array
- [Solved] ‘node’ command failed to start the project, with an error: “unknown database’ mydb ‘”
- [PHP] __autoload function will be called when class_exists does not exist
- /www/server/php/56/sbin/php-fpm:error while loading shared libraries:libssl.so.1.0. 0:cannot open shared object file:No such file or directory
- Undefined index: name error in composer [How to Solve]
- Fatal error: Function name must be a string in
- composer Error: The requested PHP extension ext-bcmath * is missing from your system. Install or enable
- composer Failed to decode response: zlib_decode(): data error
- [Solved] Laravel admin Error: Symfony\Component\Debug\Exception\FatalThrowableError : Class ‘Doctrine\DBAL\Driver\PDOMySql\Driver’ not found
- PHP solves the problem that composer exceeds the memory size Allowed memory size
- [Solved] PHPMailer Error: SMTP ERROR: Failed to connect to server: (0)
- [Solved] PHPMailer Failed to Send Email: SMTP Error: Could not connect to SMTP host.
- [Solved] cURL error 60: SSL certificate problem: unable to get local issuer certificate
- composer Error while processing content unencoding: Unknown failure within decompression softwar
- [Solved] Fatal error: Class ‘think\Container‘ not found & [InvalidArgumentException] Could not find package