{"id":19218492,"url":"https://github.com/daveiano/drupal-ddev","last_synced_at":"2026-05-07T00:33:34.900Z","repository":{"id":50614407,"uuid":"480576347","full_name":"Daveiano/drupal-ddev","owner":"Daveiano","description":"My personal development environment when working with Drupal.","archived":false,"fork":false,"pushed_at":"2023-11-29T00:41:40.000Z","size":1086,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"10.x","last_synced_at":"2025-01-04T19:21:32.116Z","etag":null,"topics":["docker-compose","drupal","environment","jetbrains","php","phpstorm"],"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/Daveiano.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":"2022-04-11T22:48:34.000Z","updated_at":"2022-07-30T23:36:32.000Z","dependencies_parsed_at":"2023-11-29T01:30:31.167Z","dependency_job_id":"569a4198-f354-496c-a1bf-b914de8d01e5","html_url":"https://github.com/Daveiano/drupal-ddev","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daveiano%2Fdrupal-ddev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daveiano%2Fdrupal-ddev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daveiano%2Fdrupal-ddev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daveiano%2Fdrupal-ddev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daveiano","download_url":"https://codeload.github.com/Daveiano/drupal-ddev/tar.gz/refs/heads/10.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240292382,"owners_count":19778311,"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":["docker-compose","drupal","environment","jetbrains","php","phpstorm"],"created_at":"2024-11-09T14:26:56.783Z","updated_at":"2026-05-07T00:33:34.847Z","avatar_url":"https://github.com/Daveiano.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# drupal-ddev\n\n**Requires at least PHPStorm 2022.2 because of this issue: https://youtrack.jetbrains.com/issue/WI-62463**\n\nThis is my personal development environment when working with Drupal. Created via the\n`composer create-project drupal/recommended-project my_site_name_dir` command, see the drupal docs\nfor more info: https://www.drupal.org/node/2718229?no_cache=1651100340#s-create-a-project.\n\nThe [drupal/core-dev](https://packagist.org/packages/drupal/core-dev) package is included which\nbrings [phpcs](https://github.com/squizlabs/PHP_CodeSniffer), and [PHPUnit](https://phpunit.de) into the project.\n[phpstan-drupal](https://github.com/mglaman/phpstan-drupal) is also included.\n\nThis repository is also some kind of resource collection for my self to quickly set up a development environment.\n\n## Usage\n\nThis setup uses [ddev](https://ddev.readthedocs.io/en/stable/) to provide a webserver and database via docker compose.\n\nTo start the containers, run: `ddev start` \u003cbr/\u003e\nStop: `ddev stop` \u003cbr/\u003e\nImport database dump: `ddev import-db --src=/path/to/db.sql.gz`\n\nUse `ddev describe` to get detailed info about the services:\n\n![ddev describe cli output](.github/images/ddev-describe.png)\n\nTo get a list of all available commands, use `ddev -h`\n\nFor more see the [ddev CLI Docs](https://ddev.readthedocs.io/en/stable/users/cli-usage/).\n\n### composer\n\nPrefix all composer commands with `ddev`, eg. `ddev composer install`.\n\n### drush\n\nPrefix all drush commands with `ddev`, eg. `ddev drush cr`.\n\n### PHPUnit\n\nConfigurations for PHPStorm are included. There is also a post-composer hook to automatically create a basic\nphpunit.xml config file:\n\n```\nhooks:\n  post-composer:\n    - exec: ./.ddev/scripts/phpunit-config.sh\n```\n\n### Drupal configs\n\nDrupal's configs are stored at /config.\n\nThe configs include a basic installation with the standard profile.\n\n### ddev Hooks\n\nThis is the complete hooks section from the ddev config.yaml:\n\n```\nhooks:\n  post-composer:\n    # Create and configure PHPUnit config file\n    - exec: ./.ddev/scripts/phpunit-config.sh\n  post-start:\n    # Install Drupal after start if not installed already\n    - exec: \"(drush status bootstrap | grep -q Successful) || echo '$settings[\\'config_sync_directory\\'] = \\'./../config\\';' \u003e\u003e web/sites/default/settings.php \u0026\u0026 drush site-install -y --db-url=mysql://db:db@db/db\"\n    # Generate a one-time login link for the admin account.\n    - exec: \"drush uli 1\"\n```\n\nBesides the PHPUnit configuration (post-composer), there are also some kind of one-time installation routine living in\n`post-start` section. This will check (every time you start the project) if Drupal is installed. If so, a one time login\nlink for user 1 is printed to the console via drush. If Drupal ist not already installed, it gets installed via\n`drush site install` using the Drupal configs in `/config`.\n\n## Pre-configuration\n\nIncludes necessary PHPStorm configs for:\n\n* PHP CodeSniffer\n* PHPStan Drupal\n* PHP Interpreter via ddev (docker-compose)\n\n## Resources\n\n* [[Drupal.org] CodeSniffer](https://www.drupal.org/docs/contributed-modules/code-review-module/installing-coder-sniffer)\n* [[ddev Docs] PhpStorm Integration](https://ddev.readthedocs.io/en/stable/users/topics/phpstorm/)\n* [[ddev Docs] ddev Hooks](https://ddev.readthedocs.io/en/latest/users/configuration/hooks/)\n* [[ddev Docs] ddev Commands](https://ddev.readthedocs.io/en/latest/users/extend/custom-commands/)\n* [[ddev Docs] ddev Custom services](https://ddev.readthedocs.io/en/latest/users/extend/custom-compose-files/)\n* [[Blocker] PHPStorm Bug](https://youtrack.jetbrains.com/issue/WI-62463)\n* [[GitHub] drupal/core-dev](https://github.com/drupal/core-dev)\n* [[mglaman.dev] PHPStan](https://mglaman.dev/blog/tighten-your-drupal-code-using-phpstan)\n* [[mglaman.dev] Running Drupal's PHPUnit test suites on DDEV](https://mglaman.dev/blog/running-drupals-phpunit-test-suites-ddev)\n* [[mglaman.dev] Running Drupal's FunctionalJavascript tests on DDEV](https://mglaman.dev/blog/running-drupals-functionaljavascript-tests-ddev)\n* [[mglaman.dev] Running Drupal's Nightwatch test suite on DDEV](https://mglaman.dev/blog/running-drupals-nightwatch-test-suite-ddev)\n* [[Drupal.org] PHPUnit in Drupal](https://www.drupal.org/docs/automated-testing/phpunit-in-drupal)\n* [[Drupal.org] Running PHPUnit tests](https://www.drupal.org/docs/automated-testing/phpunit-in-drupal/running-phpunit-tests)\n* [[drush.org] Drush commands](https://www.drush.org/latest/commands/all/)\n\n## Upgrade to Drupal 10\n\n### Preparation\n\nhttps://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/upgrading-from-drupal-9-to-drupal-10/overview\n\n### Upgrade\n\nhttps://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/upgrading-a-composer-based-site\n\n```\nddev composer require 'drupal/core-recommended:^10' 'drupal/core-composer-scaffold:^10' 'drupal/core-project-message:^10' --update-with-dependencies --no-update\nddev composer require 'drupal/core-dev:^10' --dev --update-with-dependencies --no-update\nddev composer update\n```\n\n## Credits\n\nThanks to Matt Glaman for the webdriver container (https://mglaman.dev/blog/running-drupals-functionaljavascript-tests-ddev).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaveiano%2Fdrupal-ddev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaveiano%2Fdrupal-ddev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaveiano%2Fdrupal-ddev/lists"}