Skip to content

composer fails to autoload the class #5

Description

@javorszky

I'm using (or rather trying to) implement everything that client-cli does, except... well, without the cli part.

I have pretty much everything working. Here's my composer.json file:

{
    "name": "javorszky/wp-oauth1",
    "description": "My feeble attempt at an oauth1 client",
    "require": {
        "wp-api/client": "dev-master",
        "rmccue/requests": "~1.6",
        "justinrainbow/json-schema": "dev-master",
        "markjaquith/wp-tlc-transients": "*"
    }
}

Everything installs fine. I'm trying to instantiate a new WPAPI;, but I get the error Fatal error: Class 'WPAPI' not found in /file.php line 1

The path to the file is: vendor/wp-api/client/library/WPAPI.php.

I tried to follow the flow in vendor/composer/ClassLoader.php, and while WPAPI is getting passed there, none of the tries match the file it would be in.

I'm not even sure this is an issue of WPAPI or composer, or a combination of, or I'm doing it wrong(:tm:)

Where do I start to debug this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions