diff --git a/.changes/unreleased/Fixed-20241207-093508.yaml b/.changes/unreleased/Fixed-20241207-093508.yaml new file mode 100644 index 0000000..925d25a --- /dev/null +++ b/.changes/unreleased/Fixed-20241207-093508.yaml @@ -0,0 +1,3 @@ +kind: Fixed +body: '[#17](https://github.com/llaville/box-manifest/issues/17) : Cannot build a PHAR distrib when banner is declared by an array of string' +time: 2024-12-07T09:35:08.759627867Z diff --git a/src/Helper/BoxConfigurationHelper.php b/src/Helper/BoxConfigurationHelper.php index cda7c13..6670d44 100644 --- a/src/Helper/BoxConfigurationHelper.php +++ b/src/Helper/BoxConfigurationHelper.php @@ -24,6 +24,7 @@ use function dirname; use function file_exists; use function getcwd; +use function implode; use function is_bool; use function is_string; use function realpath; @@ -136,7 +137,11 @@ public function getAlias(): string public function getBanner(): string { - return $this->rawConfig->banner ?: ''; + $banner = $this->rawConfig->banner ?: ''; + if (is_string($banner)) { + return $banner; + } + return implode("\n", $banner); } public function getShebang(): string