{
    "name": "laravelacademy/urlscanner",
    "description": "Scan URLs FROM A CSV FILE AND REPORT INACCESSIBLE URLs",
    "keywords": ["url", "scanner", "csv"],
    "homepage": "http://laravelacademy.org",
    "license": "MIT",
    "authors": [
        {
            "name": "sunqiang",
            "email": "[email protected]"
        }
    ],
    "support": {
        "email": "[email protected]"
    },
    "minimum-stability": "dev",
    "require": {
        "php": ">=5.4.0",
        "guzzlehttp/guzzle": "~5.0"
    },
    "require-dev": {
        "phpunit/phpunit": "~4.3"
    },
    "suggest": {
        "league/csv": "~6.0"
    },
    "autoload": {
        "psr-4": {
            "LaravelAcademy\\UrlScanner\\": "src/"
        }
    }
}



  • name:组件的厂商名和包名,也是Packagist中的组件名

  • description:简要说明组件

  • keywords:描述属性的关键字

  • homepage:组件网站URL

  • license:PHP组件采用的软件许可证(更多软件许可证参考:http://choosealicense.com/)

  • authors:作者信息数组

  • support:组件用户获取技术支持的方式

  • require:组件自身依赖的组件

  • require-dev:开发这个组件所需的依赖

  • suggest:建议安装的组件

  • autoload:告诉Composer自动加载器如何自动加载这个组件



修改composer镜像仓库

全局修改

>composer config -g  repo.packagist composer .....

>composer config -g repo.packagist composer https://packagist.phpcomposer.com


项目局部修改

方法1.项目根目录下执行

composer config repo.packagist composer https://packagist.phpcomposer.com

方法2.手动修改项目根目录下composer.json

"repositories": {
    "packagist": {
        "type": "composer",
        "url": "https://packagist.phpcomposer.com"
    }
}


取消镜像

composer config -g --unset repos.packagist