Fast, reliable, and secure Bun/NPM/Yarn/pnpm bridge for Composer

Package info

github.com/php-forge/foxy

Homepage

Type:composer-plugin

pkg:composer/php-forge/foxy

Fund package maintenance!

terabytesoftw

Statistics

Installs: 135โ€‰566

Dependents: 13

Suggesters: 0

Stars: 45

Open Issues: 3

0.2.0 2026-01-24 22:09 UTC

Requires

Suggests

Provides

None

Conflicts

None

Replaces

None

BSD-3-Clause 78d5922c2c57a8fd7f8a9d992731c0620d1be03b

nodejspackageassetcomposerBridgenpmdependency manageryarnbun


README

๐Ÿ‘ PHP Forge

Foxy


๐Ÿ‘ PHPUnit
๐Ÿ‘ Mutation Testing
๐Ÿ‘ Easy Coding Standard
๐Ÿ‘ Dependency Check

Foxy is a Composer plugin that aggregates asset dependencies from Composer packages into a single package.json and runs Bun, npm, Yarn, or pnpm while preserving the Composer state on failures.

Features

๐Ÿ‘ Feature Overview

Installation

composer require php-forge/foxy:^0.1

Manager can be bun, npm, yarn or pnpm. For default, npm is used.

{
 "require": {
 "php-forge/foxy": "^0.1"
 },
 "config": {
 "foxy": {
 "manager": "bun"
 }
 }
}

Quick start

Standard PHP project (Yii2)

In a standard PHP application, keep a package.json file at the project root. Foxy will merge asset dependencies from installed Composer packages and run the configured manager during Composer install and update.

Example (Yii2 app template):

Yii2 app template

{
 "require": {
 "php-forge/foxy": "^0.1"
 },
 "config": {
 "foxy": {
 "manager": "npm"
 }
 }
}

Drupal layout (package.json under web/)

In a typical Drupal proof-of-concept workflow, Composer stays at the repository root while frontend tooling and builds live under web/.

Foxy lets you keep that layout while still aggregating asset dependencies and running npm in the correct directory, with Composer state preserved if the install fails.

  • Aggregates asset dependencies declared by Composer packages into a single npm install.
  • Keeps asset tooling configuration consistent across local and CI environments.
  • Restores Composer lock and PHP dependencies if npm exits with an error.
  • Runs npm against the web/ package.json without moving Composer files.
{
 "config": {
 "foxy": {
 "manager": "npm",
 "root-package-json-dir": "web"
 }
 }
}

Documentation

Package information

๐Ÿ‘ PHP
๐Ÿ‘ Latest Stable Version
๐Ÿ‘ Total Downloads

Quality code

๐Ÿ‘ Codecov
๐Ÿ‘ PHPStan Level Max
๐Ÿ‘ Super-Linter
๐Ÿ‘ Dependency Check

Our social networks

๐Ÿ‘ Follow on X

License

๐Ÿ‘ License