Skip to content

Copy devcontainer from Symfony Docker scaffold - #3000

Open
ousamabenyounes wants to merge 1 commit into
api-platform:mainfrom
ousamabenyounes:add-devcontainer-2994
Open

Copy devcontainer from Symfony Docker scaffold#3000
ousamabenyounes wants to merge 1 commit into
api-platform:mainfrom
ousamabenyounes:add-devcontainer-2994

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets Refs #2994
License MIT
Doc PR n/a

Summary

This copies the .devcontainer directory from the pinned dunglas/symfony-docker snapshot when --with-docker is used.

Scope choice for #2994

The issue mentions several possible migration gaps from the old template:

  • A. Copy the upstream .devcontainer directory from symfony-docker.
  • B. Add Docker Compose services for the generated PWA/admin apps.
  • C. Add an explicit database service/configuration to the generated compose setup.
  • D. Reintroduce or generate Helm chart assets.

This PR chooses A because the installer already imports Docker infrastructure from a pinned symfony-docker commit, and that same pinned snapshot contains .devcontainer. Copying it keeps ownership with the upstream Docker template and avoids inventing local PWA/admin/Postgres/Helm behavior before maintainers agree on those larger choices.

Test verification (RED → GREEN)

RED, before the fix, after adding the regression test:

...F...                                                             7 / 7 (100%)

1) ApiPlatform\Installer\Tests\Scaffold\SymfonyScaffoldTest::testSymfonyDockerCopyListIncludesDevcontainer
Failed asserting that an array contains '.devcontainer'.

FAILURES!
Tests: 7, Assertions: 15, Failures: 1.

GREEN, with the fix:

...............................................................  63 / 109 ( 57%)
..............................................                  109 / 109 (100%)

OK (109 tests, 219 assertions)

Fix-reverted regression check:

...F...                                                             7 / 7 (100%)

ApiPlatform\Installer\Tests\Scaffold\SymfonyScaffoldTest::testSymfonyDockerCopyListIncludesDevcontainer
Failed asserting that an array contains '.devcontainer'.

FAILURES!
Tests: 7, Assertions: 15, Failures: 1.

Static analysis:

php vendor/bin/phpstan analyse
[OK] No errors

All commands were run inside ephemeral Docker containers with docker run --rm -u "$(id -u):$(id -g)" -v "$PWD":/app -w /app composer:2 ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant