Git 编写器更新到最后一次提交-Sylius示例
Git 编写器更新到最后一次提交-Sylius示例,git,github,composer-php,sylius,Git,Github,Composer Php,Sylius,我使用以下命令安装了composer: $ wget http://getcomposer.org/composer.phar $ composer.phar create-project sylius/sylius -s dev $ cd sylius $ app/console sylius:install 我在应用程序上做了一些工作,发现github版本比我的版本(我使用的是branchdev master/0.16.x-dev)提前了几次提交,并希望进行更新 我用ran成功地键入了co
我使用以下命令安装了composer:
$ wget http://getcomposer.org/composer.phar
$ composer.phar create-project sylius/sylius -s dev
$ cd sylius
$ app/console sylius:install
我在应用程序上做了一些工作,发现github版本比我的版本(我使用的是branchdev master
/0.16.x-dev
)提前了几次提交,并希望进行更新
我用ran成功地键入了composer update
,但我的本地文件没有更新到最新版本(值得一提的是sylius仍然在同一版本0.16.x-dev
,因此在此期间没有新版本
您能告诉我如何使用composer
将源代码更新到最新提交版本吗
我的composer.json
文件:
{
"name": "sylius/sylius",
"type": "project",
"description": "E-Commerce platform for PHP, based on Symfony framework.",
"license": "MIT",
"homepage": "http://sylius.org",
"authors": [
{
"name": "Paweł Jędrzejewski",
"homepage": "http://pjedrzejewski.com"
},
{
"name": "Sylius project",
"homepage": "http://sylius.org"
},
{
"name": "Community contributions",
"homepage": "http://github.com/Sylius/Sylius/contributors"
}
],
"require": {
"php": ">=5.5.9",
"ext-exif": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"a2lix/translation-form-bundle": "~2.0",
"doctrine/collections": "~1.2",
"doctrine/common": "~2.5",
"doctrine/doctrine-bundle": "~1.3",
"doctrine/doctrine-cache-bundle": "~1.0",
"doctrine/doctrine-fixtures-bundle": "~2.2",
"doctrine/doctrine-migrations-bundle": "~1.0",
"doctrine/orm": ">=2.4.8,<2.5",
"doctrine/phpcr-odm": "^1.3@rc",
"friendsofsymfony/elastica-bundle": "^3.0.2",
"friendsofsymfony/oauth-server-bundle": "~1.4",
"friendsofsymfony/rest-bundle": "~1.5",
"fzaninotto/faker": "~1.2",
"hwi/oauth-bundle": "~0.3",
"incenteev/composer-parameter-handler": "~2.0",
"jackalope/jackalope": "^1.1.4",
"jackalope/jackalope-doctrine-dbal": "^1.1.2",
"jms/serializer-bundle": "~0.13",
"jms/translation-bundle": "~1.1",
"knplabs/knp-gaufrette-bundle": "~0.1",
"knplabs/knp-menu-bundle": "~1.1",
"knplabs/knp-snappy-bundle": "~1.2",
"liip/imagine-bundle": "~1.0",
"omnipay/omnipay": "~2.3",
"payum/omnipay-bridge": "~1.0",
"payum/payum": "~1.0",
"payum/payum-bundle": "~1.0",
"sensio/distribution-bundle": "~2.3",
"stof/doctrine-extensions-bundle": "~1.1",
"swiftmailer/swiftmailer": "~5.0",
"symfony-cmf/block-bundle": "~1.2",
"symfony-cmf/content-bundle": "~1.2",
"symfony-cmf/create-bundle": "~1.2",
"symfony-cmf/media-bundle": "~1.2",
"symfony-cmf/menu-bundle": "~1.2",
"symfony-cmf/routing-bundle": "~1.2",
"symfony/assetic-bundle": "^2.6",
"symfony/event-dispatcher": "^2.7",
"symfony/expression-language": "^2.7",
"symfony/form": "^2.7",
"symfony/framework-bundle": "^2.7",
"symfony/intl": "^2.7",
"symfony/monolog-bundle": "^2.7",
"symfony/options-resolver": "^2.7",
"symfony/property-access": "^2.7",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/symfony": "^2.7.7",
"symfony/twig-bundle": "^2.7",
"symfony/polyfill-iconv": "~1.0",
"symfony/polyfill-intl-icu": "~1.0",
"symfony/polyfill-mbstring": "~1.0",
"twig/extensions": "~1.0",
"twig/twig": "~1.11",
"white-october/pagerfanta-bundle": "~1.0",
"willdurand/hateoas-bundle": "~0.4",
"winzou/state-machine-bundle": "~0.2",
"ocramius/proxy-manager": "^1.0",
"symfony/proxy-manager-bridge": "^2.7"
},
"require-dev": {
"phpspec/phpspec": "^2.4",
"behat/behat": "~3.0",
"behat/symfony2-extension": "~2.0",
"behat/mink-extension": "~2.0",
"behat/mink-browserkit-driver": "~1.2",
"behat/mink-selenium2-driver": "~1.2",
"behat/mink": "~1.6",
"akeneo/phpspec-skip-example-extension": "~1.2",
"coduo/php-matcher": "~1.0",
"lakion/mink-debug-extension": "^1.0.1",
"phpunit/phpunit": "~4.1"
},
"replace": {
"sylius/addressing": "0.16.x-dev",
"sylius/addressing-bundle": "0.16.x-dev",
"sylius/api-bundle": "0.16.x-dev",
"sylius/archetype": "0.16.x-dev",
"sylius/archetype-bundle": "0.16.x-dev",
"sylius/attribute": "0.16.x-dev",
"sylius/attribute-bundle": "0.16.x-dev",
"sylius/cart": "0.16.x-dev",
"sylius/cart-bundle": "0.16.x-dev",
"sylius/contact": "0.16.x-dev",
"sylius/contact-bundle": "0.16.x-dev",
"sylius/content": "0.16.x-dev",
"sylius/content-bundle": "0.16.x-dev",
"sylius/core": "0.16.x-dev",
"sylius/core-bundle": "0.16.x-dev",
"sylius/currency": "0.16.x-dev",
"sylius/currency-bundle": "0.16.x-dev",
"sylius/fixtures-bundle": "0.16.x-dev",
"sylius/flow-bundle": "0.16.x-dev",
"sylius/installer-bundle": "0.16.x-dev",
"sylius/inventory": "0.16.x-dev",
"sylius/inventory-bundle": "0.16.x-dev",
"sylius/locale": "0.16.x-dev",
"sylius/locale-bundle": "0.16.x-dev",
"sylius/money-bundle": "0.16.x-dev",
"sylius/order": "0.16.x-dev",
"sylius/order-bundle": "0.16.x-dev",
"sylius/payment": "0.16.x-dev",
"sylius/payment-bundle": "0.16.x-dev",
"sylius/payum-bundle": "0.16.x-dev",
"sylius/pricing": "0.16.x-dev",
"sylius/pricing-bundle": "0.16.x-dev",
"sylius/product": "0.16.x-dev",
"sylius/product-bundle": "0.16.x-dev",
"sylius/promotion": "0.16.x-dev",
"sylius/promotion-bundle": "0.16.x-dev",
"sylius/rbac": "0.16.x-dev",
"sylius/rbac-bundle": "0.16.x-dev",
"sylius/registry": "0.16.x-dev",
"sylius/report": "0.16.x-dev",
"sylius/report-bundle": "0.16.x-dev",
"sylius/resource": "0.16.x-dev",
"sylius/resource-bundle": "0.16.x-dev",
"sylius/search": "0.16.x-dev",
"sylius/search-bundle": "0.16.x-dev",
"sylius/sequence": "0.16.x-dev",
"sylius/sequence-bundle": "0.16.x-dev",
"sylius/settings-bundle": "0.16.x-dev",
"sylius/shipping": "0.16.x-dev",
"sylius/shipping-bundle": "0.16.x-dev",
"sylius/storage": "0.16.x-dev",
"sylius/taxation": "0.16.x-dev",
"sylius/taxation-bundle": "0.16.x-dev",
"sylius/taxonomy": "0.16.x-dev",
"sylius/taxonomy-bundle": "0.16.x-dev",
"sylius/translation": "0.16.x-dev",
"sylius/translation-bundle": "0.16.x-dev",
"sylius/user": "0.16.x-dev",
"sylius/user-bundle": "0.16.x-dev",
"sylius/variation": "0.16.x-dev",
"sylius/variation-bundle": "0.16.x-dev",
"sylius/web-bundle": "0.16.x-dev"
},
"suggest": {
"ext-iconv": "For better performance than using Symfony Polyfill Component",
"ext-intl": "For better performance than using Symfony Polyfill Component",
"ext-mbstring": "For better performance than using Symfony Polyfill Component"
},
"scripts": {
"travis-build": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreateAndCkeditor"
],
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreateAndCkeditor",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreateAndCkeditor",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"autoload": {
"psr-0": { "Sylius\\": "src/" }
},
"config": {
"bin-dir": "bin"
},
"extra": {
"branch-alias": {
"dev-master": "0.16-dev"
},
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"symfony-app-dir": "app",
"symfony-web-dir": "web"
}
{
“名称”:“sylius/sylius”,
“类型”:“项目”,
“描述”:“基于Symfony框架的PHP电子商务平台。”,
“许可证”:“麻省理工学院”,
“主页”:http://sylius.org",
“作者”:[
{
“姓名”:“PawełJędrzejewski”,
“主页”:http://pjedrzejewski.com"
},
{
“名称”:“Sylius项目”,
“主页”:http://sylius.org"
},
{
“名称”:“社区贡献”,
“主页”:http://github.com/Sylius/Sylius/contributors"
}
],
“要求”:{
“php”:“>=5.5.9”,
“ext exif”:“*”,
“外部文件信息”:“*”,
“外部gd”:“*”,
“a2lix/翻译表单包”:“~2.0”,
“原则/集合”:“~1.2”,
“条令/普通”:“~2.5”,
“条令/条令包”:“~1.3”,
“条令/条令缓存包”:“~1.0”,
“条令/条令固定装置包”:“~2.2”,
“条令/条令迁移包”:“~1.0”,
“条令/orm”:“>=2.4.8,转到src/Sylius,执行git init,然后执行git remote add origingit@github.com:Sylius/Sylius.git
然后git pull你能发布你的composer.json文件吗?Sylius文件也在供应商或src文件夹中吗?好的,去src/Sylius试试git pull,告诉我它是否有效。@gvf它不会,因为在安装过程中我选择了选项“删除git文件”。但是替换composer.json
的一部分不就是这样做的吗?让我们来看看。