Skip to content

Commit 553a200

Browse files
author
David Ferlay
authored
Merge pull request #244 from skilld-labs/remove_config_installer
Remove deprecated config_installer
2 parents e48ea76 + a898239 commit 553a200

File tree

9 files changed

+105
-56
lines changed

9 files changed

+105
-56
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ TESTER_NAME = tester
8383
si:
8484
@echo "Installing from: $(PROJECT_INSTALL)"
8585
ifeq ($(PROJECT_INSTALL), config)
86-
$(call php, drush si config_installer --db-url=$(DB_URL) --account-name=$(ADMIN_NAME) --account-mail=$(ADMIN_MAIL) --account-pass=$(ADMIN_PW) -y config_installer_sync_configure_form.sync_directory=../config/sync)
86+
$(call php, drush si --existing-config --db-url=$(DB_URL) --account-name=$(ADMIN_NAME) --account-mail=$(ADMIN_MAIL) --account-pass=$(ADMIN_PW) -y)
8787
# install_import_translations() overwrites config translations so we need to reimport.
8888
$(call php, drush cim -y)
8989
else
@@ -93,7 +93,7 @@ ifneq ($(strip $(MODULES)),)
9393
$(call php, drush en $(MODULES) -y)
9494
$(call php, drush pmu $(MODULES) -y)
9595
$(call php, drush user:password "$(TESTER_NAME)" "$(TESTER_PW)")
96-
96+
9797
endif
9898

9999
## Import online & local translations

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"drupal-composer/drupal-scaffold": "^2.5",
2222
"drupal/better_normalizers": "^1.0@beta",
2323
"drupal/block_content_permissions": "^1.8",
24-
"drupal/config_installer": "^1",
2524
"drupal/core-recommended": "^8.8.0",
2625
"drupal/default_content": "^1",
2726
"drupal/file_entity": "^2",
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"_links": {
3+
"self": {
4+
"href": "http:\/\/default\/admin\/config\/user-interface\/shortcut\/link\/1?_format=hal_json"
5+
},
6+
"type": {
7+
"href": "http:\/\/drupal.org\/rest\/type\/shortcut\/default"
8+
}
9+
},
10+
"id": [
11+
{
12+
"value": 1
13+
}
14+
],
15+
"uuid": [
16+
{
17+
"value": "ebb7c60a-b052-41ba-9a82-0ed73475a33b"
18+
}
19+
],
20+
"langcode": [
21+
{
22+
"value": "en",
23+
"lang": "en"
24+
}
25+
],
26+
"shortcut_set": [
27+
{
28+
"target_id": "default"
29+
}
30+
],
31+
"title": [
32+
{
33+
"value": "Add content",
34+
"lang": "en"
35+
}
36+
],
37+
"weight": [
38+
{
39+
"value": -20
40+
}
41+
],
42+
"link": [
43+
{
44+
"uri": "internal:\/node\/add",
45+
"title": null,
46+
"options": []
47+
}
48+
],
49+
"default_langcode": [
50+
{
51+
"value": true,
52+
"lang": "en"
53+
}
54+
]
55+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
field_prefix: ''
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use_admin_theme: true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
favicon:
2+
mimetype: image/vnd.microsoft.icon
3+
path: ''
4+
url: ''
5+
use_default: true
6+
features:
7+
comment_user_picture: true
8+
comment_user_verification: true
9+
favicon: true
10+
node_user_picture: false
11+
logo:
12+
path: ''
13+
url: ''
14+
use_default: true
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
langcode: en
2+
status: true
3+
dependencies: { }
4+
id: authenticated
5+
label: 'Authenticated user'
6+
weight: 1
7+
is_admin: false
8+
permissions:
9+
- 'access content'
10+
- 'access shortcuts'
11+
- 'view media'

web/profiles/sdd/sdd.install

Lines changed: 0 additions & 53 deletions
This file was deleted.

web/profiles/sdd/sdd.profile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,38 @@
77
* Copied from https://www.drupal.org/project/multilingual_demo project.
88
*/
99

10+
use Drupal\user\Entity\User;
11+
use Drupal\user\RoleInterface;
1012
use Symfony\Component\Yaml\Parser;
1113

1214
/**
1315
* Implements hook_install_tasks().
16+
*
17+
* @see https://www.drupal.org/project/drupal/issues/2982052
1418
*/
1519
function sdd_install_tasks(&$install_state) {
1620
return [
21+
'sdd_install_setup' => [
22+
'display_name' => t('Install setup'),
23+
'type' => 'normal',
24+
],
1725
'sdd_install_import_language_config' => [],
1826
];
1927
}
2028

29+
/**
30+
* Performs actions to set up the site for this profile.
31+
*/
32+
function sdd_install_setup() {
33+
// Assign user 1 the "sysadmin" role.
34+
$user = User::load(1);
35+
$user->roles[] = 'sysadmin';
36+
$user->save();
37+
38+
// Allow authenticated users to use shortcuts.
39+
user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, ['access shortcuts']);
40+
}
41+
2142
/**
2243
* Implements hook_install_tasks_alter().
2344
*/

0 commit comments

Comments
 (0)