Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Autoload classmap #4

Open
vasil-atanasov opened this issue Sep 16, 2014 · 3 comments
Open

Autoload classmap #4

vasil-atanasov opened this issue Sep 16, 2014 · 3 comments

Comments

@vasil-atanasov
Copy link

The autoload class map won't include the oauth-php classes, and when used without require('lib/Semantics3.php'); oauth-php classes are not loaded.

Wont be better to use

"autoload": {
"files": ["lib/Semantics3.php"]
}

in composer.json file instead of

"autoload": {
"classmap": ["lib/Semantics3/"]
}

@ducnguyenhuy-agilityio
Copy link

Hi @vasil-atanasov,

Seem I got a problem as you reported above. I got an error: include(OAuthStore.php) [function.include]: failed to open stream: No such file or directory

Btw, I'm using Yii framework.

Please let me know how to fix this.

Thanks.

@ducnguyenhuy-agilityio
Copy link

Oh, I think we need to include lib/Semantics3.php in any cases, @vasil-atanasov. I wish we don't do that.

Btw, my issue is fixed by including lib/Semantics3.php.

@janhartigan
Copy link
Contributor

A slightly less shitty solution is to use your own composer.json to autoload the oauth library classmap like so:

"classmap": [
    "vendor/semantics3/semantics3-php/lib/oauth-php/library"
],

Of course, god help you if you want to use that library independently of Semantics3. This highlights the problem with using a non-composer library like this. @vinothgopi it would probably be a good idea to use an oauth library that is on packagist.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants