2014-12-21 107 views
1

我正在嘗試創建一個composer.json下載特定版本的燃料。這是目前非常簡單:使用作曲家下載php燃料

{ 
    "require": { 
     "fuel/fuel": "dev-1.7/master" 
    } 
} 

但這無法安裝,因爲沒有上packagist here上市已滿足所有依賴性。我試過1.6,1.7,1.8。

我誤會了什麼嗎?爲什麼我不能用作曲家下載燃料?

編輯:爲了清楚起見,我不是想創建一個全新的項目,而是隻是下載現有項目中的fule庫。 @gellu向我展示瞭如何手動添加不在packagist上的存儲庫,並且依靠fuel/core(而不是燃料本身,下載文檔,示例以及其他許多我不需要的東西),我只能下載庫因爲我想

+0

是否與在你身邊其他的包作曲家的工作? – OnlyMAJ

回答

1

手動添加所有倉庫將幫助:

{ 
"repositories": [ 
    { 
     "type": "package", 
     "package": { 
      "name": "fuel/auth", 
      "type": "fuel-package", 
      "version": "1.7.2", 
      "dist": { 
       "url": "https://github.com/fuel/auth/archive/1.7/master.zip", 
       "type": "zip" 
      }, 
      "source": { 
       "url": "https://github.com/fuel/auth.git", 
       "type": "git", 
       "reference": "1.8/develop" 
      } 
     } 
    }, 
    { 
     "type": "package", 
     "package": { 
      "name": "fuel/email", 
      "type": "fuel-package", 
      "version": "1.7.2", 
      "dist": { 
       "url": "https://github.com/fuel/email/archive/1.7/master.zip", 
       "type": "zip" 
      }, 
      "source": { 
       "url": "https://github.com/fuel/email.git", 
       "type": "git", 
       "reference": "1.8/develop" 
      } 
     } 
    }, 
    { 
     "type": "package", 
     "package": { 
      "name": "fuel/oil", 
      "type": "fuel-package", 
      "version": "1.7.2", 
      "dist": { 
       "url": "https://github.com/fuel/oil/archive/1.7/master.zip", 
       "type": "zip" 
      }, 
      "source": { 
       "url": "https://github.com/fuel/oil.git", 
       "type": "git", 
       "reference": "1.8/develop" 
      } 
     } 
    }, 
    { 
     "type": "package", 
     "package": { 
      "name": "fuel/orm", 
      "type": "fuel-package", 
      "version": "1.7.2", 
      "dist": { 
       "url": "https://github.com/fuel/orm/archive/1.7/master.zip", 
       "type": "zip" 
      }, 
      "source": { 
       "url": "https://github.com/fuel/orm.git", 
       "type": "git", 
       "reference": "1.8/develop" 
      } 
     } 
    }, 
    { 
     "type": "package", 
     "package": { 
      "name": "fuel/parser", 
      "type": "fuel-package", 
      "version": "1.7.2", 
      "dist": { 
       "url": "https://github.com/fuel/parser/archive/1.7/master.zip", 
       "type": "zip" 
      }, 
      "source": { 
       "url": "https://github.com/fuel/parser.git", 
       "type": "git", 
       "reference": "1.8/develop" 
      } 
     } 
    }, 
    { 
     "type": "package", 
     "package": { 
      "name": "fuel/core", 
      "type": "fuel-package", 
      "version": "1.7.2", 
      "dist": { 
       "url": "https://github.com/fuel/core/archive/1.7/master.zip", 
       "type": "zip" 
      }, 
      "source": { 
       "url": "https://github.com/fuel/core.git", 
       "type": "git", 
       "reference": "1.8/develop" 
      } 
     } 
    }, 
    { 
     "type": "package", 
     "package": { 
      "name": "fuel/docs", 
      "type": "fuel-package", 
      "version": "1.7.2", 
      "dist": { 
       "url": "https://github.com/fuel/docs/archive/1.7/master.zip", 
       "type": "zip" 
      }, 
      "source": { 
       "url": "https://github.com/fuel/docs.git", 
       "type": "git", 
       "reference": "1.8/develop" 
      } 
     } 
    } 
], 

"require": { 
    "fuel/fuel": "dev-1.7/master" 
} 

}

+0

正是我需要的,謝謝! – Hamy

0

無論是簡單的要求命令我不能安裝燃料;但我確實設法通過執行以下命令成功安裝與作曲家:

composer create-project fuel/fuel:dev-1.8/develop --prefer-source 

我希望它適用於您的情況。

0

如果你想安裝1.7 /主:

$ composer create-project fuel/fuel:dev-1.7/master ProjectName 

如果你想安裝1.8 /開發:

$ composer create-project fuel/fuel:dev-1.8/develop --prefer-source ProjectName