From af2fed71d8127e192cf622aa10599f15c54c4edb Mon Sep 17 00:00:00 2001 From: Kalle Vuorjoki Date: Fri, 16 Aug 2024 16:56:00 +0300 Subject: [PATCH 1/3] Contrib development --- README.md | 15 ++++---- composer.json | 10 ------ composer.lock | 97 +++++++++++++++++++++++++-------------------------- 3 files changed, 56 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index 4083c97..20faffe 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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` diff --git a/composer.json b/composer.json index 8e4285e..35a8dd0 100644 --- a/composer.json +++ b/composer.json @@ -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" @@ -27,7 +18,6 @@ "drupal/core-recommended": "^11", "drupal/devel": "^5.2", "drush/drush": "^13.0", - "joachim-n/drupal-project-contrib-development": "dev-main", "weitzman/drupal-test-traits": "^2" }, "conflict": { diff --git a/composer.lock b/composer.lock index c3e83a8..4e37529 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8de7d54be18dcf0574a150f8f5421af9", + "content-hash": "eeeda4b20815a8857d0d2477a03ed496", "packages": [ { "name": "asm89/stack-cors", @@ -1422,12 +1422,35 @@ { "name": "drupal/admin_toolbar", "version": "3.5.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/admin_toolbar.git", + "reference": "3.5.0" + }, "dist": { - "type": "path", - "url": "repos/admin_toolbar", - "reference": "30ca29c79aa2c9ae84bb315b30ff8ac133e77bb7" + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/admin_toolbar-3.5.0.zip", + "reference": "3.5.0", + "shasum": "099e8d4dc98e1d551b4f9cffdc39599eb8ad04e8" + }, + "require": { + "drupal/core": "^9.5 || ^10 || ^11" + }, + "require-dev": { + "drupal/admin_toolbar_tools": "*" }, "type": "drupal-module", + "extra": { + "drupal": { + "version": "3.5.0", + "datestamp": "1722639094", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", "license": [ "GPL-2.0-or-later" ], @@ -1444,14 +1467,30 @@ }, { "name": "Adrian Cid Almaguer (adriancid)", - "email": "adriancid@gmail.com", "homepage": "https://www.drupal.org/u/adriancid", + "email": "adriancid@gmail.com", "role": "Maintainer" }, { "name": "Mohamed Anis Taktak (matio89)", "homepage": "https://www.drupal.org/u/matio89", "role": "Maintainer" + }, + { + "name": "japerry", + "homepage": "https://www.drupal.org/user/45640" + }, + { + "name": "matio89", + "homepage": "https://www.drupal.org/user/2320090" + }, + { + "name": "Musa.thomas", + "homepage": "https://www.drupal.org/user/1213824" + }, + { + "name": "romainj", + "homepage": "https://www.drupal.org/user/370706" } ], "description": "Provides a drop-down menu interface to the core Drupal Toolbar.", @@ -1461,11 +1500,8 @@ "Toolbar" ], "support": { - "issues": "https://www.drupal.org/project/issues/admin_toolbar", - "source": "https://git.drupalcode.org/project/admin_toolbar" - }, - "transport-options": { - "relative": true + "source": "https://git.drupalcode.org/project/admin_toolbar", + "issues": "https://www.drupal.org/project/issues/admin_toolbar" } }, { @@ -2671,43 +2707,6 @@ }, "time": "2024-06-28T20:10:30+00:00" }, - { - "name": "joachim-n/drupal-project-contrib-development", - "version": "dev-main", - "source": { - "type": "git", - "url": "https://github.com/joachim-n/drupal-project-contrib-development.git", - "reference": "ce67d8b6bfe63a9612e96f8d5fc4c273fbab148f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/joachim-n/drupal-project-contrib-development/zipball/ce67d8b6bfe63a9612e96f8d5fc4c273fbab148f", - "reference": "ce67d8b6bfe63a9612e96f8d5fc4c273fbab148f", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^2.0" - }, - "require-dev": { - "symfony/var-dumper": "^6 || ^7.0" - }, - "default-branch": true, - "type": "composer-plugin", - "extra": { - "class": "DrupalContribDevelopment\\Plugin" - }, - "autoload": { - "psr-4": { - "DrupalContribDevelopment\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "support": { - "issues": "https://github.com/joachim-n/drupal-project-contrib-development/issues", - "source": "https://github.com/joachim-n/drupal-project-contrib-development/tree/main" - }, - "time": "2024-05-01T13:42:09+00:00" - }, { "name": "laravel/prompts", "version": "v0.1.24", @@ -12193,9 +12192,7 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "joachim-n/drupal-project-contrib-development": 20 - }, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": [], From 613a11418315397ecbf0463f9f504b36941e3dd1 Mon Sep 17 00:00:00 2001 From: Kalle Vuorjoki Date: Mon, 19 Aug 2024 09:55:45 +0300 Subject: [PATCH 2/3] Inform required DDEV version --- .ddev/config.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.ddev/config.yaml b/.ddev/config.yaml index cc593b0..70ca61c 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -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: From 66365058e49c2e9c58f81cb4ba403d00943cf349 Mon Sep 17 00:00:00 2001 From: Kalle Vuorjoki Date: Mon, 19 Aug 2024 14:26:27 +0300 Subject: [PATCH 3/3] Use MySQL instead of sqlite on PHPUnit tests --- phpunit.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpunit.xml b/phpunit.xml index e20dcbc..f9376ad 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -35,7 +35,8 @@ - + +