Reputation: 307
symfony/symfony v2.2.0
monolog/monolog v1.4.1
After running composer.phar update
yesterday, monolog was updated; running the same command today results in the following error message:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Generating autoload files
[ErrorException]
Warning: constant(): Couldn't find constant Monolog\Logger::DEBUG in [path]\vendor\symfony\monolog-bundle\Symfony\Bundle\MonologBundle\DependencyInjection\MonologExtension.php line 109
The (i think) relevant part of config_dev.yml
monolog:
handlers:
main:
type: stream
path: %kernel.logs_dir%/%kernel.environment%.log
level: debug
firephp:
type: firephp
level: info
Did something change that requires additional configuration, or is something else happening ?
Upvotes: 2
Views: 1289
Reputation: 3834
I had this same thing, but for Laravel.
I solved it by creating the app/storage
folder and all it's sub-folders and files.
I get them by creating a new empty project, and just a copy-paste !
Woking now...
Here is the file structure:
app/storage/cache
app/storage/logs
app/storage/meta
app/storage/sessions
app/storage/views
You can ignore this folder for your repository.
Upvotes: 1
Reputation: 306
Monolog recently switch to PSR-4 compatible autoloading. Possibly, the version of Composer you're running is too old for that. Please run composer self-update first and try to update your dependencies again.
Upvotes: 15
Reputation: 42056
Sounds like the update didn't go well - do you have a Logger class in vendor/monolog/monolog/src/Monolog/Logger.php
? If not I would suggest deleting the vendor/monolog
dir and running composer install to get it back.
Upvotes: 0