2amigos / yiiaws

Amazon Web Services SDK PHP 2 Wrapper
21 stars 15 forks source link

Problem with composer autoload #21

Closed jordigg closed 11 years ago

jordigg commented 11 years ago

I'm new to Yii and composer but not to coding and PHP and I need help to setup the autoload for yii-aws.

I'm following the readme but when I look at the autoload file of composer it appears empty. Do I have to set something special? My composer.json looks like this one:

{
    "require": {
        "2amigos/yii-aws": "dev-master"
    },
    "config": {
        "vendor-dir": "protected/vendor"
    }
}

In the readme the "config" part it's not defined but I wrote it to autoinstall yii-aws in the right folder of my application but no autoload is set there. Now I'm loading it using:

Yii::import('application.vendor.2amigos.yii-aws.components.*');

in the middle of my code but I want to autoload it using composer autoload file.

Can someone help me?

Thanks!

tonydspaniard commented 11 years ago

My composer file on yiinitializr (I removed things that are not required):

{
    "name": "yiinitializr/basic",
    "description": "description_text",
    "keywords": [
        "yii",
        "application",
        "web",
        "boilerplate",
        "template"
    ],
    "homepage": "http://2amigos.us",
    "type": "yii-application",
    "license": "BSD-3-Clause",
    "minimum-stability": "dev",
    "config": {
        "vendor-dir": "common/lib/vendor"
    },
    "authors": [
        {
            "name": "Antonio Ramirez Cobos",
            "email": "amigo.cobos@gmail.com",
            "homepage": "http://www.ramirezcobos.com"
        },
        {
            "name": "Matt Tabin",
            "email": "amigo.tabin@gmail.com",
            "homepage": "http://2amigos.us"
        }
    ],
    "repositories":[
        {
            "type":"composer",
            "url":"http://packages.phundament.com"
        },
        {
            "type": "git",
            "url":"https://github.com/malyshev/yii-debug-toolbar.git",
            "vendor-alias": "malyshev"
        }
    ],
    "extra":[
        "dev"
    ],
    "require": {
        "yiisoft/yii": "1.1.13",
        "2amigos/yii-aws": "dev-full",
    },
}
tonydspaniard commented 11 years ago

As there is no more feedback... will close this issue