Skip to content

Commit

Permalink
Merging drupal10-prep branch into 2.x (#634)
Browse files Browse the repository at this point in the history
* fix for phpcs issue (#616)

* fix for jquery once issue (#618)

* Bumped default_content version and changed the file format (#620)

* Support for Drupal 10 (#621)

* Support for Drupal 10

* workflow change

* removed deprecated module

* removed config files for seven and bartik (#623)

* Update node id for default content (#625)

* Upgrade changes for Drupal 9 and Drupal 10 (#624)

* Upgrade changes for Drupal 9 and Drupal 10

* Changes for twig syntax for twig 3 (#629)

* Radix 5 requires class attribute as array (#631)

* css changes to breadcrumbs, page tile, page task (#633)
  • Loading branch information
divya-intelli authored Jul 25, 2023
1 parent ee1b521 commit 16592e8
Show file tree
Hide file tree
Showing 276 changed files with 6,015 additions and 14,754 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ jobs:
# Should update the following as the minimum supported version from Drupal.org
- "9.4.x"
- "9.5.x"
# include:
# - php-version: "8.1"
# drupal-core: "10.0.x-dev"
# experimental: true
include:
- php-version: "8.1"
drupal-core: "10.0.x"
- php-version: "8.1"
drupal-core: "10.1.x"

steps:

Expand Down Expand Up @@ -72,9 +73,7 @@ jobs:
composer config --no-plugins allow-plugins.composer/package-versions-deprecated true
composer config --no-plugins allow-plugins.cweagans/composer-patches true
composer config --no-plugins allow-plugins.php-http/discovery true
composer require --dev drush/drush
composer config minimum-stability dev
composer require drupal/rules:3.0.0-alpha7
composer require wikimedia/composer-merge-plugin
composer config --json extra.merge-plugin.require '["profiles/contrib/apigee_devportal_kickstart/composer.json"]'
composer config platform.php ${{ matrix.php-version }}
Expand Down
12 changes: 6 additions & 6 deletions apigee_devportal_kickstart.info.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Apigee Developer Portal Kickstart
type: profile
description: 'A fast demo and starting point for Apigee Developer Portals.'
core_version_requirement: ^8 || ^9
core_version_requirement: ^9 || ^10

# Optional: Declare your installation profile as a distribution
# This will make the installer auto-select this installation profile.
Expand All @@ -10,7 +10,7 @@ core_version_requirement: ^8 || ^9
distribution:
name: Apigee Developer Portal Kickstart
install:
theme: seven
theme: claro

# Required modules
# Note that any dependencies of the modules listed here will be installed
Expand All @@ -20,8 +20,7 @@ install:
- history
- block
- breakpoint
- ckeditor
- color
- ckeditor5
- config
- comment
- contextual
Expand Down Expand Up @@ -69,10 +68,11 @@ install:
- forum
- paragraphs
- pathauto
- ctools

# List any themes that should be installed as part of the profile installation.
# Note that this will not set any theme as the default theme.
themes:
- apigee_kickstart
- bartik
- seven
- claro
- olivero
55 changes: 53 additions & 2 deletions apigee_devportal_kickstart.install
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ use Drupal\views\Views;
* Implements hook_install_tasks().
*/
function apigee_devportal_kickstart_install_tasks(&$install_state) {
// Initialize the seven theme and set it as active.
// Initialize the claro theme and set it as active.
// This ensures the installation theme is maintained across tasks.
$theme = \Drupal::service('theme.initialization')->initTheme('seven');
$theme = \Drupal::service('theme.initialization')->initTheme('claro');
\Drupal::theme()->setActiveTheme($theme);

// This needs to run before m10n tasks.
Expand Down Expand Up @@ -653,3 +653,54 @@ function apigee_devportal_kickstart_update_9001() {
}
}

/**
* Changing of admin theme from seven to claro.
* Uninstall of seven, bartik, hal, color.
* Installing ckeditor5, claro, olivero.
*/
function apigee_devportal_kickstart_update_9002() {
// Install admin theme and frontend theme.
\Drupal::service('theme_installer')->install(['claro']);
\Drupal::service('theme_installer')->install(['olivero']);
// Set the admin theme as claro.Theme seven is deprecated and removed from Drupal 10.
$config = \Drupal::service('config.factory')->getEditable('system.theme');
$config->set('admin', 'claro')->save();
// Uninstall deprecated theme and module.
\Drupal::service('theme_installer')->uninstall(['seven', 'bartik']);
\Drupal::service('module_installer')->uninstall(['hal', 'color']);
// Install ckeditor5 as it is recommened module.
\Drupal::service('module_installer')->install(['ckeditor5']);

// id with node_type is deprecated in Drupal 9 and removed in Drupal 10.
$configToImport = [
'pathauto.pattern.landing',
'pathauto.pattern.content',
];
foreach($configToImport as $configName) {
$config = \Drupal::configFactory()->getEditable($configName);
$visibility_array = $config->get('selection_criteria');
foreach($visibility_array as $key=>$val) {
if ($val['id'] === 'node_type') {
$visibility_array[$key]['id'] = 'entity_bundle:node';
}
}
$config->set('selection_criteria', $visibility_array)
->save();
}

// id with node_type is deprecated in Drupal 9 and removed in Drupal 10.
$configToImport = [
'block.block.apigee_kickstart_cta_article',
'block.block.apigee_kickstart_cta_developer_account',
];
foreach($configToImport as $configName) {
$config = \Drupal::configFactory()->getEditable($configName);
$visibility_array = $config->get('visibility');
$visibility_array['node_type']['id'] = 'entity_bundle:node';
$config->set('visibility', $visibility_array)
->save();
}

// Clear all caches.
drupal_flush_all_caches();
}
27 changes: 14 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,29 @@
"drupal/admin_toolbar": "^3.0",
"drupal/adminimal_admin_toolbar": "^1.9",
"drupal/apigee_api_catalog": "^3",
"drupal/apigee_edge": "^1.18 || ^2.0.0",
"drupal/better_exposed_filters": "^5.0",
"drupal/default_content": "^1.0@alpha",
"drupal/email_registration": "^1.0@RC",

"drupal/apigee_edge": "^2.0.0 || ^3.0.0",
"drupal/better_exposed_filters": "^5.0 || ^6.0",
"drupal/default_content": "^2.0@alpha",
"drupal/email_registration": "^1.2",
"drupal/fontawesome": "^2.12",
"drupal/paragraphs": "^1.6",
"drupal/pathauto": "^1.6",
"drupal/radix": "^4.11",
"drupal/components": "^2.1"
"drupal/radix": "^5.0",
"drupal/components": "^2.1 || ^3.0@beta",
"drupal/color": "^1.0",
"drupal/quickedit": "^1.0",
"drupal/rdf": "^2.1",
"drupal/hal": "1.0 || 2.0"
},
"require-dev": {
"drupal/core-dev": "^9.4",
"drush/drush": "^10.0",
"drupal/core-dev": "^9.4 || ^10.0",
"drush/drush": "^11.5",
"mglaman/drupal-check": "^1.3",
"phpmd/phpmd": "^2.8.2",
"phpmetrics/phpmetrics": "^2.5",
"phpstan/phpstan": "^1.5"
},
"conflict": {
"drupal/pathauto": "<1.6",
"drupal/apigee_m10n": "<1.7"
},
"config": {
"sort-packages": true
},
Expand All @@ -50,7 +51,7 @@
"Fix Validation issue for entity reference field on updating teams #470": "https://www.drupal.org/files/issues/2021-04-23/validate-reference-constraint-3210319-3.patch"
},
"drupal/default_content": {
"Do not import existing entities": "https://www.drupal.org/files/issues/2020-11-06/default_content-existing-entities-2698425-1-x.patch"
"Do not import existing entities": "https://www.drupal.org/files/issues/2022-07-29/default_content-fix-uuid-duplicate-entry-2698425.patch"
}
}
}
Expand Down
24 changes: 0 additions & 24 deletions config/install/block.block.bartik_account_menu.yml

This file was deleted.

22 changes: 0 additions & 22 deletions config/install/block.block.bartik_branding.yml

This file was deleted.

19 changes: 0 additions & 19 deletions config/install/block.block.bartik_breadcrumbs.yml

This file was deleted.

19 changes: 0 additions & 19 deletions config/install/block.block.bartik_content.yml

This file was deleted.

24 changes: 0 additions & 24 deletions config/install/block.block.bartik_footer.yml

This file was deleted.

19 changes: 0 additions & 19 deletions config/install/block.block.bartik_help.yml

This file was deleted.

17 changes: 0 additions & 17 deletions config/install/block.block.bartik_local_actions.yml

This file was deleted.

19 changes: 0 additions & 19 deletions config/install/block.block.bartik_local_tasks.yml

This file was deleted.

24 changes: 0 additions & 24 deletions config/install/block.block.bartik_main_menu.yml

This file was deleted.

Loading

0 comments on commit 16592e8

Please sign in to comment.