Symfony2 – ContextErrorException: Warning: constant(): Couldn’t find constant Monolog\Logger::DEBUG in C:\wamp\www\Symfony\vendor\symfony\monolog-bundle\Symfony\Bundle\MonologBundle\DependencyInjection\MonologExtension.php line 110

Wow, great, you’ve just installed your symfony2 project and got this wonderful error, and you’re stucked.

Keep calm, this error only occured because Monolog has switched to PSR-4 compatible autoloading.

So, if you’re running this error, it is maybe because your composer version is too old,  type these commands to solve the problem

composer.phar self-update //Update composer.phar package
composer.phar update //Update dependencies
Advertisements
Symfony2 – ContextErrorException: Warning: constant(): Couldn’t find constant Monolog\Logger::DEBUG in C:\wamp\www\Symfony\vendor\symfony\monolog-bundle\Symfony\Bundle\MonologBundle\DependencyInjection\MonologExtension.php line 110

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s