Skip to content

[RFC] Add DevContainer support for GitHub Codespaces #61241

@mathieucorne

Description

@mathieucorne

Description

Proposal

Add a .devcontainer/ folder to provide optional support for GitHub Codespaces and Visual Studio Code's DevContainer feature.

This would allow new contributors to get a ready-to-use Symfony development environment instantly, without manually configuring PHP, required extensions (like ext-xsl), or Composer.

What's included

  • A minimal Dockerfile based on php:8.3-alpine
  • Composer preinstalled globally
  • Required PHP extensions like xsl (used in core)
  • A non-root user (devuser) for good container practices
  • Workspace mapped to /workspaces/symfony
  • Recommended VS Code extensions (PHP, Xdebug, etc.)

Why

Symfony has a large and growing contributor base, but setting up a full local environment remains a barrier, especially for new contributors or those exploring the codebase.

Providing an optional, zero-config, fully reproducible container environment helps:

  • Lower the entry barrier for contributions
  • Encourage contributions via GitHub Codespaces
  • Ensure environment consistency during PR testing/debugging

Impact

This is completely optional. It has:

  • No impact on the Symfony runtime
  • No change to the test pipeline
  • No dependency on external services

It only adds a .devcontainer/ folder at the root, which is ignored by Symfony’s autoloading, tests, and builds.


Preview

I’ve implemented a working version in a dedicated branch here (not submitted as a PR yet, pending approval):

🔗 https://github.com/mathieucorne/symfony/tree/feature/devcontainer-support
📁 https://github.com/mathieucorne/symfony/tree/feature/devcontainer-support/.devcontainer

Let me know if this is something you'd be interested in — I’ll gladly open a PR if approved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy