{"id":13450986,"url":"https://github.com/drupal-composer/drupal-scaffold","last_synced_at":"2025-04-12T15:43:44.972Z","repository":{"id":56972602,"uuid":"46939883","full_name":"drupal-composer/drupal-scaffold","owner":"drupal-composer","description":":construction: Composer Plugin for updating the Drupal scaffold files when using drupal/core","archived":false,"fork":false,"pushed_at":"2020-09-17T20:01:59.000Z","size":174,"stargazers_count":189,"open_issues_count":26,"forks_count":47,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-05-17T11:45:10.820Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drupal-composer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-26T17:36:24.000Z","updated_at":"2024-04-26T12:41:52.000Z","dependencies_parsed_at":"2022-08-21T10:20:19.824Z","dependency_job_id":null,"html_url":"https://github.com/drupal-composer/drupal-scaffold","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupal-composer%2Fdrupal-scaffold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupal-composer%2Fdrupal-scaffold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupal-composer%2Fdrupal-scaffold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupal-composer%2Fdrupal-scaffold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drupal-composer","download_url":"https://codeload.github.com/drupal-composer/drupal-scaffold/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248590962,"owners_count":21129921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T07:00:42.750Z","updated_at":"2025-04-12T15:43:44.946Z","avatar_url":"https://github.com/drupal-composer.png","language":"PHP","funding_links":[],"categories":["Updating Drupal Core","PHP","Scaffolding Tools"],"sub_categories":["Security tools"],"readme":"# drupal-scaffold\n\n[![Build Status](https://travis-ci.org/drupal-composer/drupal-scaffold.svg?branch=master)](https://travis-ci.org/drupal-composer/drupal-scaffold)\n\n# DEPRECATED - DO NOT USE\n\nThis project is deprecated. Please use [drupal/core-composer-scaffold](https://github.com/drupal/core-composer-scaffold). \n\nIf 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.\n\n# OLD README FOLLOWS\n\nComposer plugin for automatically downloading Drupal scaffold files (like\n`index.php`, `update.php`, …) when using `drupal/core` via Composer.\n\nIt is recommended that the vendor directory be placed in its standard location\nat the project root, outside of the Drupal root; however, the location of the\nvendor directory and the name of the Drupal root may be placed in whatever\nlocation suits the project.  Drupal-scaffold will generate the autoload.php\nfile at the Drupal root to require the Composer-generated autoload file in the\nvendor directory.\n\n## Usage\n\nRun `composer require drupal-composer/drupal-scaffold:dev-master` in your composer\nproject before installing or updating `drupal/core`.\n\nOnce drupal-scaffold is required by your project, it will automatically update\nyour scaffold files whenever `composer update` changes the version of\n`drupal/core` installed.\n\n## Configuration\n\nYou can configure the plugin with providing some settings in the `extra` section\nof your root `composer.json`.\n\n```json\n{\n  \"extra\": {\n    \"drupal-scaffold\": {\n      \"source\": \"https://git.drupalcode.org/project/drupal/raw/{version}/{path}\",\n      \"excludes\": [\n        \"google123.html\",\n        \"robots.txt\"\n      ],\n      \"includes\": [\n        \"sites/default/example.settings.my.php\"\n      ],\n      \"initial\": {\n        \"sites/default/default.services.yml\": \"sites/default/services.yml\",\n        \"sites/default/default.settings.php\": \"sites/default/settings.php\"\n      },\n      \"omit-defaults\": false\n    }\n  }\n}\n```\nThe `source` option may be used to specify the URL to download the\nscaffold files from; the default source is drupal.org. The literal string\n`{version}` in the `source` option is replaced with the current version of\nDrupal core being updated prior to download.\nYou can also define `source` as an array to have fallbacks in case of\nany HTTP issues.\n\n```json\n{\n  \"extra\": {\n    \"drupal-scaffold\": {\n      \"source\": [\n        \"https://git.drupalcode.org/project/drupal/raw/{version}/{path}\",\n        \"https://raw.githubusercontent.com/drupal/drupal/{version}/{path}\"\n      ]\n    }\n  }\n}\n```\n\nWith the `drupal-scaffold` option `excludes`, you can provide additional paths\nthat should not be copied or overwritten. The plugin provides no excludes by\ndefault.\n\nDefault includes are provided by the plugin:\n```\n.csslintrc\n.editorconfig\n.eslintignore\n.eslintrc (Drupal \u003c= 8.2.x)\n.eslintrc.json (Drupal \u003e= 8.3.x)\n.gitattributes\n.ht.router.php (Drupal \u003e= 8.5.x)\n.htaccess\nindex.php\nrobots.txt\nsites/default/default.settings.php\nsites/default/default.services.yml\nsites/development.services.yml\nsites/example.settings.local.php\nsites/example.sites.php\nupdate.php\nweb.config\n```\n\nWhen setting `omit-defaults` to `true`, neither the default excludes nor the\ndefault includes will be provided; in this instance, only those files explicitly\nlisted in the `excludes` and `includes` options will be considered. If\n`omit-defaults` is `false` (the default), then any items listed in `excludes`\nor `includes` will be in addition to the usual defaults.\n\nThe `initial` hash lists files that should be copied over only if they do not\nexist in the destination. The key specifies the path to the source file, and\nthe value indicates the path to the destination file.\n\n## Limitation\n\nWhen using Composer to install or update the Drupal development branch, the\nscaffold files are always taken from the HEAD of the branch (or, more\nspecifically, from the most recent development .tar.gz archive). This might\nnot be what you want when using an old development version (e.g. when the\nversion is fixed via composer.lock). To avoid problems, always commit your\nscaffold files to the repository any time that composer.lock is committed.\nNote that the correct scaffold files are retrieved when using a tagged release\nof `drupal/core` (recommended).\n\n## Custom command\n\nThe plugin by default is only downloading the scaffold files when installing or\nupdating `drupal/core`. If you want to call it manually, you have to add the\ncommand callback to the `scripts`-section of your root `composer.json`, like this:\n\n```json\n{\n  \"scripts\": {\n    \"drupal-scaffold\": \"DrupalComposer\\\\DrupalScaffold\\\\Plugin::scaffold\"\n  }\n}\n```\n\nAfter that you can manually download the scaffold files according to your\nconfiguration by using `composer drupal:scaffold`.\n\nIt is assumed that the scaffold files will be committed to the repository, to\nensure that the correct files are used on the CI server (see **Limitation**,\nabove). After running `composer install` for the first time commit the scaffold\nfiles to your repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupal-composer%2Fdrupal-scaffold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrupal-composer%2Fdrupal-scaffold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupal-composer%2Fdrupal-scaffold/lists"}