3

I'm loading this repo:

{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "ivantcholakov/gibberish-aes-php",
                "version": "master",
                "source": {
                    "url": "https://github.com/ivantcholakov/gibberish-aes-php.git",
                    "type": "git",
                    "reference": "master"
                }
            }
        }
    ],
    "require": {
        "ivantcholakov/gibberish-aes-php": "*@dev"
    }
}

But the generated classmap is empty, and I can't use the repo:

<?php

// autoload_classmap.php generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
);

What is wrong with my composer.json setup?

PS: I ran update

1 Answer 1

6

You have to configure the autoload option for the repository like this:

{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "ivantcholakov/gibberish-aes-php",
                "version": "master",
                "source": {
                    "url": "https://github.com/ivantcholakov/gibberish-aes-php.git",
                    "type": "git",
                    "reference": "master"
                },
                "autoload": {
                    "classmap": ["/"]
                }
            }
        }
    ],
    "require": {
        "ivantcholakov/gibberish-aes-php": "*@dev"
    }
}

As seen in the commtents a fresh composer install is sometimes needed after that.

3
  • Can you double check that? It still didn't generate any classmaps for me Commented Jun 21, 2013 at 10:18
  • try to make a fresh install that helped me
    – gries
    Commented Jun 21, 2013 at 10:37
  • 1
    How weird, the clean install helped :p Commented Jun 21, 2013 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.