V
V
Valery2013-09-13 14:19:03
PHP
Valery, 2013-09-13 14:19:03

Why does Composer crash on Symfony cache flush?

Good evening, happy holidays everyone :)

There is Symfony 2.3 with a bunch of other packages. All of this is managed by Composer.
It worked for itself and did not know problems.

Then I manually ran the dump with the "-o" switch

composer dumpautoload -o

And now, every time you update (composer update), and no matter which package (or all of them), it crashes on resetting the Symfony2.3 cache, because. can't find the class. Although the file and class exist of course.

If you then manually execute
composer dumpautoload -o
app/console cache:clear
.....

That's all right.

But it itself is launched without the "-o" flag, and thus crashes every time.

What am I doing wrong, and how to return it as it was?) I hope I explained it clearly ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2013-09-13
Protko @Fesor

when you ask composer to generate an optimized autoloader for you, it will generate a hashmap of all classes so that you don’t have to check if the file exists or not, search through directories, etc. So in theory when you do a composer update this hashmap is not updated. That's why it works with the -o flag. In theory, calling the dumpautoload command again without the `o` option should solve the problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question