fix: useComposerJson使用時のYAML parse errorを修正 (v8.5.6-d)
Helm Chart Release / release-chart (push) Successful in 5s

heredoc内の {{ .Values.composer.composerJson }} がインデント無しで
展開され、複数行JSONの2行目以降が行頭に出力されてブロックスカラーを
破壊していた潜在バグを修正。trim | nindent 14 で展開するよう変更
(composerLock も同様)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 16:31:03 +09:00
co-authored by Claude Fable 5
parent 76a4a7874b
commit be1c82e968
4 changed files with 61 additions and 3 deletions
+52
View File
@@ -0,0 +1,52 @@
# Changelog - Version 8.5.6-d
## 修正
### useComposerJson 使用時の YAML parse error を修正
`composer.useComposerJson: true` を指定すると、以下のエラーでデプロイに失敗する問題を修正しました。
```
YAML parse error on phpfpm/templates/deployment.yaml:
error converting YAML to JSON: yaml: line 96: did not find expected key.
```
**原因**: `templates/deployment.yaml` の heredoc 内で `{{ .Values.composer.composerJson }}`
インデント処理なしで展開していたため、複数行の JSON の2行目以降が行頭に出力され、
YAML のブロックスカラー構造を破壊していました(`useComposerJson` 経路の潜在バグ)。
**対応**: `composerJson` / `composerLock` の展開を `trim | nindent 14` に変更し、
ブロックスカラーのインデントに揃えて出力するようにしました。
コンテナ内に書き出される `composer.json` / `composer.lock` は行頭からのクリーンな JSON になります。
## アップグレード手順
```bash
helm repo update
helm upgrade <リリース名> cafepieters/phpfpm --version 8.5.6-d -f values.yaml
```
## 使用例
```yaml
composer:
enabled: true
useComposerJson: true
composerJson: |
{
"require": {
"phpoffice/phpspreadsheet": "^2.0"
}
}
```
PHPコードからの読み込み:
```php
require_once '/composer/vendor/autoload.php';
```
---
**リリース日**: 2026-07-19
**担当**: プロサーバーエンジニア(Claude)