Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drupal Environment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Composer
plugin
Drupal Environment
Commits
40689f66
Commit
40689f66
authored
6 months ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Update patch for config_devel
parent
e90fbcc9
No related branches found
Branches containing commit
Tags
v1.1.0
Tags containing commit
1 merge request
!314
Merging develop into main
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
patches/d10-3.json
+1
-1
1 addition, 1 deletion
patches/d10-3.json
patches/d10.json
+1
-1
1 addition, 1 deletion
patches/d10.json
patches/d10/3227881.diff
+20
-16
20 additions, 16 deletions
patches/d10/3227881.diff
patches/d11.json
+1
-1
1 addition, 1 deletion
patches/d11.json
with
23 additions
and
19 deletions
patches/d10-3.json
+
1
−
1
View file @
40689f66
...
...
@@ -36,7 +36,7 @@
},
"drupal/config_devel"
:
{
"#3219083 Export raw data"
:
"https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3219083.diff"
,
"#3227881 Support config_rewrite"
:
"https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3227881.diff"
"#3227881 Support config_rewrite"
:
"https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3227881.diff
?v=2
"
},
"drupal/config_sync"
:
{
"#3176955 Drupal 9 test compatibility"
:
"https://www.drupal.org/files/issues/2021-03-19/config_sync-config-sync-test-core-3176955-4.patch"
...
...
This diff is collapsed.
Click to expand it.
patches/d10.json
+
1
−
1
View file @
40689f66
...
...
@@ -32,7 +32,7 @@
},
"drupal/config_devel"
:
{
"#3219083 Export raw data"
:
"https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3219083.diff"
,
"#3227881 Support config_rewrite"
:
"https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3227881.diff"
"#3227881 Support config_rewrite"
:
"https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3227881.diff
?v=2
"
},
"drupal/config_sync"
:
{
"#3176955 Drupal 9 test compatibility"
:
"https://www.drupal.org/files/issues/2021-03-19/config_sync-config-sync-test-core-3176955-4.patch"
...
...
This diff is collapsed.
Click to expand it.
patches/d10/3227881.diff
+
20
−
16
View file @
40689f66
diff --git a/src/Commands/ConfigDevelCommands.php b/src/Commands/ConfigDevelCommands.php
index a
99098a25d1b4e352a200243f8d9b3ab9889f92f..e282c77dfca9f251b412d0e359da0e0607f91ebf
100644
index a
d76144d17fa4c77d6df9318243220b0c258cfe4..9bb354fef0982f9658fb430e5f25d842c6811f87
100644
--- a/src/Commands/ConfigDevelCommands.php
+++ b/src/Commands/ConfigDevelCommands.php
@@ -4,6 +4,7 @@
namespace Drupal\config_devel\Commands;
...
...
@@ -25,34 +25,38 @@ index a99098a25d1b4e352a200243f8d9b3ab9889f92f..e282c77dfca9f251b412d0e359da0e06
}
+
+ // If we have any rewrite configuration, export that as well.
+ if (isset($config['rewrite']) &&
interface_exists('Drupal\config_rewrite\ConfigRewriterInterfac
e')) {
+ if (isset($config['rewrite']) &&
$this->moduleHandler->moduleExists('config_rewrit
e')) {
+ $this->exportConfig($config['rewrite'], $type, $extension, ConfigRewriterInterface::CONFIG_REWRITE_DIRECTORY);
+ }
}
/**
@@ -164,6 +172,
8
@@
class ConfigDevelCommands extends DrushCommands {
@@ -164,6 +172,
12
@@
class ConfigDevelCommands extends DrushCommands {
* - field.instance.node.article.body
* optional:
* - field.instance.node.article.tags
+ * rewrite:
+ * - book.settings
+ *
+ * The 'rewrite' key may contain config entities that could override config
+ * from other modules and is only taking any action, if the config_rewrite
+ * module is being installed.
*
* @command config:devel-import
* @param string $extension Machine name of the module, profile or theme.
@@ -198,6 +2
08
,11 @@
class ConfigDevelCommands extends DrushCommands {
@@ -198,6 +2
12
,11 @@
class ConfigDevelCommands extends DrushCommands {
if (isset($config['optional'])) {
$this->importConfig($config['optional'], $type, $extension, InstallStorage::CONFIG_OPTIONAL_DIRECTORY);
}
+
+ // Import rewrite config
+ if (isset($config['rewrite']) &&
interface_exists('Drupal\config_rewrite\ConfigRewriterInterfac
e')) {
+ // Import rewrite config
.
+ if (isset($config['rewrite']) &&
$this->moduleHandler->moduleExists('config_rewrit
e')) {
+ $this->importConfig($config['rewrite'], $type, $extension, ConfigRewriterInterface::CONFIG_REWRITE_DIRECTORY);
+ }
}
/**
@@ -213,6 +22
8
,8 @@
class ConfigDevelCommands extends DrushCommands {
@@ -213,6 +2
3
2,8 @@
class ConfigDevelCommands extends DrushCommands {
* - field.instance.node.article.body
* optional:
* - field.instance.node.article.tags
...
...
@@ -61,17 +65,17 @@ index a99098a25d1b4e352a200243f8d9b3ab9889f92f..e282c77dfca9f251b412d0e359da0e06
*
* @command config:devel-import-one
* @param string $path Config file name.
@@ -284,7 +30
1
,7 @@
class ConfigDevelCommands extends DrushCommands {
@@ -284,7 +30
5
,7 @@
class ConfigDevelCommands extends DrushCommands {
* The name of the extension for which to return the config.
*
* @return array
- * An array containing install and optional config.
+ * An array containing install, optional and rewrite config.
*
/
protected function getExtensionConfig($type, $extension) {
$filename = drupal_get_path($type, $extension) . '/' . $extension .'.info.yml';
@@ -
294
,14 +3
11
,14 @@
class ConfigDevelCommands extends DrushCommands {
if (isset($info['config_devel'])) {
*
* @throws \Exception
* Throws an exception if the 'config_devel' property of the extension's
@@ -
302
,14 +3
23
,14 @@
class ConfigDevelCommands extends DrushCommands {
// Keep backwards compatibility for the old format. This has config names
// listed directly beneath 'config_devel', rather than an intermediate
- // level for 'install' and 'optional'.
...
...
@@ -88,7 +92,7 @@ index a99098a25d1b4e352a200243f8d9b3ab9889f92f..e282c77dfca9f251b412d0e359da0e06
if (isset($info['config_devel'][$type])) {
$config[$type] = $info['config_devel'][$type];
}
@@ -3
2
3,8 +3
40
,9 @@
class ConfigDevelCommands extends DrushCommands {
@@ -33
1
,8 +3
52
,9 @@
class ConfigDevelCommands extends DrushCommands {
* The name of the extension we're exporting.
* @param string $directory
* The subdirectory within the extension that we're exporting to. One of
...
...
@@ -100,7 +104,7 @@ index a99098a25d1b4e352a200243f8d9b3ab9889f92f..e282c77dfca9f251b412d0e359da0e06
*
* @throws \Exception
* Thrown when the directory to export to is missing and could not be
@@ -36
8
,8 +38
6
,9 @@
class ConfigDevelCommands extends DrushCommands {
@@ -3
7
6,8 +3
9
8,9 @@
class ConfigDevelCommands extends DrushCommands {
* The module, theme or install profile we're importing.
* @param string $directory
* The subdirectory within the extension that we're importing from. One of
...
...
@@ -111,4 +115,4 @@ index a99098a25d1b4e352a200243f8d9b3ab9889f92f..e282c77dfca9f251b412d0e359da0e06
+ * - \Drupal\config_rewrite\ConfigRewriterInterface::CONFIG_REWRITE_DIRECTORY
*/
protected function importConfig($config_list, $type, $extension, $directory) {
$config_path =
d
rupal
_
get
_p
ath($type, $extension) . "/$directory";
$config_path =
\D
rupal
::service('extension.path.resolver')->
get
P
ath($type, $extension) . "/$directory";
This diff is collapsed.
Click to expand it.
patches/d11.json
+
1
−
1
View file @
40689f66
...
...
@@ -36,7 +36,7 @@
},
"drupal/config_devel"
:
{
"#3219083 Export raw data"
:
"https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3219083.diff"
,
"#3227881 Support config_rewrite"
:
"https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3227881.diff"
"#3227881 Support config_rewrite"
:
"https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3227881.diff
?v=2
"
},
"drupal/config_sync"
:
{
"#3176955 Drupal 9 test compatibility"
:
"https://www.drupal.org/files/issues/2021-03-19/config_sync-config-sync-test-core-3176955-4.patch"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment