From aa12a4c5e404027dd8d3ca79d1f09c0e942ed78b Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Thu, 10 Jul 2025 14:31:29 +0200 Subject: [PATCH 1/6] cleanup and use minimum stability alpha --- .env.example | 27 ------------------------ README.md | 36 +++++++++++++++----------------- composer.json | 28 +++++++++++++++---------- docroot/.gitignore | 12 +++++++++++ docroot/modules/.gitignore | 1 + docroot/profiles/.gitignore | 1 + docroot/sites/.gitignore | 4 ++++ docroot/sites/default/.gitignore | 2 ++ docroot/themes/.gitignore | 1 + load.environment.php | 20 ------------------ recipes/.gitignore | 1 + 11 files changed, 56 insertions(+), 77 deletions(-) delete mode 100644 .env.example create mode 100644 docroot/.gitignore create mode 100644 docroot/modules/.gitignore create mode 100644 docroot/profiles/.gitignore create mode 100644 docroot/sites/.gitignore create mode 100644 docroot/sites/default/.gitignore create mode 100644 docroot/themes/.gitignore delete mode 100644 load.environment.php create mode 100644 recipes/.gitignore diff --git a/.env.example b/.env.example deleted file mode 100644 index 6058123..0000000 --- a/.env.example +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copy and rename this file to .env at root of this project. -# - -# A common use case is to supply database creds via the environment. Edit settings.php -# like so: -# -# $databases['default']['default'] = [ -# 'database' => getenv('MYSQL_DATABASE'), -# 'driver' => 'mysql', -# 'host' => getenv('MYSQL_HOSTNAME'), -# 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', -# 'password' => getenv('MYSQL_PASSWORD'), -# 'port' => getenv('MYSQL_PORT'), -# 'prefix' => '', -# 'username' => getenv('MYSQL_USER'), -# ]; -# -# Uncomment and populate as needed. -# MYSQL_DATABASE= -# MYSQL_HOSTNAME= -# MYSQL_PASSWORD= -# MYSQL_PORT= -# MYSQL_USER= - -# Another common use case is to set Drush's --uri via environment. -# DRUSH_OPTIONS_URI=http://example.com diff --git a/README.md b/README.md index 87b9ecd..8239e00 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This project template should provide a kickstart for managing your site dependen ## Usage See our [install documentation](https://thunder.github.io/developer-guide/setup.html#install-thunder) on how to use Thunder project. -We also have documentation on [extending](https://thunder.github.io/developer-guide/setup.html#extend) and [updating](https://thunder.github.io/developer-guide/setup.html#update) Thunder sites. +We also have documentation on [extending](https://thunder.github.io/developer-guide/setup.html#extend) and [updating](https://thunder.github.io/developer-guide/setup.html#update) Thunder sites. ## What does the template do? @@ -19,47 +19,45 @@ When installing the given `composer.json` some tasks are taken care of: * Profiles (packages of type `drupal-profile`) will be placed in `docroot/profiles/contrib/` * Downloads Drupal scaffold files such as `index.php`, or `.htaccess` * Creates `sites/default/files`-directory. -* Latest version of drush is installed locally for use at `bin/drush`. -* Latest version of DrupalConsole is installed locally for use at `bin/drupal`. ### File update -This project will attempt to keep all of your Thunder and drupal core files up-to-date; the -project [drupal-composer/drupal-scaffold](https://github.com/drupal-composer/drupal-scaffold) -is used to ensure that your scaffold files are updated every time drupal/core is -updated. If you customize any of the "scaffolding" files (commonly .htaccess), -you may need to merge conflicts if any of your modfied files are updated in a +This project will attempt to keep all of your Thunder and drupal core files up-to-date; the +project [drupal-composer/drupal-scaffold](https://github.com/drupal-composer/drupal-scaffold) +is used to ensure that your scaffold files are updated every time drupal/core is +updated. If you customize any of the "scaffolding" files (commonly .htaccess), +you may need to merge conflicts if any of your modfied files are updated in a new release of Drupal core. Follow the steps below to update your thunder files. 1. Run `composer update` -1. Run `git diff` to determine if any of the scaffolding files have changed. - Review the files for any changes and restore any customizations to +1. Run `git diff` to determine if any of the scaffolding files have changed. + Review the files for any changes and restore any customizations to `.htaccess` or `robots.txt`. 1. Commit everything all together in a single commit, so `docroot` will remain in sync with the `core` when checking out branches or running `git bisect`. -1. In the event that there are non-trivial conflicts in step 2, you may wish - to perform these steps on a branch, and use `git merge` to combine the - updated core files with your customized files. This facilitates the use - 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; - keeping all of your modifications at the beginning or end of the file is a +1. In the event that there are non-trivial conflicts in step 2, you may wish + to perform these steps on a branch, and use `git merge` to combine the + updated core files with your customized files. This facilitates the use + 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; + keeping all of your modifications at the beginning or end of the file is a good strategy to keep merges easy. ## FAQ ### Should I commit the contrib modules I download -Composer recommends **no**. They provide [argumentation against but also +Composer recommends **no**. They provide [argumentation against but also workrounds if a project decides to do it anyway](https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md). ### How can I apply patches to downloaded modules? -If you need to apply patches (depending on the project being modified, a pull -request is often a better solution), you can do so with the +If you need to apply patches (depending on the project being modified, a pull +request is often a better solution), you can do so with the [composer-patches](https://github.com/cweagans/composer-patches) plugin. -To add a patch to drupal module foobar insert the patches section in the extra +To add a patch to drupal module foobar insert the patches section in the extra section of composer.json: ```json "extra": { diff --git a/composer.json b/composer.json index 2844e66..52e28df 100644 --- a/composer.json +++ b/composer.json @@ -32,24 +32,20 @@ } ], "require": { - "thunder/thunder-distribution": "^7.0@STABLE", - "drupal/core-composer-scaffold": "^10.0||^11.0", - "composer/installers": "^1.2", - "drush/drush": "~12.0||~13.0", - "vlucas/phpdotenv": "^2.4", + "thunder/thunder-distribution": "^8.2@dev", + "drupal/core-composer-scaffold": "^11.0", + "composer/installers": "^2.2", + "drush/drush": "~13.0", "oomphinc/composer-installers-extender": "^2.0" }, "require-dev": { - "drupal/core-dev": "^10.0||^11.0" + "drupal/core-dev": "^11.0" }, "conflict": { "drupal/drupal": "*" }, - "minimum-stability": "dev", + "minimum-stability": "alpha", "prefer-stable": true, - "autoload": { - "files": ["load.environment.php"] - }, "extra": { "composer-exit-on-patch-failure": true, "installer-types": ["bower-asset", "npm-asset"], @@ -74,6 +70,16 @@ }, "config": { "sort-packages": true, - "process-timeout": 2000 + "process-timeout": 2000, + "allow-plugins": { + "composer/installers": true, + "cweagans/composer-patches": true, + "dealerdirect/phpcodesniffer-composer-installer": true, + "drupal/core-composer-scaffold": true, + "oomphinc/composer-installers-extender": true, + "php-http/discovery": true, + "phpstan/extension-installer": true, + "tbachert/spi": true + } } } diff --git a/docroot/.gitignore b/docroot/.gitignore new file mode 100644 index 0000000..a0daa4e --- /dev/null +++ b/docroot/.gitignore @@ -0,0 +1,12 @@ +/.csslintrc +/.eslintignore +/.eslintrc.json +/.ht.router.php +/.htaccess +/INSTALL.txt +/README.md +/autoload.php +/example.gitignore +/index.php +/robots.txt +/update.php \ No newline at end of file diff --git a/docroot/modules/.gitignore b/docroot/modules/.gitignore new file mode 100644 index 0000000..739a339 --- /dev/null +++ b/docroot/modules/.gitignore @@ -0,0 +1 @@ +/README.txt \ No newline at end of file diff --git a/docroot/profiles/.gitignore b/docroot/profiles/.gitignore new file mode 100644 index 0000000..739a339 --- /dev/null +++ b/docroot/profiles/.gitignore @@ -0,0 +1 @@ +/README.txt \ No newline at end of file diff --git a/docroot/sites/.gitignore b/docroot/sites/.gitignore new file mode 100644 index 0000000..0d11947 --- /dev/null +++ b/docroot/sites/.gitignore @@ -0,0 +1,4 @@ +/README.txt +/development.services.yml +/example.settings.local.php +/example.sites.php \ No newline at end of file diff --git a/docroot/sites/default/.gitignore b/docroot/sites/default/.gitignore new file mode 100644 index 0000000..96c4ff7 --- /dev/null +++ b/docroot/sites/default/.gitignore @@ -0,0 +1,2 @@ +/default.services.yml +/default.settings.php \ No newline at end of file diff --git a/docroot/themes/.gitignore b/docroot/themes/.gitignore new file mode 100644 index 0000000..739a339 --- /dev/null +++ b/docroot/themes/.gitignore @@ -0,0 +1 @@ +/README.txt \ No newline at end of file diff --git a/load.environment.php b/load.environment.php deleted file mode 100644 index 769343f..0000000 --- a/load.environment.php +++ /dev/null @@ -1,20 +0,0 @@ -load(); -} -catch (InvalidPathException $e) { - // Do nothing. Production environments rarely use .env files. -} diff --git a/recipes/.gitignore b/recipes/.gitignore new file mode 100644 index 0000000..739a339 --- /dev/null +++ b/recipes/.gitignore @@ -0,0 +1 @@ +/README.txt \ No newline at end of file From 990e5323fae8a968a9629b21343b8a39ac6eeb0a Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Thu, 10 Jul 2025 14:33:41 +0200 Subject: [PATCH 2/6] cleanup --- docroot/.gitignore | 12 ------------ docroot/modules/.gitignore | 1 - docroot/profiles/.gitignore | 1 - docroot/sites/.gitignore | 4 ---- docroot/sites/default/.gitignore | 2 -- docroot/themes/.gitignore | 1 - recipes/.gitignore | 1 - 7 files changed, 22 deletions(-) delete mode 100644 docroot/.gitignore delete mode 100644 docroot/modules/.gitignore delete mode 100644 docroot/profiles/.gitignore delete mode 100644 docroot/sites/.gitignore delete mode 100644 docroot/sites/default/.gitignore delete mode 100644 docroot/themes/.gitignore delete mode 100644 recipes/.gitignore diff --git a/docroot/.gitignore b/docroot/.gitignore deleted file mode 100644 index a0daa4e..0000000 --- a/docroot/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/.csslintrc -/.eslintignore -/.eslintrc.json -/.ht.router.php -/.htaccess -/INSTALL.txt -/README.md -/autoload.php -/example.gitignore -/index.php -/robots.txt -/update.php \ No newline at end of file diff --git a/docroot/modules/.gitignore b/docroot/modules/.gitignore deleted file mode 100644 index 739a339..0000000 --- a/docroot/modules/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/README.txt \ No newline at end of file diff --git a/docroot/profiles/.gitignore b/docroot/profiles/.gitignore deleted file mode 100644 index 739a339..0000000 --- a/docroot/profiles/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/README.txt \ No newline at end of file diff --git a/docroot/sites/.gitignore b/docroot/sites/.gitignore deleted file mode 100644 index 0d11947..0000000 --- a/docroot/sites/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/README.txt -/development.services.yml -/example.settings.local.php -/example.sites.php \ No newline at end of file diff --git a/docroot/sites/default/.gitignore b/docroot/sites/default/.gitignore deleted file mode 100644 index 96c4ff7..0000000 --- a/docroot/sites/default/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/default.services.yml -/default.settings.php \ No newline at end of file diff --git a/docroot/themes/.gitignore b/docroot/themes/.gitignore deleted file mode 100644 index 739a339..0000000 --- a/docroot/themes/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/README.txt \ No newline at end of file diff --git a/recipes/.gitignore b/recipes/.gitignore deleted file mode 100644 index 739a339..0000000 --- a/recipes/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/README.txt \ No newline at end of file From 6a4c7f651d98185cd12e1f51da31a1c269fea0ae Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Thu, 10 Jul 2025 16:04:53 +0200 Subject: [PATCH 3/6] dev for testing --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 52e28df..691c6e1 100644 --- a/composer.json +++ b/composer.json @@ -34,6 +34,7 @@ "require": { "thunder/thunder-distribution": "^8.2@dev", "drupal/core-composer-scaffold": "^11.0", + "drupal/media_entity_pinterest": "2.x-dev", "composer/installers": "^2.2", "drush/drush": "~13.0", "oomphinc/composer-installers-extender": "^2.0" From 498986561291b364f6ac3c3cd3c22fbff293aec1 Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Thu, 10 Jul 2025 16:12:27 +0200 Subject: [PATCH 4/6] @dev --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 691c6e1..50daa79 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "require": { "thunder/thunder-distribution": "^8.2@dev", "drupal/core-composer-scaffold": "^11.0", - "drupal/media_entity_pinterest": "2.x-dev", + "drupal/media_entity_pinterest": "2.x-dev@dev", "composer/installers": "^2.2", "drush/drush": "~13.0", "oomphinc/composer-installers-extender": "^2.0" From c8683debb91265418e58ae002944209d425ec5bd Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Thu, 10 Jul 2025 16:44:26 +0200 Subject: [PATCH 5/6] cleanup --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 50daa79..52e28df 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,6 @@ "require": { "thunder/thunder-distribution": "^8.2@dev", "drupal/core-composer-scaffold": "^11.0", - "drupal/media_entity_pinterest": "2.x-dev@dev", "composer/installers": "^2.2", "drush/drush": "~13.0", "oomphinc/composer-installers-extender": "^2.0" From e367df9dd4fb51c6b236c892d7faed020782a4d3 Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Wed, 16 Jul 2025 13:24:03 +0200 Subject: [PATCH 6/6] Update composer.json --- composer.json | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 52e28df..59dc627 100644 --- a/composer.json +++ b/composer.json @@ -70,16 +70,6 @@ }, "config": { "sort-packages": true, - "process-timeout": 2000, - "allow-plugins": { - "composer/installers": true, - "cweagans/composer-patches": true, - "dealerdirect/phpcodesniffer-composer-installer": true, - "drupal/core-composer-scaffold": true, - "oomphinc/composer-installers-extender": true, - "php-http/discovery": true, - "phpstan/extension-installer": true, - "tbachert/spi": true - } + "process-timeout": 2000 } }