Giter Site home page Giter Site logo

slince / composer-registry-manager Goto Github PK

View Code? Open in Web Editor NEW
544.0 12.0 48.0 315 KB

:hammer_and_wrench: :hammer: Composer registry manager that help to easily switch to the composer repository you want.

License: MIT License

PHP 100.00%
composer-registry-manager composer composer-plugin repository switch-repository mirror

composer-registry-manager's Introduction

CRM - Composer Registry Manager

Build Status Coverage Status Total Downloads Latest Stable Version Scrutinizer

Composer Registry Manager can help you easily and quickly switch between different composer repositories.

简体中文

Installation

Install via composer

$ composer global require slince/composer-registry-manager ^2.0

Example

List all available repositories

$ composer repo:ls

 --- ------------- ------------------------------------------------ ------------------------------
      composer      https://packagist.org                            Europe, Canada and Singapore
      aliyun        https://mirrors.aliyun.com/composer              China
      tencent       https://mirrors.cloud.tencent.com/composer       China
  *   huawei        https://mirrors.huaweicloud.com/repository/php   China
      cnpkg         https://php.cnpkg.org                            China
      sjtug         https://packagist.mirrors.sjtug.sjtu.edu.cn      China
      phpcomposer   https://packagist.phpcomposer.com                China
      kkame         https://packagist.kr                             South Korea
      hiraku        https://packagist.jp                             Japan
      webysther     https://packagist.com.br                         Brazil
      solidworx     https://packagist.co.za                          South Africa
      indra         https://packagist.phpindonesia.id                Indonesia
      varun         https://packagist.in                             India
 --- ------------- ------------------------------------------------ ------------------------------

You can filter by location using --location xx

$ composer repo:ls --location China

Switch repository

$ composer repo:use

Please select your favorite repository (defaults to composer) [composer]:
  [0 ] composer
  [1 ] aliyun
  [2 ] tencent
  [3 ] huawei
  [4 ] cnpkg
  [5 ] sjtug
  [6 ] phpcomposer
  [7 ] kkame
  [8 ] hiraku
  [9 ] webysther
  [10] solidworx
  [11] indra
  [12] varun
>

You can also skip selection by giving repository name.

$ composer repo:use aliyun

Add the option --current/-c for the current project.

Reset command

If you want to discard all custom mirrors, you can use the following command:

$ composer repo:reset

Available commands

Use the following command for help.

$ composer repo
 _____   _____        ___  ___
/  ___| |  _  \      /   |/   |
| |     | |_| |     / /|   /| |
| |     |  _  /    / / |__/ | |
| |___  | | \ \   / /       | |
\_____| |_|  \_\ /_/        |_|

Composer Repository Manager version 2.0.0

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands for the "repo" namespace:
  repo:add     Creates a repository
  repo:ls      List all available repositories
  repo:remove  Remove a repository
  repo:use     Change current repository

LICENSE

The MIT license. See MIT

composer-registry-manager's People

Contributors

benhuang1024 avatar coreyee avatar lifesign avatar slince avatar sy-records avatar webysther avatar zingimmick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

composer-registry-manager's Issues

更新到最新版 crm 再执行 composer repo:ls 依旧返回上一个版本的源

在从来没安装过 crm 的 linux 服务器上,安装 crm 一切正常

但是,在之前安装过旧版本 crm 的 mac 电脑上,删除并重新安装 crm 再执行 composer repo:ls 依旧返回上一个版本的源

~ composer repo
 _____   _____        ___  ___
/  ___| |  _  \      /   |/   |
| |     | |_| |     / /|   /| |
| |     |  _  /    / / |__/ | |
| |___  | | \ \   / /       | |
\_____| |_|  \_\ /_/        |_|

Composer Repository Manager version 2.0.0
......

➜  ~ composer repo:ls
 --- ---------------- --------------------------------------
  *   composer         https://packagist.org
      phpcomposer      https://packagist.phpcomposer.com
      composer-proxy   https://packagist.composer-proxy.org
      laravel-china    https://packagist.laravel-china.org
 --- ---------------- --------------------------------------

CRM 支持设置自定义 composer 镜像源吗?

由于工作需要,需要使用公司自建的 composer 镜像源,但非工作时间段又需要切换回其他公共的源。请问是否有计划支持设置私有源地址,并进行管理呢?

repo命令显式的版本和composer发布的版本不一致

composer repo显式的版本号是2.2.0,而composer发布的版本号是2.3.0。本来想改了提交个pr,结果一想发觉,我改了你再发,不又是一个新版本吗? 所以还是您自己来吧。

另,请问您开发时是怎么测试看效果的? 只跑单元测试吗?

截屏2020-05-23 下午10 34 07

截屏2020-05-23 下午10 34 38

关于命令使用的一个建议

目前在使用的时候发现一个问题,好长时间不用之后发现记不起命令来了,搜索又不确定是哪个能够用。 是否可以创建一个bin可执行程序 或者 是能够增加composer的自动提示中 这样可以方便大家查找到。

支持修改当前项目源

如果当前目录下有composer.json 则默认修改当前, -g/--global 修改全局;如果当前没有composer.json 则直接修改全局

依赖包 composer-plugin-api 找不到了

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for slince/composer-registry-manager ^2.3 -> satisfiable by slince/composer-registry-manager[2.3.0].
    - slince/composer-registry-manager 2.3.0 requires composer-plugin-api ^1.1 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.