mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #265] What files to 'require'? #85
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#85
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rightaway on GitHub (Nov 3, 2013).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/265
I have manually required "monolog/src/Monolog/Logger.php" in my application (not using Composer) and get a "PHP Fatal error: Interface 'Psr\Log\LoggerInterface' not found in /path/to/monolog/src/Monolog/Logger.php on line 28" when running the application.
I figured I need to download this library (https://github.com/php-fig/log) and so also required "log/Psr/Log/LoggerInterface.php" but was getting the same problem.
How can I use monolog without Composer, instead just by requiring the right files?
@adlawson commented on GitHub (Nov 3, 2013):
@rightaway If you don't want to manually require all files (and you shouldn't) and you don't want to use composer to manage your autoloading, you should implement your own autoloader.
See the PHP docs for
spl_autoload_registerand the example autoloader implementation inPSR-0.