2016-11-26 5 views
1

モジュールとそのプライベートレポを作成しました。私はそれのためcomposer.jsonファイルを作成しました:カスタムSilverStripeモジュールがベンダフォルダにインストールされます

{ 
    "name": "company/sync", 
    "description": "sync", 
    "type": "silverstripe-module", 
    "authors": [{ 
     "name": "XXXX", 
     "email": "XXXX" 
    }], 
    "require": { 
     "silverstripe/framework": "~3.2", 
     "composer/installers": "~1.0" 
    }, 
    "extra": { 
     "installer-name": "sync" 
    }, 
    "minimum-stability": "dev" 
} 

そして私は私のメインのプロジェクトcomposer.json持っている:パッケージはsilverstripe-moduleとしてマークされている、私が読んだから

{ 
    "name": "silverstripe/installer", 
    "description": "The SilverStripe Framework Installer", 
    "repositories": [ 
     { 
      "type": "package", 
      "package": { 
       "name": "company/sync", 
       "version": "master", 
       "source": { 
        "url": "[email protected]:xxx/sync.git", 
        "type": "git", 
        "reference": "master" 
       } 
      } 
     } 
    ], 
    "require": { 
     "php": ">=5.3.3", 
     "silverstripe/cms": "3.3.1", 
     "silverstripe/framework": "3.3.1", 
     "silverstripe/reports": "3.3.1", 
     "silverstripe/siteconfig": "3.3.1", 
     "silverstripe-themes/simple": "3.1.*", 
     "company/sync": "*" 
    }, 
    "require-dev": { 
     "phpunit/PHPUnit": "~3.7" 
    }, 
    "extra": { 
     "branch-alias": { 
      "3.x-dev": "3.3.x-dev" 
     }, 
     "installer-paths": { 
      "sync": ["company/sync"] 
     } 
    }, 
    "config": { 
     "process-timeout": 600 
    }, 
    "prefer-stable": true, 
    "minimum-stability": "dev" 
} 

をそれそれをインストールのルートに置くべきです。私はまた、extraパラメータを介して設定しようとしましたが、依然としてvendor/company/syncに配置されています。私は間違って何をしていますか?

答えて

2

あなたの問題はあなたのカスタム "リポジトリ"エントリだと思います。 「パッケージ」エントリを定義することによって、コンポーザにパッケージのプロパティを伝え、リポジトリのcomposer.jsonを検索しません。

したがって、「タイプ」と他のフィールドを追加するか、リポジトリからcomposer.jsonを使用する「vcs」エントリを使用するだけで、「パッケージ」エントリを完全に定義することができます。例えば。 composer.json自分自身を持って、あなたはどんな作曲メタデータを持っていない情報源に依存している場合のみ、「パッケージ」を使用してリポジトリの使用の「VCS」:要するに

"repositories": [ 
    { 
     "type": "vcs", 
     "url": "[email protected]:xxx/sync.git" 
    } 
] 

関連する問題