我只想要这个文件夹:https://develop.svn.wordpress.org/trunk/tests/phpunit/includes(或github镜像),而不是整个项目。
我可以用svn co –quiet https://develop.svn ….
你可以使用作曲家 post-update-cmd 要么 post-install-cmd 选项。这是在编写器更新/安装后执行的。将其添加到composer.json:
post-update-cmd
post-install-cmd
{ "scripts": { "post-install-cmd": [ "svn co --quiet https://develop.svn.wordpress.org/trunk/tests/phpunit/includes wp-tests", ], } }
您可以定义将指向此目录并将其添加到的虚拟包 require-dev 部分:
require-dev
"require-dev": { "wordpress/phpunit": "*" }, "repositories": [ { "type": "package", "package": { "name": "wordpress/phpunit", "version": "1.0.0", "source": { "url": "https://develop.svn.wordpress.org", "type": "svn", "reference": "trunk/tests/phpunit/includes/@43534" } } } ]
包将安装在 vendor/wordpress/phpunit 。您可以使用更改此目录 composer/installers 插入。
vendor/wordpress/phpunit
composer/installers