J7mbo / twitter-api-php

The simplest PHP Wrapper for Twitter API v1.1 calls
MIT License
1.82k stars 802 forks source link

composer.json "error" #201

Closed bkdotcom closed 8 years ago

bkdotcom commented 8 years ago
"autoload": {
        "files": ["TwitterAPIExchange.php"]
},

should be:

"autoload": {
        "classmap": ["TwitterAPIExchange.php"]
},

Files documentation

If you want to require certain files explicitly on every request then you can use the 'files' autoloading mechanism. This is useful if your package includes PHP functions that cannot be autoloaded by PHP.

On the other hand classmap:

You can use the classmap generation support to define autoloading for all libraries that do not follow PSR-0/4. To configure this you specify all directories or files(as I've done above) to search for classes.

TL;DR: as currently specified, TwitterAPIExchange.php is being required/included on every page load whether it will be used or not.

J7mbo commented 8 years ago

Thanks, committed and it'll go into develop soon.