PHPackages                             yii2-extensions/scaffold - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. yii2-extensions/scaffold

ActiveComposer-plugin[CLI &amp; Console](/categories/cli)

yii2-extensions/scaffold
========================

Declarative multi-layer file scaffolding for PHP projects via Composer providers and a Symfony Console CLI.

0.1.0(1mo ago)43.4k↑17.9%[2 PRs](https://github.com/yii2-extensions/scaffold/pulls)6BSD-3-ClausePHPPHP &gt;=8.3CI passing

Since May 6Pushed 3w agoCompare

[ Source](https://github.com/yii2-extensions/scaffold)[ Packagist](https://packagist.org/packages/yii2-extensions/scaffold)[ RSS](/packages/yii2-extensions-scaffold/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (13)Versions (4)Used By (6)

    ![Yii Framework](https://camo.githubusercontent.com/f390171a839a7620dea19acb5fc1fb87f9226e65910c577f99803347ce48336a/68747470733a2f2f7777772e7969696672616d65776f726b2e636f6d2f696d6167652f64657369676e2f6c6f676f2f796969335f66756c6c5f666f725f6c696768742e737667)

Scaffold
========

[](#scaffold)

 [ ![Build](https://camo.githubusercontent.com/734569a6bae54352abf7bbc442289e30e81ac09c9d9b25a2e4772bcb2c1055c3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f796969322d657874656e73696f6e732f73636166666f6c642f6275696c642e796d6c3f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6162656c3d4275696c64) ](https://github.com/yii2-extensions/scaffold/actions/workflows/build.yml) [ ![Mutation](https://camo.githubusercontent.com/e7a831e8e859f906dba1b8ca6972d19c0632a6d5760508608f6b22e5576c10a6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f796969322d657874656e73696f6e732f73636166666f6c642f6d75746174696f6e2e796d6c3f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6162656c3d4d75746174696f6e) ](https://github.com/yii2-extensions/scaffold/actions/workflows/mutation.yml) [ ![PHPStan](https://camo.githubusercontent.com/4d90b96947f61bdf486544c46290941ba9b3bb2123cc6fa7685cdbf971e1a127/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f796969322d657874656e73696f6e732f73636166666f6c642f7374617469632e796d6c3f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6162656c3d5048505374616e) ](https://github.com/yii2-extensions/scaffold/actions/workflows/static.yml)

 **Declarative multi-layer file scaffolding for PHP projects
via Composer providers and a Console CLI**

Features
--------

[](#features)

  ![Feature Overview](./docs/svgs/features.svg)Installation
------------

[](#installation)

```
composer require yii2-extensions/scaffold:^0.1
composer config allow-plugins.yii2-extensions/scaffold true
```

Declare the providers that are permitted to write files into your project:

```
{
    "extra": {
        "scaffold": {
            "allowed-packages": [
                "yii2-extensions/app-base"
            ]
        }
    }
}
```

Run `composer install` to trigger the scaffold process. Commit `scaffold-lock.json` to version control.

To opt out of auto-trigger and manage updates manually via `vendor/bin/scaffold`, set `auto: false` (see [Configuration Reference](docs/configuration.md#auto)):

```
{
    "extra": {
        "scaffold": {
            "auto": false,
            "allowed-packages": ["yii2-extensions/app-base"]
        }
    }
}
```

Configuration
-------------

[](#configuration)

Minimal `composer.json` for a project using one scaffold provider:

```
{
    "require": {
        "yii2-extensions/scaffold": "^0.1",
        "yii2-extensions/app-base": "^0.1"
    },
    "config": {
        "allow-plugins": {
            "yii2-extensions/scaffold": true
        }
    },
    "extra": {
        "scaffold": {
            "allowed-packages": [
                "yii2-extensions/app-base"
            ]
        }
    }
}
```

Console commands
----------------

[](#console-commands)

After `composer install`, the plugin ships a standalone Symfony Console CLI at `vendor/bin/scaffold`that works in any PHP project (Yii2, Yii3, Laravel, Symfony, plain PHP).

CommandWhat it does`vendor/bin/scaffold status`Prints a table comparing every tracked file's on-disk hash to the one recorded in `scaffold-lock.json` (`synced` / `modified` / `missing`).`vendor/bin/scaffold providers`Lists every provider recorded in `scaffold-lock.json` and how many files each one contributed.`vendor/bin/scaffold diff `Shows a line-by-line diff between the provider stub and the current on-disk file.`vendor/bin/scaffold reapply [file] [--force] [--provider=]`Re-copies stubs from `vendor/` to the project, updating lock hashes on success. Without `--force`, user-modified files are reported and skipped.`vendor/bin/scaffold eject  [--yes]`Removes a file entry from `scaffold-lock.json` without deleting the file from disk. Without `--yes` only previews the change.Typical post-install workflow:

```
vendor/bin/scaffold status                                      # what changed
vendor/bin/scaffold diff config/params.php                      # review one file
vendor/bin/scaffold reapply config/params.php --force           # accept stub version

# or
vendor/bin/scaffold eject config/params.php --yes               # keep yours, stop tracking
```

See [`docs/console.md`](docs/console.md) for the full reference.

Documentation
-------------

[](#documentation)

- 📚 [Installation Guide](docs/installation.md)
- ⚙️ [Configuration Reference](docs/configuration.md)
- 📦 [Creating Providers](docs/providers.md)
- 🔀 [File Modes](docs/modes.md)
- 🖥️ [Console Commands](docs/console.md)
- 🧪 [Testing Guide](docs/testing.md)

Package information
-------------------

[](#package-information)

[![PHP](https://camo.githubusercontent.com/f04357fef9ebcd99ed76d5414552bcd1ce849df0ee1d4faf8e991f54c966d508/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f253345253344382e332d3737374242342e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://www.php.net/releases/8.3/en.php)[![Latest Stable Version](https://camo.githubusercontent.com/b9c88351f2d4c959b5c0781d9d40e7638e45da8dc15a94c6731bb470b5e64b33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f796969322d657874656e73696f6e732f73636166666f6c642e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c3d537461626c65)](https://packagist.org/packages/yii2-extensions/scaffold)[![Total Downloads](https://camo.githubusercontent.com/3a33e0a514199c01845b56070660c7a1da7de78e6e09426153d2221525c04841/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f796969322d657874656e73696f6e732f73636166666f6c642e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d636f6d706f736572266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473)](https://packagist.org/packages/yii2-extensions/scaffold)

Quality code
------------

[](#quality-code)

[![PHPStan Level Max](https://camo.githubusercontent.com/b1aeb44257ce46737d1787123b534aab9dded28219f828e4ae13a1e3b460f53c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c2532304d61782d3446354439352e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](https://github.com/yii2-extensions/scaffold/actions/workflows/static.yml)[![Super-Linter](https://camo.githubusercontent.com/90ff6385406d19a7ff46c7508867df0be5881f117caf5a69e69aedf55738cec6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f796969322d657874656e73696f6e732f73636166666f6c642f6c696e7465722e796d6c3f7374796c653d666f722d7468652d6261646765266c6162656c3d53757065722d4c696e746572266c6f676f3d676974687562)](https://github.com/yii2-extensions/scaffold/actions/workflows/linter.yml)[![StyleCI](https://camo.githubusercontent.com/2e44ba381d6c9ab95b548566772bd17337dc56f8a6a646974bf7277720e5be9d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374796c6543492d5061737365642d3434434331312e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](https://github.styleci.io/repos/scaffold?branch=main)

Our social networks
-------------------

[](#our-social-networks)

[![Follow on X](https://camo.githubusercontent.com/332c1b1e043dfb940b95825f7863dc473f6924ddacdd6738cbbbba08f49e1862/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d466f6c6c6f772532306f6e253230582d3144413146322e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d78266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d303030303030)](https://x.com/Terabytesoftw)

License
-------

[](#license)

[![License](https://camo.githubusercontent.com/680c8d62ba2d5a71d7099b6e81114fb0b22d99086c121fd178e1149afc669d44/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4253442d2d332d2d436c617573652d627269676874677265656e2e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6f70656e736f75726365696e6974696174697665266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d353535353535)](LICENSE)

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance95

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

35d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/524d2b46690f41fce7188d369488a35e7624e6c5a264d82aacd08548bfd156ab?d=identicon)[terabytesoftw](/maintainers/terabytesoftw)

---

Top Contributors

[![terabytesoftw](https://avatars.githubusercontent.com/u/42547589?v=4)](https://github.com/terabytesoftw "terabytesoftw (20 commits)")

---

Tags

composercomposer-pluginfile-mappingphpscaffoldscaffoldingtemplateyii2scaffoldingscaffoldcomposer-pluginyii2-extensionsfile-mapping

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/yii2-extensions-scaffold/health.svg)

```
[![Health](https://phpackages.com/badges/yii2-extensions-scaffold/health.svg)](https://phpackages.com/packages/yii2-extensions-scaffold)
```

###  Alternatives

[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54642.4k4](/packages/jolicode-castor)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21764.8M1.6k](/packages/drupal-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M506](/packages/shopware-core)[altis/local-server

Local Server module for Altis

18217.0k2](/packages/altis-local-server)[stolt/lean-package-validator

Library and CLI for validating if a project or package has and will have lean releases.

186.1k29](/packages/stolt-lean-package-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
