Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Compose ThisNew to Visual Studio Code? Get it now.
Compose This

Compose This

Shyamkumar Ashok Garud

|
1 install
| (0) | Free
Run named composer update tasks from the right-click menu on composer.json
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Compose This

Run named composer update tasks directly from the right-click menu on composer.json — with custom packages, prefix env vars, and postfix flags — all configured through a visual settings panel.

Version Installs License: MIT


Why Compose This?

PHP projects often need to update specific packages with environment variables set beforehand and platform requirement flags appended. Running these commands manually every time is error-prone and slow. Compose This lets you save these commands as named tasks and run them in one click.

Before:

$env:OTEL_PHP_AUTOLOAD_ENABLED="false"; composer update monolog/monolog --ignore-platform-req=ext-ftp --ignore-platform-req=ext-opentelemetry

After: Right-click composer.json → Compose This → Update Logger Packages ✓


Features

  • Context menu integration — the "Compose This" option only appears when you right-click composer.json
  • Named tasks — save as many tasks as you need, each with its own name, packages, and flags
  • Live command preview — see the exact command that will run before you save
  • Visual settings panel — a purpose-built UI to add, edit, and remove tasks without editing JSON
  • Tag-style package input — type a package name and press Enter or Space to add it as a pill; Backspace to remove
  • Prefix commands — set environment variables or run any commands before composer
  • Postfix flags — append --ignore-platform-req or any other flags after the command
  • Runs in a dedicated terminal — a new "Compose This" terminal is created each time so output stays clean

Screenshots

1 — Right-click composer.json to access your tasks

Right-click context menu showing Compose This option

2 — Pick a task from the quick-select menu

QuickPick showing configured tasks with command previews

3 — Configure tasks in the visual settings panel

Settings panel with task name, packages, prefix and postfix fields


Getting Started

1. Install the extension

Search for "Compose This" in the VS Code Extensions panel (Ctrl+Shift+X) or install the .vsix file directly:

Extensions panel → ··· menu → Install from VSIX

2. Open the settings panel

Open the Command Palette (Ctrl+Shift+P) and run:

Compose This: Open Settings

3. Add a task

Click + Add Task, fill in the fields, and click Save All Tasks.

4. Run it

Right-click any composer.json in the Explorer → Compose This → select your task.


Task Configuration

Each task has four fields:

Field Description Example
Task Name Label shown in the context menu Update Logger Packages
Packages vendor/package entries to pass to composer update. Leave empty to update all. monolog/monolog, vendor/core
Prefix Commands Commands or env var assignments that run before composer, separated by ; $env:OTEL_PHP_AUTOLOAD_ENABLED="false"
Postfix Flags Flags appended after the composer command --ignore-platform-req=ext-ftp

Generated command format

<prefix commands>; composer update <packages> <postfix flags>

Example output:

$env:OTEL_PHP_AUTOLOAD_ENABLED="false"; composer update monolog/monolog vendor/core --ignore-platform-req=ext-ftp --ignore-platform-req=ext-opentelemetry

Advanced: Edit tasks in settings.json

Tasks are stored in your VS Code global settings under composeThis.tasks. You can edit them directly:

  1. Open Command Palette → Preferences: Open User Settings (JSON)
  2. Add or edit the composeThis.tasks array:
"composeThis.tasks": [
  {
    "name": "Update Logger Packages",
    "packages": ["monolog/monolog", "vendor/core"],
    "prefixCommands": "$env:OTEL_PHP_AUTOLOAD_ENABLED=\"false\"",
    "postfixCommands": "--ignore-platform-req=ext-ftp --ignore-platform-req=ext-opentelemetry"
  },
  {
    "name": "Full Update",
    "packages": [],
    "prefixCommands": "",
    "postfixCommands": "--no-plugins"
  }
]

Requirements

  • PHP installed and available in your terminal's PATH
  • Composer installed globally (composer command available)

Extension Settings

Setting Type Default Description
composeThis.tasks array [] List of named composer tasks. Use the visual settings panel or edit the JSON directly.

Tips

  • No tasks configured? Clicking "Compose This" will prompt you to open the settings panel.
  • Multiple projects? Tasks are saved globally (per user) and work across all workspaces.
  • Prefix on Windows — use PowerShell syntax for env vars: $env:MY_VAR="value"
  • Prefix on Mac/Linux — use shell syntax: MY_VAR=value or export MY_VAR=value

Contributing

Issues and pull requests are welcome at the GitHub repository.


License

MIT © Compose This

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft