Skip to content

Contrib development #2

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ database:
type: mariadb
version: "10.6"
performance_mode: none
hooks:
post-start:
- exec: mkdir -p repos
- exec: mkdir -p web/browser_output
- exec: chmod +w web/browser_output
use_dns_when_possible: true
composer_version: ""
web_environment: []
corepack_enable: true
hooks:
post-start:
- exec: "mkdir -p repos"
- exec: "mkdir -p web/browser_output"
- exec: "chmod +w web/browser_output"
ddev_version_constraint: '>= 1.23'

# Key features of DDEV's config.yaml:

Expand Down
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
"php.suggest.basic": false,
"phpCodeSniffer.autoExecutable": true,
"phpCodeSniffer.standard": "Custom",
"phpCodeSniffer.standardCustom": "Drupal,DrupalPractice"
"phpCodeSniffer.standardCustom": "Drupal,DrupalPractice",
"search.exclude": {
"**/node_modules": true,
"**/vendor": true
},
"search.useIgnoreFiles": false,
"search.useParentIgnoreFiles": true
}

15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

- Drupal 11.x support
- ARM-architechture support Selenium-Chrome image.
- [joachim-n/drupal-project-contrib-development](https://github.com/joachim-n/drupal-core-development-project) for easier contrib development
- Simpler setup
- VSCode support

Expand All @@ -13,15 +12,18 @@
- Install [DDEV](https://ddev.readthedocs.io/en/latest/users/install/ddev-installation/)
- `ddev start`
- Replace `MODULE_NAME` on following with name of your contrib module (use admin_toolbar).
- `mkdir -p repos; cd repos`
- `git clone git@git.drupal.org:project/MODULE_NAME`
- `cd ..`
- `ddev composer install`

### Alternative way to include new modules.
### Adding new modules:

This is work-a-round until following issues are resolved:
- https://github.com/joachim-n/drupal-core-development-project/issues/14
- https://github.com/joachim-n/drupal-core-development-project/pull/28


- `ddev composer require drupal/MODULE_NAME`
- `ddev composer drupal-contrib:switch-clone MODULE_NAME`
- `cd web/modules/contrib; rm -rf MODULE_NAME`
- `git clone git@git.drupal.org:project/MODULE_NAME`

## PHPStan

Expand Down Expand Up @@ -64,6 +66,7 @@ ddev eslint web/modules/contrib/MODULE_NAME --fix

## Run PHPUnit tests

- `ddev phpunit web/modules/contrib/MODULE_NAME`
- `ddev phpunit --debug web/modules/contrib/MODULE_NAME`
- `ddev phpunit --group MODULE_NAME`

Expand Down
27 changes: 11 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@
"license": "GPL-2.0-or-later",
"homepage": "https://github.com/mstrelan/ddev-phpunit-demo",
"repositories": {
"admin_toolbar": {
"type": "path",
"url": "repos/admin_toolbar",
"options": {
"versions": {
"drupal/admin_toolbar": "3.5.0"
}
}
},
"0": {
"type": "composer",
"url": "https://packages.drupal.org/8"
Expand All @@ -23,11 +14,14 @@
"composer/installers": "^1.9",
"cweagans/composer-patches": "^1.7",
"drupal/admin_toolbar": "^3.5",
"drupal/core-composer-scaffold": "^11",
"drupal/core-recommended": "^11",
"drupal/core-composer-scaffold": "^11.x-dev",
"drupal/core-recommended": "^11.x-dev",
"drupal/devel": "^5.2",
"drupal/focal_point": "^2.1",
"drupal/openapi_jsonapi": "^3.0",
"drupal/paragraphs": "^1.18",
"drupal/term_merge": "^2.0@beta",
"drush/drush": "^13.0",
"joachim-n/drupal-project-contrib-development": "dev-main",
"weitzman/drupal-test-traits": "^2"
},
"conflict": {
Expand All @@ -39,12 +33,13 @@
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"cweagans/composer-patches": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"drupal/core-composer-scaffold": true,
"joachim-n/drupal-project-contrib-development": true,
"php-http/discovery": true,
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"joachim-n/drupal-project-contrib-development": true,
"cweagans/composer-patches": true
"tbachert/spi": true
}
},
"extra": {
Expand Down Expand Up @@ -90,7 +85,7 @@
},
"require-dev": {
"dmore/chrome-mink-driver": "^2.8",
"drupal/core-dev": "^11.0",
"drupal/core-dev": "^11.x-dev",
"phpspec/prophecy-phpunit": "^2.0"
}
}
Loading