mr1031011
mr1031011

Reputation: 3812

How do I set the correct settings for my composer installer

My current folder structure: Composer/PluginInstaller.php

The content of composer.json:

{
    "name": "zepluf/installer",
    "type": "composer-installer",
    "description": "Composer installer for ZePLUF addons.",
    "homepage": "http://github.com/zepluf/installer",
    "license": "custom",
    "authors": [
        {
            "name": "Raine Ng",
            "email": "[email protected]",
            "homepage": "http://rubikin.com"
        }
    ],
    "autoload": {
        "psr-0": {
            "Zepluf\\Composer": "Composer"
        }
    },
    "extra": {
        "class": "Zepluf\\Composer\\PluginInstaller"
    },
    "target-dir": "zepluf/Composer"
}

I would like the installer to be put inside:

vendor/zepluf/Composer/PluginInstaller.php

The problem is that I keep getting:

Fatal error: Class 'Zepluf\Composer\PluginInstaller' not found in phar://C:/Prog ramData/Composer/bin/composer.phar/src/Composer/Installer/InstallerInstaller.php on line 102

Any pointer will be greatly appreciated

Upvotes: 1

Views: 514

Answers (1)

Seldaek
Seldaek

Reputation: 42046

Assuming PluginInstaller.php is at the root of your package, it should be configured like this:

// ...

"autoload": {
    "psr-0": {
        "Zepluf\\Composer": ""
    }
},
"extra": {
    "class": "Zepluf\\Composer\\PluginInstaller"
},
"target-dir": "Zepluf/Composer"

Upvotes: 1

Related Questions