fix(compose): strip UTF-8 BOM before parsing Docker Compose YAML (#12223)

This commit is contained in:
Andras Bacsai
2026-10-19 21:21:15 +02:00
committed by GitHub
parent d043c10c11
commit 54315b10e5
2 changed files with 20 additions and 0 deletions
@@ -0,0 +1,17 @@
<?php
use Tests\TestCase;
uses(TestCase::class);
it('parses a Docker Compose file that starts with a UTF-8 byte order mark', function () {
$compose = "\xEF\xBB\xBFservices:\n web:\n image: nginx:alpine\n";
expect(parseDockerComposeYaml($compose))->toBe([
'services' => [
'web' => ['image' => 'nginx:alpine'],
],
]);
validateDockerComposeForInjection($compose);
});