From 413beeb1f57ee9c605972552db996fe5a551112e Mon Sep 17 00:00:00 2001 From: byrond Date: Wed, 3 Jun 2020 16:40:14 -0400 Subject: [PATCH 01/24] use version 3 of Devel, which supports D9 --- targets/drupal.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/drupal.xml b/targets/drupal.xml index ec15adfa..2daf38ef 100644 --- a/targets/drupal.xml +++ b/targets/drupal.xml @@ -260,7 +260,7 @@ Or, you can specify the export file directly: - + From ff49d21204c0cc768770e4a9af815ab8a97a4ba2 Mon Sep 17 00:00:00 2001 From: byrond Date: Wed, 3 Jun 2020 16:44:30 -0400 Subject: [PATCH 02/24] make the_build_utility compatible with d9 --- .../modules/the_build_utility/the_build_utility.info.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/defaults/standard/modules/the_build_utility/the_build_utility.info.yml b/defaults/standard/modules/the_build_utility/the_build_utility.info.yml index 91cd95d4..d63104a1 100644 --- a/defaults/standard/modules/the_build_utility/the_build_utility.info.yml +++ b/defaults/standard/modules/the_build_utility/the_build_utility.info.yml @@ -2,6 +2,7 @@ name: the-build utility module description: 'Base settings from palantirnet/the-build.' type: module core: 8.x +core_version_requirement: ^8 || ^9 hide: true dependencies: From 0c8dc7f364a1b122d383173b85659c00f19afccb Mon Sep 17 00:00:00 2001 From: byrond Date: Wed, 3 Jun 2020 17:13:14 -0400 Subject: [PATCH 03/24] update deprecated function call in the_build_utility.install --- .../standard/modules/the_build_utility/the_build_utility.install | 1 + 1 file changed, 1 insertion(+) diff --git a/defaults/standard/modules/the_build_utility/the_build_utility.install b/defaults/standard/modules/the_build_utility/the_build_utility.install index 72cac6b7..bb7ab59f 100644 --- a/defaults/standard/modules/the_build_utility/the_build_utility.install +++ b/defaults/standard/modules/the_build_utility/the_build_utility.install @@ -61,6 +61,7 @@ function the_build_utility_install() { // Begin Comment module. // Remove the comment fields. + $fields = \Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['type' => 'comment']); $fields = entity_load_multiple_by_properties('field_storage_config', ['type' => 'comment']); foreach ($fields as $field) { $field->delete(); From 7ea0cf3a57a206b614114d45a3025950d186416e Mon Sep 17 00:00:00 2001 From: byrond Date: Wed, 3 Jun 2020 17:14:30 -0400 Subject: [PATCH 04/24] add shortcut as a dependency --- .../modules/the_build_utility/the_build_utility.info.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/defaults/standard/modules/the_build_utility/the_build_utility.info.yml b/defaults/standard/modules/the_build_utility/the_build_utility.info.yml index d63104a1..c7c5ae2c 100644 --- a/defaults/standard/modules/the_build_utility/the_build_utility.info.yml +++ b/defaults/standard/modules/the_build_utility/the_build_utility.info.yml @@ -6,6 +6,8 @@ core_version_requirement: ^8 || ^9 hide: true dependencies: + # Core modules + - drupal:shortcut # Contrib modules - config_split:config_split - devel:devel From b6d73c90b735a221a7f750d738f1db6c99a010cd Mon Sep 17 00:00:00 2001 From: byrond Date: Wed, 3 Jun 2020 17:16:47 -0400 Subject: [PATCH 05/24] switch to minimal profile for first install --- targets/drupal.xml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/targets/drupal.xml b/targets/drupal.xml index 2daf38ef..6bdeb853 100644 --- a/targets/drupal.xml +++ b/targets/drupal.xml @@ -269,30 +269,13 @@ Or, you can specify the export file directly: - standard + minimal the_build_utility - - core.extension - module.standard - - - - core.extension - module.config_installer - 1000 - - - - core.extension - profile - config_installer - - the_build_utility From fba8470ca1edc0c3ecbb9b28415052875ad450df Mon Sep 17 00:00:00 2001 From: byrond Date: Wed, 3 Jun 2020 17:56:52 -0400 Subject: [PATCH 06/24] remove the old line :facepalm: --- .../standard/modules/the_build_utility/the_build_utility.install | 1 - 1 file changed, 1 deletion(-) diff --git a/defaults/standard/modules/the_build_utility/the_build_utility.install b/defaults/standard/modules/the_build_utility/the_build_utility.install index bb7ab59f..1a38869d 100644 --- a/defaults/standard/modules/the_build_utility/the_build_utility.install +++ b/defaults/standard/modules/the_build_utility/the_build_utility.install @@ -62,7 +62,6 @@ function the_build_utility_install() { // Begin Comment module. // Remove the comment fields. $fields = \Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['type' => 'comment']); - $fields = entity_load_multiple_by_properties('field_storage_config', ['type' => 'comment']); foreach ($fields as $field) { $field->delete(); } From ea9b44b3dac2580e34e819b8e4219517c8e3e0f7 Mon Sep 17 00:00:00 2001 From: byrond Date: Thu, 4 Jun 2020 08:46:45 -0400 Subject: [PATCH 07/24] use field_storage_config in the_build_utility.install --- .../modules/the_build_utility/the_build_utility.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/standard/modules/the_build_utility/the_build_utility.install b/defaults/standard/modules/the_build_utility/the_build_utility.install index 1a38869d..8b1f25d1 100644 --- a/defaults/standard/modules/the_build_utility/the_build_utility.install +++ b/defaults/standard/modules/the_build_utility/the_build_utility.install @@ -61,7 +61,7 @@ function the_build_utility_install() { // Begin Comment module. // Remove the comment fields. - $fields = \Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['type' => 'comment']); + $fields = \Drupal::entityTypeManager()->getStorage('field_storage_config')->loadByProperties(['type' => 'comment']); foreach ($fields as $field) { $field->delete(); } From 095860ef9c0f890e795f0d96057314471f2acd65 Mon Sep 17 00:00:00 2001 From: byrond Date: Thu, 4 Jun 2020 09:08:23 -0400 Subject: [PATCH 08/24] change first install profile to "newstandard" (sans hook_install) --- targets/drupal.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/drupal.xml b/targets/drupal.xml index 6bdeb853..fc2b0856 100644 --- a/targets/drupal.xml +++ b/targets/drupal.xml @@ -269,7 +269,7 @@ Or, you can specify the export file directly: - minimal + newstandard From 83d2921669a2f636b014671836a6089381a3f57f Mon Sep 17 00:00:00 2001 From: byrond Date: Thu, 4 Jun 2020 09:09:04 -0400 Subject: [PATCH 09/24] remove core module dependency --- .../modules/the_build_utility/the_build_utility.info.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/defaults/standard/modules/the_build_utility/the_build_utility.info.yml b/defaults/standard/modules/the_build_utility/the_build_utility.info.yml index c7c5ae2c..d63104a1 100644 --- a/defaults/standard/modules/the_build_utility/the_build_utility.info.yml +++ b/defaults/standard/modules/the_build_utility/the_build_utility.info.yml @@ -6,8 +6,6 @@ core_version_requirement: ^8 || ^9 hide: true dependencies: - # Core modules - - drupal:shortcut # Contrib modules - config_split:config_split - devel:devel From dce4e3418b1f05389e10b5cfeeec651e009e9d23 Mon Sep 17 00:00:00 2001 From: byrond Date: Thu, 4 Jun 2020 09:10:56 -0400 Subject: [PATCH 10/24] use existing-config option instead of config_installer --- defaults/install/build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/install/build.xml b/defaults/install/build.xml index 6f2286bb..563e8149 100644 --- a/defaults/install/build.xml +++ b/defaults/install/build.xml @@ -72,7 +72,7 @@ - ${drupal.site.profile} + From 62eecfd4f5d429c9a5cd63a46cb89fa3e9385ff0 Mon Sep 17 00:00:00 2001 From: byrond Date: Thu, 4 Jun 2020 09:31:48 -0400 Subject: [PATCH 11/24] fix user registration setting value during the_build_utility install --- .../modules/the_build_utility/the_build_utility.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/standard/modules/the_build_utility/the_build_utility.install b/defaults/standard/modules/the_build_utility/the_build_utility.install index 8b1f25d1..47438834 100644 --- a/defaults/standard/modules/the_build_utility/the_build_utility.install +++ b/defaults/standard/modules/the_build_utility/the_build_utility.install @@ -19,7 +19,7 @@ use Drupal\shortcut\Entity\Shortcut; function the_build_utility_install() { // Allow visitor account creation with administrative approval. $user_settings = \Drupal::configFactory()->getEditable('user.settings'); - $user_settings->set('register', USER_REGISTER_ADMINISTRATORS_ONLY)->save(TRUE); + $user_settings->set('register', 'admin_only')->save(TRUE); // Populate the default shortcut set. $shortcut = Shortcut::create([ From 2a891c37e4a417b8b6efa81c97264c5051975aba Mon Sep 17 00:00:00 2001 From: byrond Date: Thu, 4 Jun 2020 09:44:48 -0400 Subject: [PATCH 12/24] add hook_install from standard profile --- .../the_build_utility.install | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/defaults/standard/modules/the_build_utility/the_build_utility.install b/defaults/standard/modules/the_build_utility/the_build_utility.install index 47438834..dae2f1b2 100644 --- a/defaults/standard/modules/the_build_utility/the_build_utility.install +++ b/defaults/standard/modules/the_build_utility/the_build_utility.install @@ -17,6 +17,36 @@ use Drupal\shortcut\Entity\Shortcut; * @see system_install() */ function the_build_utility_install() { + // hook_install() from standard profile. + + // Assign user 1 the "administrator" role. + $user = User::load(1); + $user->roles[] = 'administrator'; + $user->save(); + + // We install some menu links, so we have to rebuild the router, to ensure the + // menu links are valid. + \Drupal::service('router.builder')->rebuildIfNeeded(); + + // Populate the default shortcut set. + $shortcut = Shortcut::create([ + 'shortcut_set' => 'default', + 'title' => t('Add content'), + 'weight' => -20, + 'link' => ['uri' => 'internal:/node/add'], + ]); + $shortcut->save(); + + $shortcut = Shortcut::create([ + 'shortcut_set' => 'default', + 'title' => t('All content'), + 'weight' => -19, + 'link' => ['uri' => 'internal:/admin/content'], + ]); + $shortcut->save(); + + // Customizations from this module. + // Allow visitor account creation with administrative approval. $user_settings = \Drupal::configFactory()->getEditable('user.settings'); $user_settings->set('register', 'admin_only')->save(TRUE); From d08d751b7f2c15804f64580a97ca19533a4901ed Mon Sep 17 00:00:00 2001 From: byrond Date: Thu, 4 Jun 2020 13:58:03 -0400 Subject: [PATCH 13/24] update config for minimal profile after first install --- targets/drupal.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/targets/drupal.xml b/targets/drupal.xml index fc2b0856..269a36d0 100644 --- a/targets/drupal.xml +++ b/targets/drupal.xml @@ -276,6 +276,23 @@ Or, you can specify the export file directly: the_build_utility + + core.extension + module.standard + + + + core.extension + module.minimal + 1000 + + + + core.extension + profile + minimal + + the_build_utility From f93618b816804c403d75cb83061f650020fdfda8 Mon Sep 17 00:00:00 2001 From: byrond Date: Thu, 4 Jun 2020 13:58:31 -0400 Subject: [PATCH 14/24] switch back to standard profile for first install --- targets/drupal.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/drupal.xml b/targets/drupal.xml index 269a36d0..1926fd59 100644 --- a/targets/drupal.xml +++ b/targets/drupal.xml @@ -269,7 +269,7 @@ Or, you can specify the export file directly: - newstandard + standard From de858601714b4ab98097355020ecbcf0b18476da Mon Sep 17 00:00:00 2001 From: byrond Date: Fri, 5 Jun 2020 11:30:56 -0400 Subject: [PATCH 15/24] update change log from #147 --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4674624..5ae2b526 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## UNRELEASED + +### Changed + +* `phing install` now uses `drush site-install --existing-config` instead of the [config_installer profile](https://www.drupal.org/project/config_installer) (#145) + +### Deprecated + +* The `drupal.site.profile` property is no longer used by the default `install` target in `build.xml`. It will be removed in the 3.0 release. (#145) + ## 2.3.1 ### Changed From 17e31599a868ec308aa29f8d4b769c884e798aaf Mon Sep 17 00:00:00 2001 From: byrond Date: Fri, 5 Jun 2020 11:32:32 -0400 Subject: [PATCH 16/24] add deprecation comment to defaults.yml See #147 --- defaults.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/defaults.yml b/defaults.yml index b99208d8..9a0fd670 100644 --- a/defaults.yml +++ b/defaults.yml @@ -95,6 +95,11 @@ drupal: hash_salt: temporary # Drupal install profile to use for the drupal-install target. + # + # DEPRECATED - to be removed in 3.0 + # This property was used in the 'install' target in the default build.xml, until + # we switched from the config_installer profile to using + # 'drush site-install --existing-config`. profile: config_installer # Drupal admin username, if you feel inclined to change it. From 48c61779ec943270d1cd9aa5cd1d6d7ca95ad9b2 Mon Sep 17 00:00:00 2001 From: byrond Date: Fri, 5 Jun 2020 11:34:35 -0400 Subject: [PATCH 17/24] update shortcut weights --- .../modules/the_build_utility/the_build_utility.install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/defaults/standard/modules/the_build_utility/the_build_utility.install b/defaults/standard/modules/the_build_utility/the_build_utility.install index dae2f1b2..c5865b68 100644 --- a/defaults/standard/modules/the_build_utility/the_build_utility.install +++ b/defaults/standard/modules/the_build_utility/the_build_utility.install @@ -55,7 +55,7 @@ function the_build_utility_install() { $shortcut = Shortcut::create([ 'shortcut_set' => 'default', 'title' => t('Manage Taxonomy'), - 'weight' => -20, + 'weight' => -18, 'link' => ['uri' => 'internal:/admin/structure/taxonomy'], ]); $shortcut->save(); @@ -63,7 +63,7 @@ function the_build_utility_install() { $shortcut = Shortcut::create([ 'shortcut_set' => 'default', 'title' => t('Manage Menus'), - 'weight' => -19, + 'weight' => -17, 'link' => ['uri' => 'internal:/admin/structure/menu'], ]); $shortcut->save(); @@ -71,7 +71,7 @@ function the_build_utility_install() { $shortcut = Shortcut::create([ 'shortcut_set' => 'default', 'title' => t('Status Report'), - 'weight' => -18, + 'weight' => -16, 'link' => ['uri' => 'internal:/admin/reports/status'], ]); $shortcut->save(); From 2b3d081efd7a994cfbd4f7b617b42c3511a1d7cb Mon Sep 17 00:00:00 2001 From: byrond Date: Fri, 5 Jun 2020 11:36:41 -0400 Subject: [PATCH 18/24] update post first installation message see #147 --- targets/drupal.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/targets/drupal.xml b/targets/drupal.xml index 1926fd59..9dcc7a71 100644 --- a/targets/drupal.xml +++ b/targets/drupal.xml @@ -302,7 +302,10 @@ Or, you can specify the export file directly: - Drupal has been installed with the install profile "standard". Future installs will be run using config_installer. + Drupal has been installed with the install profile "standard". If you'd prefer a different profile, run the installer yourself: + drush site-install minimal + + Future installs via 'phing install' will be run using 'drush site:install --existing-config'. Your config has been exported to ${drupal.root}/${drupal.site.config_sync_directory} From 9800a92f1e59a5b1e23e8c7c313b84abf86d9eae Mon Sep 17 00:00:00 2001 From: byrond Date: Fri, 5 Jun 2020 11:43:08 -0400 Subject: [PATCH 19/24] update default build.xml to enable/uninstall the_build_utility during phing install --- defaults/install/build.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/defaults/install/build.xml b/defaults/install/build.xml index 563e8149..ff0300da 100644 --- a/defaults/install/build.xml +++ b/defaults/install/build.xml @@ -74,6 +74,14 @@ + + + the_build_utility + + + + the_build_utility + From 744c327e9364e12d09c15d880e64a8756e06fbed Mon Sep 17 00:00:00 2001 From: byrond Date: Fri, 5 Jun 2020 11:59:42 -0400 Subject: [PATCH 20/24] use the drupal9 branch of the skeleton for circle tests (change this to "develop" before merging) --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 53e64ab9..b2b4f738 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,7 +73,7 @@ jobs: # Create a new project using the drupal-skeleton project - run: name: Create a new Drupal project - command: composer create-project palantirnet/drupal-skeleton example dev-drupal8 --no-interaction + command: composer create-project palantirnet/drupal-skeleton example dev-drupal9 --no-interaction working_directory: ~/ # Use this copy of the-build From b2c450c42eecfe6604a43ad8c8ffec14be7f84a3 Mon Sep 17 00:00:00 2001 From: byrond Date: Fri, 5 Jun 2020 12:05:30 -0400 Subject: [PATCH 21/24] use php 7.3 on circle --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b2b4f738..ac4de6b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: build: working_directory: ~/example docker: - - image: circleci/php:7.2-node-browsers + - image: circleci/php:7.3-node-browsers - image: circleci/mysql:5.7-ram command: --max_allowed_packet=16M environment: From 2120a710408003667cf2c8ebef238b508272f785 Mon Sep 17 00:00:00 2001 From: byrond Date: Fri, 5 Jun 2020 13:38:18 -0400 Subject: [PATCH 22/24] don't reinstall the_build_utility on phing install --- defaults/install/build.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/defaults/install/build.xml b/defaults/install/build.xml index ff0300da..563e8149 100644 --- a/defaults/install/build.xml +++ b/defaults/install/build.xml @@ -74,14 +74,6 @@