[PR #929] [MERGED] Php5.3 autoload errors #1419

Open
opened 2026-03-04 03:12:44 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Seldaek/monolog/pull/929
Author: @fabriceparallel
Created: 2/21/2017
Status: Merged
Merged: 3/12/2017
Merged by: @Seldaek

Base: 1.xHead: php5.3_autoload_errors


📝 Commits (3)

  • 8140f60 make ErrorHandler extends LogLevel to avoid autoloading issue when error is triggered on compile
  • d4e22a6 Revert "make ErrorHandler extends LogLevel to avoid autoloading issue when error is triggered on compile"
  • 50d6a76 call class_exists with force autoload set to true, to force the autoload of LogLevel on registration of the handlers

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 src/Monolog/ErrorHandler.php (+3 -0)

📄 Description

See this PHP5.3 bug

When an error is triggered on compile-time the autoloader is not called which create a "LogLevel class not found" error.

I make the ErrorHandler extend LogLevel so ErrorHandler will already have all the log level it's looking for, and the autoloader won't be called.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Seldaek/monolog/pull/929 **Author:** [@fabriceparallel](https://github.com/fabriceparallel) **Created:** 2/21/2017 **Status:** ✅ Merged **Merged:** 3/12/2017 **Merged by:** [@Seldaek](https://github.com/Seldaek) **Base:** `1.x` ← **Head:** `php5.3_autoload_errors` --- ### 📝 Commits (3) - [`8140f60`](https://github.com/Seldaek/monolog/commit/8140f6026f59a2be9f80e562cf6ad6d441241593) make ErrorHandler extends LogLevel to avoid autoloading issue when error is triggered on compile - [`d4e22a6`](https://github.com/Seldaek/monolog/commit/d4e22a682cba5f02f9071a4da6c5b1237cfd2f88) Revert "make ErrorHandler extends LogLevel to avoid autoloading issue when error is triggered on compile" - [`50d6a76`](https://github.com/Seldaek/monolog/commit/50d6a76d269865320f2c5e786ae8c68dfb27d422) call class_exists with force autoload set to true, to force the autoload of LogLevel on registration of the handlers ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/Monolog/ErrorHandler.php` (+3 -0) </details> ### 📄 Description See this [PHP5.3 bug](https://bugs.php.net/bug.php?id=47987) When an error is triggered on compile-time the autoloader is not called which create a "`LogLevel` class not found" error. I make the ErrorHandler extend LogLevel so ErrorHandler will already have all the log level it's looking for, and the autoloader won't be called. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#1419
No description provided.