Skip to content

feat: add Docker support (exec/run) for PHP CS Fixer#227

Open
jexme wants to merge 1 commit intojunstyle:masterfrom
jexme:add-docker
Open

feat: add Docker support (exec/run) for PHP CS Fixer#227
jexme wants to merge 1 commit intojunstyle:masterfrom
jexme:add-docker

Conversation

@jexme
Copy link

@jexme jexme commented Aug 9, 2025

Adds optional Docker integration to run PHP CS Fixer inside containers using either docker exec (default) or docker run. Disabled by default to keep existing behavior unchanged.

What’s included

  • New settings:
    • php-cs-fixer.docker.enable (boolean, default: false)
    • php-cs-fixer.docker.mode: "exec" | "run" (default: "exec")
    • php-cs-fixer.docker.command (e.g., "docker" or "podman")
    • php-cs-fixer.docker.image (for run)
    • php-cs-fixer.docker.container (for exec)
    • php-cs-fixer.docker.workspaceFolder
    • php-cs-fixer.docker.runExtraArgs / php-cs-fixer.docker.execExtraArgs
  • Proper path mapping for config files and targets inside the container.
  • Clear error messages for missing image/container/binary or docker CLI.

Backward compatibility

  • Default settings keep Docker disabled. Existing workflows and behavior are unchanged.

the only thing is, I think the build will need to be restarted so that the new index.js appears

@Filipe07
Copy link

What is the status of this PR? Can we merge it?
My team have the same use case and this would be very useful

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.

3 participants