Skip to content

Clean up and clarify autoloader section in Sf2 vs sf1 comparison chapter #2331

Closed
@caponica

Description

@caponica

At the moment the section about Autoloading in the Sf2 vs sf1 comparison chapter is a bit muddled up. It has been partly updated to deal with the changes that came with using composer from Sf2.1 but still references /vendor/bundles (which no longer exists).

Quote from latest version:

As mentioned before, for the autoloader to work, it needs to know that the Sensio
namespace lives in the vendor/bundles directory and that...

As well as this, the explanation doesn't really make it clear how Symfony / composer knows that the namespace of Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle maps to vendor/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle/SensioFrameworkExtraBundle.php.

The last part of the path is easy enough - but how does composer figure out the vendor/sensio/framework-extra-bundle part of the path?

I'm new at this, but I guess that somewhere the Sensio namespace is mapped to vendor/sensio/framework-extra-bundle/Sensio - but where is this done? Or have I completely misunderstood?

The filename is cookbook/symfony1.rst and the section header is "Autoloading". See also some brief comments in #2324 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionableClear and specific issues ready for anyone to take them.bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions