Whenever you use an undefined class, PHP uses the autoloading mechanism to
delegate the loading of a file defining the class. Symfony2 provides a
"universal" autoloader, which is able to load classes from files that
implement one of the following conventions:

In this example, if you try to use a class in the Doctrine\Common namespace
or one of its children, the autoloader will first look for the class under the
doctrine-common directory, and it will then fallback to the default
Doctrine directory (the last one configured) if not found, before giving up.
The order of the registrations is significant in this case.