This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

RuntimeException with message The autoloader expected

Discuss installing Symfony 2 here

RuntimeException with message The autoloader expected

by kimu » Wed May 01, 2013 4:12 pm

Today I was trying to fix this problem https://github.com/symfony/symfony/issues/5279, I followed the instruction and launched php build-data.php 42 before and then php build-data.php 49, but every command led me to a failure.
Not being sure that the installation of symfony was still clean I decided to re-install symfony again.
So I've removed everything under vendor
rm -rf vendor/*
and then installed everything again
php composer.phar install

After the installation my application doesn't start anymore, always showing me some error like
Fatal error: Uncaught exception 'RuntimeException' with message 'The autoloader expected class "Symfony\Component\HttpKernel\Debug\ErrorHandler" to be defined in file "/(...)/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php". The file was found but the class was not in it, the class name or namespace probably has a typo.' in /(...)/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/DebugClassLoader.php on line 101


I've tried to install and reinstall everything a dozen of times, but the error it's still there, although the class mentioned in the error changes.
The last one is
RuntimeException: The autoloader expected class "Symfony\Component\HttpFoundation\Session\Session" to be defined in file ...


It worked before. Nothing is changed on the LAMP side, apache and php are the same as before, so I don't really understand WTF is going on.

I have to say that I'm on the ninth day of work trying to upgrade my application from 2.0 to 2.1. I'm completely drawn out, exhausted and totally pissed off.
I really hope that someone can help to find the way out from this new issue, because I don't know what else I can do.

Seeing that composer was loading all packages from its own cache, I've also removed ~.composer/ to download everything new, but it didn't solve the problem.
Have anybody else experienced (and hopefully solved) a similar problem?
kimu
Junior Member
 
Posts: 2
Joined: Wed May 01, 2013 3:42 pm

Re: RuntimeException with message The autoloader expected

by moesef » Wed Jul 10, 2013 7:41 pm

Hi kimu,

Im going through the same exact problem right now. What fixed this issue for you?

Thanks
moesef
Junior Member
 
Posts: 1
Joined: Wed Jul 10, 2013 7:38 pm

Re: RuntimeException with message The autoloader expected

by kimu » Thu Jul 11, 2013 4:23 pm

Hi Moesef,
I'm sorry but I don't remember exactly what I did. Upgrading from 2.0 to 2.1 has been exhausting, so many problems to solve and I haven't tracked down all of 'em. The problem was related with composer cache. I think I've reinstalled everything from scratch, but I can't remember what else I did.
I remember that I found some post or issue on github related to the problem with the composer cache and that helped me solve the problem. No link, sorry.

Good luck!
I'll upgrade from 2.1 to 2.2 and then to 2.3 very soon. I really hope it won't be another massacre.
kimu
Junior Member
 
Posts: 2
Joined: Wed May 01, 2013 3:42 pm