相关疑难解决方法(0)

嵌套包的 Composer 运行脚本

我有没有代码但有依赖项列表的作曲家项目。我想运行composer install下载所有依赖包,然后在每个包中运行一些 bash 命令。

我的作曲家.json:

{
	"name": "testmain/testmain",
	"description": "testmain",
	"minimum-stability": "dev",
	"repositories": [{
			"type": "package",
			"package": {
				"name": "testsub/testsub1",
				"description": "testsub/testsub1",
				"version": "master",
				"source": {
					"url": "https://github.com/testsub/testsub1",
					"type": "git",
					"reference": "master"
				},
				"scripts": {
					"post-install-cmd": [
						"make",
						"make install"
					]
				}
			}
		},

		{
			"type": "package",
			"package": {
				"name": "testsub/testsub2",
				"description": "testsub/testsub2",
				"version": "master",
				"source": {
					"url": "https://github.com/testsub/testsub2",
					"type": "git",
					"reference": "master"
				},
				"scripts": {
					"post-install-cmd": [
						"make",
						"make install"
					]
				}
			}
		}
	],
	"require": { …
Run Code Online (Sandbox Code Playgroud)

git composer-php

8
推荐指数
2
解决办法
1673
查看次数

如何为新捆绑包编写Symfony Flex配方?

我试图找到有关使用Symfony Flex的任何文档,但到目前为止还没有运气。

几乎所有文档都指向安装使用symfony Flex的捆绑软件,而不是如何创建使用它的捆绑软件。

我什至试图对某些软件包进行反向工程,但是再一次,没有运气。

我的目标是为中的捆绑包生成一个默认配置文件config/packages/my_bundle.yaml

我需要知道的是我需要在哪里放置它以及可以使用哪些env变量(如果有)?

php symfony symfony-flex symfony4

2
推荐指数
1
解决办法
91
查看次数

标签 统计

composer-php ×1

git ×1

php ×1

symfony ×1

symfony-flex ×1

symfony4 ×1