{"id":21428715,"url":"https://github.com/metadrop/drupal-boilerplate","last_synced_at":"2025-08-10T13:09:41.277Z","repository":{"id":39615696,"uuid":"237263372","full_name":"Metadrop/drupal-boilerplate","owner":"Metadrop","description":"Drupal projects up and running with Docker and many other tools in minutes","archived":false,"fork":false,"pushed_at":"2024-11-19T13:32:39.000Z","size":66510,"stargazers_count":28,"open_issues_count":9,"forks_count":23,"subscribers_count":5,"default_branch":"3.x","last_synced_at":"2025-03-29T19:05:50.090Z","etag":null,"topics":["backstopjs","behat","boilerplate","docker","drupal","drush","starter-kit","static-code-analysis","template"],"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/Metadrop.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-30T17:11:59.000Z","updated_at":"2024-11-19T13:32:44.000Z","dependencies_parsed_at":"2023-10-02T13:01:43.269Z","dependency_job_id":"9d8b64c1-3025-4e0a-a151-14c3205ec62e","html_url":"https://github.com/Metadrop/drupal-boilerplate","commit_stats":{"total_commits":339,"total_committers":25,"mean_commits":13.56,"dds":0.7640117994100295,"last_synced_commit":"8f421a5c5ab440e7dc23185d552ffdaca16546c6"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metadrop%2Fdrupal-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metadrop%2Fdrupal-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metadrop%2Fdrupal-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metadrop%2Fdrupal-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Metadrop","download_url":"https://codeload.github.com/Metadrop/drupal-boilerplate/tar.gz/refs/heads/3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393569,"owners_count":20931812,"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":["backstopjs","behat","boilerplate","docker","drupal","drush","starter-kit","static-code-analysis","template"],"created_at":"2024-11-22T22:14:34.429Z","updated_at":"2025-04-05T20:07:34.976Z","avatar_url":"https://github.com/Metadrop.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metadrop's Drupal Boilerplate\n\n## Important notice\n\nThis project has reached the end of its life and is now obsolete. \nWe are no longer providing updates or support.\n\nPlease consider using [DDEV Aljibe](https://github.com/Metadrop/ddev-aljibe/).\n\n## Introduction\n\nThis repository is a boilerplate to create Drupal 8/9/10 projects with many tools already preconfigured with minimal effort. You can have a Drupal site running in your local in less than 3 minutes.\n\nTools included out-of-the-box:\n\n  - A Docker infrastructure.\n  - A boilerplate folder structure that fits all project needs.\n  - A working and preconfigured Drush, the Drupal shell.\n  - MkDocs to document your project using Markdown files.\n  - Grumphp to enforce [Drupal coding standards](https://www.drupal.org/docs/develop/standards/coding-standards). It is configured to use [phplint](https://github.com/overtrue/phplint), yamlint,  [jsonlint](https://github.com/Seldaek/jsonlint), [drupalcheck](https://github.com/mglaman/drupal-check) and [phpcs](https://github.com/squizlabs/PHP_CodeSniffer).\n  - Phpqa for static analysis.\n  - Behat BDD testing configured and working.\n  - PHPUnit for unit testing configured and working.\n  - [BackstopJS](https://github.com/garris/BackstopJS) for visual regression testing.\n  - [Stylelint](https://stylelint.io/) for checking style files.\n  - [Lighthouse](https://developer.chrome.com/docs/lighthouse/overview/) for checking performance, accessibility, PWA, SEO and more.\n  - [Pa11y](https://pa11y.org) for in-depth accessibility checks.\n  - [Scripthor](https://github.com/Metadrop/scripthor) toolset with some helper scripts for development.\n  - Optionally, a Solr container ready to be used by Drupal.\n\nIt is based on [Docker4Drupal](https://wodby.com/docs/1.0/stacks/drupal/local/), which uses Docker and Docker Compose. To get all the information about available webservers, databases, PHP versions and other containers check their [wodby/docker4drupa repository](https://github.com/wodby/docker4drupal).\n\nBecause it uses Docker under the hood, you can customize whatever you want, add new containers or use any standard Docker functionality to accommodate your project needs.\n\n## Quickview\n\nhttps://github.com/Metadrop/drupal-boilerplate/assets/776453/2b3d53c6-e2bf-4c48-87a0-2e2fdd66db1d\n\n## Requisites\n\n - [Docker](https://docs.docker.com/get-docker/)\n - [Docker Compose](https://docs.docker.com/compose/install/), version [V2](https://www.docker.com/blog/announcing-compose-v2-general-availability/).\n\n **Optionally**\n\n - Python 3 with PyYAML installed for the `make info` command\n\n## Usage\n\nTo create a new project based on this boilerplate, the recommended method is using Composer's create-project command:\n\n```\ncomposer create-project  --ignore-platform-reqs metadrop/drupal-boilerplate my-project\n```\n\nDepending in the Drupal release you want you should use a different branch.\n\n\n\n| Drupal release\t| Boilerplate branch \t| Example command\t|\n|---\t|---\t|---\t|\n| 10.x | 3.x branch | composer create-project  --ignore-platform-reqs metadrop/drupal-boilerplate my-project     \t|\n| 9.x  | 2.x branch | composer create-project  --ignore-platform-reqs metadrop/drupal-boilerplate:^2 my-project \t|\n\n\nNOTE: 2.x branch is minimally maintained because Drupal9 support ends November, 2023.\n\n\nBecause this boilerplate uses drupal/core-recommended under the hood you will get an updated release of the chosen core.\n\n\nOnce Composer finalizes the project creation an assistant will be automatically run. It will ask you a few questions:\n\n - The project name: this a machine name for the project. It will be used for Docker container names, project URL and some other places. Please, use only letters, numbers and underscores.\n\n - Setup a git repository? If yes, the assistant will initialize a git repository and make the initial commit.\n\n - Install Drupal? If yes, the assistant will configure and install a Drupal site.\n\n - Radix sub-theme: the assistant can create a [Radix](https://www.drupal.org/project/radix) subtheme for you. We quite often use Radix as the base theme of our projects. You can skip this and use your own theme, of course.\n\n\nAfter the assistant finished, if you have selected to install Drupal your project will be running and the assistant will print the URL to access it.\n\n!!! NOTE\n    By default, drupal-boilerplate is installed with a minimal profile. If you want to install another profile, you must not install Drupal during the composer create-project installation problem, when the question 'Do you want to install Drupal?' appears.\n\nAfter that, just install the profile you need with the `drush site-install` command into the PHP container, after the project creation has finished.\n\nExample:\n\n```\n   drush site-install standard\n```\n\nPlease note that if you install a profile that implements the hook_install the `make setup` command won't work as it makes a installation from configuration, and those installations requires the hook install to not be present.\n\n\n## FAQ\n\n\n### Is this for me?\n\nThis boilerplate is a good choice for medium to advanced users that want to have a full local environment with a complete set of tools ready to use for their Drupal projects in matter of minutes. However, you should be comfortable using Docker, Drush and another tools without a managing layer like DDEV provides.\n\n\n### Why not Lando/DDEV/whatever?\n\nWe love them! However, we have had some issues trying to adapt them to a certain edge case projects. Those tools allows to handle complex topics like docker thanks to a managing layer. However, that layer imposes some limits. It is not easy to hit them, but when you do it is a hard limit. That's when this boilerplate can be helpful.\n\n## Troubleshoting\n\n### 'make info' command doesn't work\n\nPython 3 with PyYML installed is needed.\n\n### Unit tests are not working\n\nYou may encounter several errors when running the `make test` command. For example:\n\n```\nPHP Fatal error:  Declaration of Drupal\\Tests\\ultimate_cron\\Kernel\\UltimateCronQueueTest::setUp() must be compatible with Drupal\\Tests\\system\\Kernel\\System\\CronQueueTest::setUp(): void in /var/www/html/web/modules/contrib/ultimate_cron/tests/src/Kernel/UltimateCronQueueTest.php on line 26\n```\n\nOr\n\n```\nFatal error: Uncaught Error: Class 'Drupal\\Tests\\group\\Functional\\GroupBrowserTestBase' not found in /var/www/html/web/modules/contrib/webform/modules/webform_group/tests/src/Functional/WebformGroupBrowserTestBase.php:13\n```\n\nThis is due `make test`tries to run all Unit tests and some modules have issues. For example, first error comes from this issue \"[Kernel test not compatible with core [9.x]](https://www.drupal.org/project/ultimate_cron/issues/3208608)\", while second error is handled on this other issue: \"[Group Testing Fails in PHPUnit for Webform Group submodule](https://www.drupal.org/project/webform/issues/3132204)\".\n\nIf you want to run all tests you need to address all those issues. But what for? You probably just want to run the test from a certain module. For that, just pass the proper path in the `make` command, like this:\n\n```\nmake test web/modules/contrib/devel/tests/src/Unit\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetadrop%2Fdrupal-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetadrop%2Fdrupal-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetadrop%2Fdrupal-boilerplate/lists"}