composer git 存储库签出为 git-repo 而不是副本
composer git repository checkout as git-repo and not as a copy
我安装了一个基于 composer 的 TYPO3,其中包含一个私有 gitlab-repository。私有 git-repository 应该用作 dev-master
(作为真正的存储库),以便我能够在内部开发。但是 composer 只签出主存储库文件,但没有 .git
文件夹。
知道哪里出了问题吗?在其他一些项目中,这按预期工作。
我的composer.json:
{
"name": "my-vendor/my-project",
"description" : "TYPO3 CMS Website",
"license": "GPL-2.0-or-later",
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"platform-check": false,
"allow-plugins": {
"typo3/class-alias-loader": true,
"typo3/cms-composer-installers": true,
"captainhook/plugin-composer": true
}
},
"repositories": [
{ "type": "composer", "url": "https://composer.typo3.org/" },
{ "type": "path", "url": "./packages/*" },
{ "type": "vcs", "url": "git@gitlab.com:myvendor/typo3-amp.git" }
],
"require": {
"typo3/cms-about": "^11.0",
"typo3/cms-backend": "^11.0",
"typo3/cms-belog": "^11.0",
"typo3/cms-beuser": "^11.0",
"typo3/cms-core": "^11.0",
"typo3/cms-dashboard": "^11.0",
"typo3/cms-extbase": "^11.0",
"typo3/cms-extensionmanager": "^11.0",
"typo3/cms-felogin": "^11.0",
"typo3/cms-filelist": "^11.0",
"typo3/cms-fluid": "^11.0",
"typo3/cms-fluid-styled-content": "^11.0",
"typo3/cms-form": "^11.0",
"typo3/cms-frontend": "^11.0",
"typo3/cms-info": "^11.0",
"typo3/cms-install": "^11.0",
"typo3/cms-lowlevel": "^11.0",
"typo3/cms-opendocs": "^11.0",
"typo3/cms-recordlist": "^11.0",
"typo3/cms-recycler": "^11.0",
"typo3/cms-redirects": "^11.0",
"typo3/cms-reports": "^11.0",
"typo3/cms-rte-ckeditor": "^11.0",
"typo3/cms-scheduler": "^11.0",
"typo3/cms-seo": "^11.0",
"typo3/cms-setup": "^11.0",
"typo3/cms-sys-note": "^11.0",
"typo3/cms-t3editor": "^11.0",
"typo3/cms-tstemplate": "^11.0",
"typo3/cms-viewpage": "^11.0",
"helhum/typo3-console": "~7.0",
"my-vendor/sitepackage": "@dev",
"my-vendor/amp": "dev-master as 2.0.0",
"ext-simplexml": "*",
"ext-pdo": "*",
"ext-zip": "*",
"ext-libxml": "*",
"ext-curl": "*",
"ext-gd": "*",
"ext-json": "*"
},
"require-dev": {
"phpstan/phpstan": "^0.12.98",
"saschaegerer/phpstan-typo3": "^0.13.3",
"friendsofphp/php-cs-fixer": "^3.0",
"captainhook/captainhook": "^5.10",
"captainhook/plugin-composer": "^5.3",
"rector/rector": "0.11.53"
},
"extra": {
"captainhook": {
"force-install": true
}
},
"scripts": {
"php-cs-fixer": "vendor/bin/php-cs-fixer fix packages",
"phpstan": "vendor/bin/phpstan analyse",
"rector": "vendor/bin/rector process packages",
"ci": [
"@php-cs-fixer",
"@phpstan",
"@rector"
]
}
}
你可以尝试以下方法吗:
将此添加到您的 composer.json
"preferred-install": {
"my-vendor/amp": "source"
}
然后使用 rm typo3conf/ext/amp
删除软件包,然后执行 composer install
让我们看看 manual:
If you set the no-api key to true on a github repository it will clone the repository as it would with any other git repository instead of using the GitHub API. But unlike using the git driver directly, Composer will still attempt to use github's zip files.
简单的技巧似乎是不是使用vcs
驱动程序而是git
私人仓库驱动程序...
我安装了一个基于 composer 的 TYPO3,其中包含一个私有 gitlab-repository。私有 git-repository 应该用作 dev-master
(作为真正的存储库),以便我能够在内部开发。但是 composer 只签出主存储库文件,但没有 .git
文件夹。
知道哪里出了问题吗?在其他一些项目中,这按预期工作。
我的composer.json:
{
"name": "my-vendor/my-project",
"description" : "TYPO3 CMS Website",
"license": "GPL-2.0-or-later",
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"platform-check": false,
"allow-plugins": {
"typo3/class-alias-loader": true,
"typo3/cms-composer-installers": true,
"captainhook/plugin-composer": true
}
},
"repositories": [
{ "type": "composer", "url": "https://composer.typo3.org/" },
{ "type": "path", "url": "./packages/*" },
{ "type": "vcs", "url": "git@gitlab.com:myvendor/typo3-amp.git" }
],
"require": {
"typo3/cms-about": "^11.0",
"typo3/cms-backend": "^11.0",
"typo3/cms-belog": "^11.0",
"typo3/cms-beuser": "^11.0",
"typo3/cms-core": "^11.0",
"typo3/cms-dashboard": "^11.0",
"typo3/cms-extbase": "^11.0",
"typo3/cms-extensionmanager": "^11.0",
"typo3/cms-felogin": "^11.0",
"typo3/cms-filelist": "^11.0",
"typo3/cms-fluid": "^11.0",
"typo3/cms-fluid-styled-content": "^11.0",
"typo3/cms-form": "^11.0",
"typo3/cms-frontend": "^11.0",
"typo3/cms-info": "^11.0",
"typo3/cms-install": "^11.0",
"typo3/cms-lowlevel": "^11.0",
"typo3/cms-opendocs": "^11.0",
"typo3/cms-recordlist": "^11.0",
"typo3/cms-recycler": "^11.0",
"typo3/cms-redirects": "^11.0",
"typo3/cms-reports": "^11.0",
"typo3/cms-rte-ckeditor": "^11.0",
"typo3/cms-scheduler": "^11.0",
"typo3/cms-seo": "^11.0",
"typo3/cms-setup": "^11.0",
"typo3/cms-sys-note": "^11.0",
"typo3/cms-t3editor": "^11.0",
"typo3/cms-tstemplate": "^11.0",
"typo3/cms-viewpage": "^11.0",
"helhum/typo3-console": "~7.0",
"my-vendor/sitepackage": "@dev",
"my-vendor/amp": "dev-master as 2.0.0",
"ext-simplexml": "*",
"ext-pdo": "*",
"ext-zip": "*",
"ext-libxml": "*",
"ext-curl": "*",
"ext-gd": "*",
"ext-json": "*"
},
"require-dev": {
"phpstan/phpstan": "^0.12.98",
"saschaegerer/phpstan-typo3": "^0.13.3",
"friendsofphp/php-cs-fixer": "^3.0",
"captainhook/captainhook": "^5.10",
"captainhook/plugin-composer": "^5.3",
"rector/rector": "0.11.53"
},
"extra": {
"captainhook": {
"force-install": true
}
},
"scripts": {
"php-cs-fixer": "vendor/bin/php-cs-fixer fix packages",
"phpstan": "vendor/bin/phpstan analyse",
"rector": "vendor/bin/rector process packages",
"ci": [
"@php-cs-fixer",
"@phpstan",
"@rector"
]
}
}
你可以尝试以下方法吗:
将此添加到您的 composer.json
"preferred-install": {
"my-vendor/amp": "source"
}
然后使用 rm typo3conf/ext/amp
删除软件包,然后执行 composer install
让我们看看 manual:
If you set the no-api key to true on a github repository it will clone the repository as it would with any other git repository instead of using the GitHub API. But unlike using the git driver directly, Composer will still attempt to use github's zip files.
简单的技巧似乎是不是使用vcs
驱动程序而是git
私人仓库驱动程序...