3

I am trying to install symfony2 without vendors and I keep getting the following error when running app_dev.php:

RuntimeException: The autoloader expected class "Symfony\Component\EventDispatcher\Event" to be defined in file "/var/www/caremonk/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Event.php". The file was found but the class was not in it, the class name or namespace probably has a typo.

I've installed the correct files and vendors via: php composer.phar update php composer.phar install

I've also checked the file that Symfony2 was complaining about and the file's contents are:

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\EventDispatcher;

/**
 * Event is the base class for classes containing event data.
 *
 * This class contains no event data. It is used by events that do not pass
 * state information to an event handler when an event is raised.
 *
 * You can call the method stopPropagation() to abort the execution of
 * further listeners in your event listener.
 *
 * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
 * @author  Jonathan Wage <jonwage@gmail.com>
 * @author  Roman Borschel <roman@code-factory.org>
 * @author  Bernhard Schussek <bschussek@gmail.com>
 *
 * @api
 */
class Event
{
   // Some more code
}

This is a standard symfony2 class that I have not touched, so I'm a little lost on what I need to do. How can I get rid of this error?

Dr.Knowitall
  • 10,080
  • 23
  • 82
  • 133

1 Answers1

4

Ran into a similar issue last night. Disabling and re-enabling APC seemed to do the trick.

mattexx
  • 6,456
  • 3
  • 36
  • 47
  • I just restarted apache, and for whatever reason that did the trick. Your suggestion lead me to do so, thanks! – Dr.Knowitall Jul 10 '13 at 20:02
  • Great! Some more googling led to this answer http://stackoverflow.com/questions/3144350/do-we-need-to-restart-apache-apc-after-new-version-deployment-of-app – mattexx Jul 10 '13 at 20:05