{"id":37005217,"url":"https://github.com/caxy/drupal-project","last_synced_at":"2026-01-14T00:39:50.637Z","repository":{"id":62500178,"uuid":"45196337","full_name":"caxy/drupal-project","owner":"caxy","description":":monorail: Composer template for Bootstrap based Drupal projects. Quick installation via \"composer create-project caxy/drupal-project\"","archived":false,"fork":true,"pushed_at":"2020-03-05T23:06:37.000Z","size":208,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":22,"default_branch":"8.x","last_synced_at":"2024-12-12T01:46:09.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"drupal-composer/drupal-project","license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caxy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-29T16:35:40.000Z","updated_at":"2017-09-05T17:19:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/caxy/drupal-project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/caxy/drupal-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caxy%2Fdrupal-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caxy%2Fdrupal-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caxy%2Fdrupal-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caxy%2Fdrupal-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caxy","download_url":"https://codeload.github.com/caxy/drupal-project/tar.gz/refs/heads/8.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caxy%2Fdrupal-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-14T00:39:50.537Z","updated_at":"2026-01-14T00:39:50.619Z","avatar_url":"https://github.com/caxy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Composer template for Drupal projects\n\n[![Build Status](https://travis-ci.org/caxy/drupal-project.svg?branch=8.x)](https://travis-ci.org/caxy/drupal-project)\n\nThis project template should provide a kickstart for managing your site\ndependencies with [Composer](https://getcomposer.org/).\n\nIf you want to know how to use it as replacement for\n[Drush Make](https://github.com/drush-ops/drush/blob/master/docs/make.md) visit\nthe [Documentation on drupal.org](https://www.drupal.org/node/2471553).\n\n## Usage\n\nFirst you need to [install composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx).\n\n\u003e Note: The instructions below refer to the [global composer installation](https://getcomposer.org/doc/00-intro.md#globally).\nYou might need to replace `composer` with `php composer.phar` (or similar) \nfor your setup.\n\nAfter that you can create the project:\n\n```\ncomposer create-project caxy/drupal-project:8.x-dev some-dir --stability dev --no-interaction\n```\n\nWith `composer require ...` you can download new dependencies to your \ninstallation.\n\n```\ncd some-dir\ncomposer require drupal/devel:~1.0\n```\n\nThe `composer create-project` command passes ownership of all files to the \nproject that is created. You should create a new git repository, and commit \nall files not excluded by the .gitignore file.\n\n## What does the template do?\n\nWhen installing the given `composer.json` some tasks are taken care of:\n\n* Drupal will be installed in the `docroot`-directory.\n* Autoloader is implemented to use the generated composer autoloader in `vendor/autoload.php`,\n  instead of the one provided by Drupal (`docroot/vendor/autoload.php`).\n* Modules (packages of type `drupal-module`) will be placed in `docroot/modules/contrib/`\n* Theme (packages of type `drupal-theme`) will be placed in `docroot/themes/contrib/`\n* Profiles (packages of type `drupal-profile`) will be placed in `docroot/profiles/contrib/`\n* Creates default writable versions of `settings.php` and `services.yml`.\n* Creates `sites/default/files`-directory.\n* Latest version of drush is installed locally for use at `vendor/bin/drush`.\n* Latest version of DrupalConsole is installed locally for use at `vendor/bin/drupal`.\n\n## Updating Drupal Core\n\nThis project will attempt to keep all of your Drupal Core files up-to-date; the \nproject [drupal-composer/drupal-scaffold](https://github.com/drupal-composer/drupal-scaffold) \nis used to ensure that your scaffold files are updated every time drupal/core is \nupdated. If you customize any of the \"scaffolding\" files (commonly .htaccess), \nyou may need to merge conflicts if any of your modfied files are updated in a \nnew release of Drupal core.\n\nFollow the steps below to update your core files.\n\n1. Run `composer update drupal/core --with-dependencies` to update Drupal Core and its dependencies.\n1. Run `git diff` to determine if any of the scaffolding files have changed. \n   Review the files for any changes and restore any customizations to \n  `.htaccess` or `robots.txt`.\n1. Commit everything all together in a single commit, so `docroot` will remain in\n   sync with the `core` when checking out branches or running `git bisect`.\n1. In the event that there are non-trivial conflicts in step 2, you may wish \n   to perform these steps on a branch, and use `git merge` to combine the \n   updated core files with your customized files. This facilitates the use \n   of a [three-way merge tool such as kdiff3](http://www.gitshah.com/2010/12/how-to-setup-kdiff-as-diff-tool-for-git.html). This setup is not necessary if your changes are simple; \n   keeping all of your modifications at the beginning or end of the file is a \n   good strategy to keep merges easy.\n\n## Generate composer.json from existing project\n\nWith using [the \"Composer Generate\" drush extension](https://www.drupal.org/project/composer_generate)\nyou can now generate a basic `composer.json` file from an existing project. Note\nthat the generated `composer.json` might differ from this project's file.\n\n## Creating a site profile\n\nWe advise that all projects be created as a [Drupal 8 profile](https://www.drupal.org/node/2210443) and that\nComposer be used to manage Drupal dependencies within the profile.\n\n```bash\nmkdir docroot/profiles/specialproject\n```\n\nCreate a `composer.json` file in the profile's directory, for example:\n\n```json\n{\n    \"name\": \"my-company/special-project-profile\",\n    \"type\": \"drupal-profile\",\n    \"repositories\": [\n        {\n            \"type\": \"composer\",\n            \"url\": \"https://packagist.drupal-composer.org\"\n        }\n    ],\n    \"require\": {\n        \"drupal/metatag\": \"~8.0@dev\"\n    }\n}\n```\n\nAdd this to your root level `composer.json`:\n\n```json\n{\n    \"require\": {\n        \"wikimedia/composer-merge-plugin\": \"^1.3.0\"\n    },\n    \"extra\": {\n        \"merge-plugin\": {\n            \"include\": [\n                \"docroot/profiles/specialproject/composer.json\"\n            ]\n        }\n    }\n}\n```\n\nThis will allow you to maintain a `composer.json` file for your profile separate\nfrom the Drupal composer platform's dependencies while keeping the simplicity of\nrunning `composer update` from the root level to update dependencies for the\nDrupal platform and the profile at the same time.\n\n## FAQ\n\n### Should I commit the contrib modules I download?\n\nComposer recommends **no**. They provide [argumentation against but also \nworkrounds if a project decides to do it anyway](https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md).\n\n### Should I commit the scaffolding files?\n\nThe [drupal-scaffold](https://github.com/drupal-composer/drupal-scaffold) plugin can download the scaffold files (like\nindex.php, update.php, …) to the web/ directory of your project. If you have not customized those files you could choose\nto not check them into your version control system (e.g. git). If that is the case for your project it might be\nconvenient to automatically run the drupal-scaffold plugin after every install or update of your project. You can\nachieve that by registering `@drupal-scaffold` as post-install and post-update command in your composer.json:\n\n```json\n\"scripts\": {\n    \"drupal-scaffold\": \"DrupalComposer\\\\DrupalScaffold\\\\Plugin::scaffold\",\n    \"post-install-cmd\": [\n        \"@drupal-scaffold\",\n        \"...\"\n    ],\n    \"post-update-cmd\": [\n        \"@drupal-scaffold\",\n        \"...\"\n    ]\n},\n```\n### How can I apply patches to downloaded modules?\n\nIf you need to apply patches (depending on the project being modified, a pull \nrequest is often a better solution), you can do so with the \n[composer-patches](https://github.com/cweagans/composer-patches) plugin.\n\nTo add a patch to drupal module foobar insert the patches section in the extra \nsection of composer.json:\n```json\n\"extra\": {\n    \"patches\": {\n        \"drupal/foobar\": {\n            \"Patch description\": \"URL to patch\"\n        }\n    }\n}\n```\n\n### How do I use this on Acquia cloud?\n\nAdd this to your `settings.php` before deploying to Acquia Cloud. Replace `AH_SITE_GROUP` with the name of your site\ngroup in Acquia Cloud.\n\n```php\n\u003c?php\n\n// On Acquia Cloud, this include file configures Drupal to use the correct\n// database in each site environment (Dev, Stage, or Prod). To use this\n// settings.php for development on your local workstation, set $db_url\n// (Drupal 5 or 6) or $databases (Drupal 7 or 8) as described in comments above.\nif (file_exists('/var/www/site-php')) {\n\n  // As of 29 October 2015, Acquia Cloud does not support release candidates of Drupal 8,\n  // so we must define `conf_path` function which was removed between beta15 and RC1.\n  if (!function_exists('conf_path')) {\n    function conf_path() {\n      $request = \\Symfony\\Component\\HttpFoundation\\Request::createFromGlobals();\n      return \\Drupal\\Core\\DrupalKernel::findSitePath($request, FALSE);\n    }\n  }\n  require('/var/www/site-php/AH_SITE_GROUP/AH_SITE_GROUP-settings.inc');\n}\n```\n\nThe Acquia Connector should be added to the root level `composer.json` unless your site profile\ncan only run on the Acquia Cloud environment.\n\n```json\n{\n    \"require\": {\n        \"drupal/acquia_connector\": \"8.1.*@dev\"\n    }\n}\n```\n\n### Do I need [Composer Manager](https://www.drupal.org/project/composer_manager)?\n\nYou never need this module, and it probably will not work correctly as there is no longer\na composer.json file within the document root. It is incorrect for contrib modules to\ndeclare this dependency explicitly, because it is never the only way to run a module\nthat has composer PHP dependencies.\n\nIn a module or your project profile, add this hook implementation:\n\n```php\n\u003c?php\n\n/**\n * Implements hook_system_info_alter().\n */\nfunction MODULE_system_info_alter(array \u0026$info, \\Drupal\\Core\\Extension\\Extension $file, $type) {\n  // remove composer_manager dependency.\n  if (isset($info['dependencies']) \u0026\u0026 !empty($info['dependencies'])) {\n    $info['dependencies'] = array_diff($info['dependencies'], array('composer_manager'));\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaxy%2Fdrupal-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaxy%2Fdrupal-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaxy%2Fdrupal-project/lists"}