You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 .
The text was updated successfully, but these errors were encountered:
This way of autoloading is no longer required; Composer does all the autoloading tasks for all packages that are installed with Composer.
In some very specific cases, where you put files outside any of the registered directories (in SE, these are src, app and vendor), you should worry about registering the autoloading. This is done in the composer.json file (documentation about that).
Basically, we should remove this namespace registering stuff from the 2.1 branch and replace it with some note which says that it's done by Composer and if you use some other dir, you need to edit your composer.json file + a link to their docs.
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 well as this, the explanation doesn't really make it clear how Symfony / composer knows that the namespace of
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle
maps tovendor/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 tovendor/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 .
The text was updated successfully, but these errors were encountered: