Symfony fork bundle

时间:2018-01-09 11:04:48

标签: symfony composer-php

我分叉了这个包#34; [egeloen / ivory-google-map] [1]"

[1]:https://github.com/egeloen/ivory-google-map/到此[知识库] [1]

[1]:https://github.com/spinoza123/ivory-google-map我将composer.json中的原始网址更改为我的分叉存储库,但当我执行 composer update 时出现此错误

  

[InvalidArgumentException]     没有找到匹配的spinoza123 / google-map软件包。检查包拼写,您的版本构造     并且该包装的稳定性与您的最小稳定性(稳定)相匹配。

我必须在pakagist中发布它,如果它是免费的,怎么做? 我的composer.json

{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
    "psr-4": {
        "AppBundle\\": "src/AppBundle"
    },
    "classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
},
"autoload-dev": {
    "psr-4": { "Tests\\": "tests/" },
    "files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
}
"require": {
    "php": ">=5.5.9",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/orm": "^2.5",
    "incenteev/composer-parameter-handler": "^2.0",
    "sensio/distribution-bundle": "^5.0.19",
    "sensio/framework-extra-bundle": "^5.0.0",
    "symfony/monolog-bundle": "^3.1.0",
    "symfony/polyfill-apcu": "^1.0",
    "symfony/swiftmailer-bundle": "^2.6.4",
    "symfony/symfony": "3.4.*",
    "twig/twig": "^1.0||^2.0",
    "spinoza123/ivory-google-map": "dev-master"
},
"require-dev": {
    "sensio/generator-bundle": "^3.0",
    "symfony/phpunit-bridge": "^3.0"
},

"scripts": {
    "symfony-scripts": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ],
    "post-install-cmd": [
        "@symfony-scripts"
    ],
    "post-update-cmd": [
        "@symfony-scripts"
    ]
},
"config": {
    "platform": {
        "php": "5.5.9"
    },
    "sort-packages": true
},
"extra": {
    "symfony-app-dir": "app",
    "symfony-bin-dir": "bin",
    "symfony-var-dir": "var",
    "symfony-web-dir": "web",
    "symfony-tests-dir": "tests",
    "symfony-assets-install": "relative",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    },
    "branch-alias": {
        "dev-master": "3.4-dev"
    }
}

}

由于

1 个答案:

答案 0 :(得分:4)

composer.json

中使用VCS
  

有一些用例。最常见的是维护自己的第三方库的分支。如果您正在为项目使用某个库,并且决定更改库中的某些内容,则需要您的项目使用修补版本。如果库在GitHub上(大多数时候都是这种情况),你可以简单地将它分叉并将更改推送到你的分支。

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/spinoza123/ivory-google-map"
        }
    ],
    "require": {
        "egeloen/ivory-google-map": "dev-master"
    }
}