PHPackages                             drupal-composer/drupal-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. drupal-composer/drupal-scaffold

Abandoned → [drupal/core-composer-scaffold](/?search=drupal%2Fcore-composer-scaffold)Composer-plugin

drupal-composer/drupal-scaffold
===============================

Composer Plugin for updating the Drupal scaffold files when using drupal/core

2.6.1(7y ago)1949.1M—2.2%45[4 issues](https://github.com/drupal-composer/drupal-scaffold/issues)[7 PRs](https://github.com/drupal-composer/drupal-scaffold/pulls)20GPL-2.0-or-laterPHPPHP ^5.5.9|&gt;=7.0.8

Since Jan 29Pushed 5y ago11 watchersCompare

[ Source](https://github.com/drupal-composer/drupal-scaffold)[ Packagist](https://packagist.org/packages/drupal-composer/drupal-scaffold)[ RSS](/packages/drupal-composer-drupal-scaffold/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (24)Used By (20)

drupal-scaffold
===============

[](#drupal-scaffold)

[![Build Status](https://camo.githubusercontent.com/f1f5efa57cb86c15269752b3ca96e5f91387e0c87da4f88be367c31de9703ad4/68747470733a2f2f7472617669732d63692e6f72672f64727570616c2d636f6d706f7365722f64727570616c2d73636166666f6c642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/drupal-composer/drupal-scaffold)

DEPRECATED - DO NOT USE
=======================

[](#deprecated---do-not-use)

This project is deprecated. Please use [drupal/core-composer-scaffold](https://github.com/drupal/core-composer-scaffold).

If you are still using this plugin because you are on Drupal 8.7.x or earlier, please note that it **is** possible to use core-composer-scaffold with older versions of Drupal 8. Start with the template project [drupal/recommended-project](https://github.com/drupal/recommended-project), and then pin to an earlier version of drupal/core-recommended after the initial create-project is done. Note that it's generally easier to remove composer.lock and vendor first when moving back to older versions of Drupal core.

OLD README FOLLOWS
==================

[](#old-readme-follows)

Composer plugin for automatically downloading Drupal scaffold files (like `index.php`, `update.php`, …) when using `drupal/core` via Composer.

It is recommended that the vendor directory be placed in its standard location at the project root, outside of the Drupal root; however, the location of the vendor directory and the name of the Drupal root may be placed in whatever location suits the project. Drupal-scaffold will generate the autoload.php file at the Drupal root to require the Composer-generated autoload file in the vendor directory.

Usage
-----

[](#usage)

Run `composer require drupal-composer/drupal-scaffold:dev-master` in your composer project before installing or updating `drupal/core`.

Once drupal-scaffold is required by your project, it will automatically update your scaffold files whenever `composer update` changes the version of `drupal/core` installed.

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

[](#configuration)

You can configure the plugin with providing some settings in the `extra` section of your root `composer.json`.

```
{
  "extra": {
    "drupal-scaffold": {
      "source": "https://git.drupalcode.org/project/drupal/raw/{version}/{path}",
      "excludes": [
        "google123.html",
        "robots.txt"
      ],
      "includes": [
        "sites/default/example.settings.my.php"
      ],
      "initial": {
        "sites/default/default.services.yml": "sites/default/services.yml",
        "sites/default/default.settings.php": "sites/default/settings.php"
      },
      "omit-defaults": false
    }
  }
}
```

The `source` option may be used to specify the URL to download the scaffold files from; the default source is drupal.org. The literal string `{version}` in the `source` option is replaced with the current version of Drupal core being updated prior to download. You can also define `source` as an array to have fallbacks in case of any HTTP issues.

```
{
  "extra": {
    "drupal-scaffold": {
      "source": [
        "https://git.drupalcode.org/project/drupal/raw/{version}/{path}",
        "https://raw.githubusercontent.com/drupal/drupal/{version}/{path}"
      ]
    }
  }
}
```

With the `drupal-scaffold` option `excludes`, you can provide additional paths that should not be copied or overwritten. The plugin provides no excludes by default.

Default includes are provided by the plugin:

```
.csslintrc
.editorconfig
.eslintignore
.eslintrc (Drupal = 8.3.x)
.gitattributes
.ht.router.php (Drupal >= 8.5.x)
.htaccess
index.php
robots.txt
sites/default/default.settings.php
sites/default/default.services.yml
sites/development.services.yml
sites/example.settings.local.php
sites/example.sites.php
update.php
web.config

```

When setting `omit-defaults` to `true`, neither the default excludes nor the default includes will be provided; in this instance, only those files explicitly listed in the `excludes` and `includes` options will be considered. If `omit-defaults` is `false` (the default), then any items listed in `excludes`or `includes` will be in addition to the usual defaults.

The `initial` hash lists files that should be copied over only if they do not exist in the destination. The key specifies the path to the source file, and the value indicates the path to the destination file.

Limitation
----------

[](#limitation)

When using Composer to install or update the Drupal development branch, the scaffold files are always taken from the HEAD of the branch (or, more specifically, from the most recent development .tar.gz archive). This might not be what you want when using an old development version (e.g. when the version is fixed via composer.lock). To avoid problems, always commit your scaffold files to the repository any time that composer.lock is committed. Note that the correct scaffold files are retrieved when using a tagged release of `drupal/core` (recommended).

Custom command
--------------

[](#custom-command)

The plugin by default is only downloading the scaffold files when installing or updating `drupal/core`. If you want to call it manually, you have to add the command callback to the `scripts`-section of your root `composer.json`, like this:

```
{
  "scripts": {
    "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold"
  }
}
```

After that you can manually download the scaffold files according to your configuration by using `composer drupal:scaffold`.

It is assumed that the scaffold files will be committed to the repository, to ensure that the correct files are used on the CI server (see **Limitation**, above). After running `composer install` for the first time commit the scaffold files to your repository.

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity60

Solid adoption and visibility

Community44

Growing community involvement

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~60 days

Recently: every ~72 days

Total

20

Last Release

2607d ago

Major Versions

1.3.2 → 2.0.02016-05-25

PHP version history (2 changes)1.0.0PHP &gt;=5.4.5

2.6.0PHP ^5.5.9|&gt;=7.0.8

### Community

Maintainers

![](https://www.gravatar.com/avatar/c711eb409734c42befd3bb9d507be67da46d0db9bd03c5172c8fe2da1705c239?d=identicon)[webflo](/maintainers/webflo)

![](https://www.gravatar.com/avatar/5613deedd974152f066c46795af9d5dd85cb84bd0c05ebb921287479c82b0c0f?d=identicon)[derhasi](/maintainers/derhasi)

---

Top Contributors

[![greg-1-anderson](https://avatars.githubusercontent.com/u/612191?v=4)](https://github.com/greg-1-anderson "greg-1-anderson (52 commits)")[![derhasi](https://avatars.githubusercontent.com/u/118502?v=4)](https://github.com/derhasi "derhasi (41 commits)")[![webflo](https://avatars.githubusercontent.com/u/123946?v=4)](https://github.com/webflo "webflo (30 commits)")[![claudiu-cristea](https://avatars.githubusercontent.com/u/473868?v=4)](https://github.com/claudiu-cristea "claudiu-cristea (2 commits)")[![kmbremner](https://avatars.githubusercontent.com/u/6079282?v=4)](https://github.com/kmbremner "kmbremner (1 commits)")[![pingers](https://avatars.githubusercontent.com/u/1512865?v=4)](https://github.com/pingers "pingers (1 commits)")[![sherakama](https://avatars.githubusercontent.com/u/550602?v=4)](https://github.com/sherakama "sherakama (1 commits)")[![vijaycs85](https://avatars.githubusercontent.com/u/1220029?v=4)](https://github.com/vijaycs85 "vijaycs85 (1 commits)")[![hctom](https://avatars.githubusercontent.com/u/8543951?v=4)](https://github.com/hctom "hctom (1 commits)")[![bartfeenstra](https://avatars.githubusercontent.com/u/376735?v=4)](https://github.com/bartfeenstra "bartfeenstra (1 commits)")[![FlorentTorregrosa](https://avatars.githubusercontent.com/u/1962368?v=4)](https://github.com/FlorentTorregrosa "FlorentTorregrosa (1 commits)")[![alexpott](https://avatars.githubusercontent.com/u/769634?v=4)](https://github.com/alexpott "alexpott (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/drupal-composer-drupal-scaffold/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.3k86.3M2.2k](/packages/symfony-symfony)[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M712](/packages/maatwebsite-excel)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)

PHPackages © 2026

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