I want to install event dispatcher. I have downloaded composer and I have put this in composer.json
file
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
"doctrine/orm": "2.2.*",
"doctrine/doctrine-bundle": "dev-master",
"twig/extensions": "dev-master",
"symfony/assetic-bundle": "dev-master",
"symfony/swiftmailer-bundle": "dev-master",
"symfony/monolog-bundle": "dev-master",
"sensio/distribution-bundle": "dev-master",
"sensio/framework-extra-bundle": "dev-master",
"sensio/generator-bundle": "dev-master",
"jms/security-extra-bundle": "1.1.*",
"jms/di-extra-bundle": "1.0.*",
**"symfony/event-dispatcher": "dev-master"**
But I am still not able to install it.
I get this error
PHP Fatal error: Class 'Symfony\Component\ClassLoader\UniversalClassLoader' not found in /home/xxxxx/public_html/cxxxxx/Symfony/app/autoload.php
You are requiring symfony/symfony
which includes the event-dispatcher. So adding it is not needed. Once composer is working, you will have access to it.
The actual problem however is that you're trying to use composer, but didn't adapt your autoload.php
to use the composer autoloader.
Take a look at the Symfony Standard Edition's autoload.php
. If you do things like this, you will get rid of your error.