Composer Autoload #39

Closed
harikt opened this Issue Feb 17, 2013 · 5 comments

Comments

Projects
None yet
2 participants
Member

harikt commented Feb 17, 2013

Hi @pmjones ,

There is a problem with the way we are autoloading the composer stuffs.

/media/Linux/aurasystem [develop] $ ls vendor/composer/
autoload_classmap.php  autoload_namespaces.php  autoload_real.php  ClassLoader.php  installed.json

You can notice autoload_real.php . When I installed nette/nette , the problem I noticed is nette uses its own loader.

"autoload": {
    "files": ["Nette/loader.php"]
},

https://github.com/nette/nette/blob/debugger/composer.json#L27

Which is written in autoload_real.php .

And the https://github.com/auraphp/Aura.Framework/blob/develop/src/Aura/Framework/Autoload/Loader.php#L34 will not load for we are only checking classmap and namespace . Wondering whether it is a good idea to completely relay on vendor/autoload.php

Thought ?

Owner

pmjones commented Feb 17, 2013

What do you think is the solution here?

Member

harikt commented Feb 17, 2013

I feel composer autoload works. or we need to require autoload_real.php also. But I haven't looked more on the 4 classes.

Owner

pmjones commented Mar 19, 2013

It looks like autoload.php includes autoload_real.php. E.g.:

<?php

// autoload.php generated by Composer

require_once __DIR__ . '/composer' . '/autoload_real.php';

return ComposerAutoloaderInitadcd2cce93e367f1cf29d2edab1c0721::getLoader();

Other ideas?

Member

harikt commented Mar 19, 2013

Hm,

then adding autoload_real.php will not work, for the class may differ
according to the commit hash I guess.

Hari K T

http://harikt.com , https://github.com/auraphp

On Tue, Mar 19, 2013 at 9:11 AM, pmjones notifications@github.com wrote:

It looks like autoload.php includes autoload_real.php. E.g.:

Member

harikt commented Aug 23, 2013

We will be resolving this in v2 I assume. So let us close it for the time being.

@harikt harikt closed this Aug 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment