-
Notifications
You must be signed in to change notification settings - Fork 1
/
contributing.html
153 lines (146 loc) · 50.8 KB
/
contributing.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="VuePress 2.0.0-beta.33">
<style>
:root {
--c-bg: #fff;
}
html.dark {
--c-bg: #22272e;
}
html, body {
background-color: var(--c-bg);
}
</style>
<script>
const userMode = localStorage.getItem('vuepress-color-scheme');
const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
if (userMode === 'dark' || (userMode !== 'light' && systemDarkMode)) {
document.documentElement.classList.toggle('dark', true);
}
</script>
<link rel="icon" href="/thunder.svg"><title>Contribute to Thunder | Thunder</title><meta name="description" content="Thunder is a Drupal distribution for professional publishers.">
<link rel="modulepreload" href="/assets/app.d438baca.js"><link rel="modulepreload" href="/assets/contributing.html.aa02af77.js"><link rel="modulepreload" href="/assets/plugin-vue_export-helper.21dcd24c.js"><link rel="modulepreload" href="/assets/contributing.html.2bc28fe6.js">
<link rel="stylesheet" href="/assets/style.9d22e823.css">
</head>
<body>
<div id="app"><!--[--><div class="theme-container"><!--[--><header ref_key="navbar" class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/" class=""><svg class="logo" version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewbox="0 0 492 110.7" enable-background="new 0 0 492 110.7" xml:space="preserve"><g><path class="light" fill="#009FE3" d="M26.9,107c1.9,0.3,3.9,0.5,5.7,0.6c1.9,0.1,3.7,0.1,5.3,0.1c1.6,0,3.3-0.1,5.1-0.2c1.7-0.1,3.5-0.3,5.2-0.5
V20.5h26c0.6-2.9,0.9-6,0.9-9.2c0-3-0.3-6-0.9-8.9H0.9C0.3,5.4,0,8.3,0,11.3c0,3.2,0.3,6.3,0.9,9.2h26V107L26.9,107z M80.9,107.2
c1.7,0.3,3.5,0.5,5.2,0.6c1.7,0.1,3.4,0.1,5,0.1c1.6,0,3.3,0,5.1-0.1c1.7-0.1,3.5-0.3,5.2-0.6V67.6c0-4.1,0.5-7.4,1.4-9.9
c0.9-2.5,2.1-4.5,3.5-5.9c1.4-1.4,3-2.4,4.7-2.8c1.7-0.5,3.4-0.7,5.1-0.7c4,0,6.8,1.4,8.4,4.2c1.6,2.8,2.5,6.8,2.5,12.1v42.6
c1.7,0.3,3.5,0.5,5.2,0.6c1.7,0.1,3.4,0.1,5.1,0.1c1.6,0,3.3,0,5.1-0.1c1.7-0.1,3.5-0.3,5.2-0.6V59c0-10-2.2-17.3-6.5-22
c-4.3-4.7-10.6-7-19-7c-3,0-5.7,0.4-8,1.2c-2.3,0.8-4.3,1.7-6,2.8c-1.6,1.1-3,2.3-4.1,3.5c-1.1,1.2-2,2.3-2.7,3.1V2
c-1.7-0.3-3.5-0.5-5.2-0.6c-1.7-0.1-3.4-0.1-5.1-0.1c-1.7,0-3.3,0-5.1,0.1c-1.7,0.1-3.4,0.3-5.1,0.6V107.2L80.9,107.2z M337.8,31.6
c-1.7-0.5-3.6-0.8-5.5-0.9c-1.9-0.1-3.7-0.2-5.5-0.2c-5.8,0-11.1,1-15.9,3.1c-4.8,2.1-8.8,4.9-12.1,8.5c-3.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9-10.3-0.9
c-3.4,0-6.8,0.3-10.3,0.9v40.4c0,8,1,14.5,3.1,19.3c2,4.8,4.8,8.5,8.2,11c3.4,2.5,7.4,4.2,12,4.9c4.1,0.7,8.5,1,12.9,1.1
c4.5-0.1,8.8-0.4,12.9-1.1c4.6-0.8,8.6-2.4,12-4.9c3.4-2.5,6.2-6.2,8.2-11c1.9-4.4,2.9-10.3,3-17.4l0,0v-1.5c0-0.1,0-0.3,0-0.4l0,0
v-7.1c0-4,0.3-7.2,0.9-9.8c0.6-2.6,1.6-4.6,2.9-6.1c1.3-1.5,2.9-2.6,4.9-3.2c1.9-0.6,4.2-0.9,6.8-0.9c2.6,0,4.9,0.3,6.8,0.9
c1.9,0.6,3.6,1.7,4.9,3.2c1.3,1.5,2.3,3.5,2.9,6.1c0.6,2.6,0.9,5.8,0.9,9.8V107c3.5,0.6,6.9,0.9,10.3,0.9
C274.5,107.9,277.9,107.6,281.4,107L281.4,107z"></path></g></svg><span class="site-name can-hide">Thunder</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/user-guide/feature-overview.html" class="" aria-label="User Guide"><!--[--><!--]--> User Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/developer-guide/setup.md" class="" aria-label="Developer Guide"><!--[--><!--]--> Developer Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contributing.md" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://thunder.org" rel="noopener noreferrer" target="_blank" aria-label="Thunder.org"><!--[--><!--]--> Thunder.org <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/thunder/thunder-distribution" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><form class="search-box" role="search"><input type="search" autocomplete="off" spellcheck="false" value><!----></form></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-items"><!--[--><div class="navbar-item"><a href="/user-guide/feature-overview.html" class="" aria-label="User Guide"><!--[--><!--]--> User Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/developer-guide/setup.md" class="" aria-label="Developer Guide"><!--[--><!--]--> Developer Guide <!--[--><!--]--></a></div><div class="navbar-item"><a href="/contributing.md" class="" aria-label="Contribute"><!--[--><!--]--> Contribute <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://thunder.org" rel="noopener noreferrer" target="_blank" aria-label="Thunder.org"><!--[--><!--]--> Thunder.org <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/thunder/thunder-distribution" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p class="sidebar-item sidebar-heading">Contribute to Thunder <!----></p><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/contributing.html#setup-thunder-for-development" class="router-link-active router-link-exact-active sidebar-item" aria-label="Setup Thunder for development"><!--[--><!--]--> Setup Thunder for development <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/contributing.html#automated-code-checks" class="router-link-active router-link-exact-active sidebar-item" aria-label="Automated code checks"><!--[--><!--]--> Automated code checks <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/contributing.html#how-to-s" class="router-link-active router-link-exact-active sidebar-item" aria-label="How-To's"><!--[--><!--]--> How-To's <!--[--><!--]--></a><!--[--><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/contributing.html#update-profile-configuration" class="router-link-active router-link-exact-active sidebar-item" aria-label="Update profile configuration"><!--[--><!--]--> Update profile configuration <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/contributing.html#writing-update-hooks" class="router-link-active router-link-exact-active sidebar-item" aria-label="Writing update hooks"><!--[--><!--]--> Writing update hooks <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/contributing.html#write-automated-tests" class="router-link-active router-link-exact-active sidebar-item" aria-label="Write automated tests"><!--[--><!--]--> Write automated tests <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/contributing.html#how-to-run-the-tests" class="router-link-active router-link-exact-active sidebar-item" aria-label="How to run the tests"><!--[--><!--]--> How to run the tests <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/contributing.html#how-to-run-the-nightwatchjs-performance-tests" class="router-link-active router-link-exact-active sidebar-item" aria-label="How to run the NightwatchJS performance tests"><!--[--><!--]--> How to run the NightwatchJS performance tests <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><li><a aria-current="page" href="/contributing.html#documentation" class="router-link-active router-link-exact-active sidebar-item" aria-label="Documentation"><!--[--><!--]--> Documentation <!--[--><!--]--></a><!----></li><!--]--></ul><!--]--></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="contribute-to-thunder" tabindex="-1"><a class="header-anchor" href="#contribute-to-thunder" aria-hidden="true">#</a> Contribute to Thunder</h1><p>Thunder is a "Drupal" based distribution.</p><p>We are working on GitHub and drupal.org. Issues are managed on drupal.org. That gives us the possibility to better interact with related issues. Code improvements will be managed over GitHub's PR system.</p><p>If you found an issue with Thunder, please open a <a href="https://www.drupal.org/project/issues/thunder?categories=All" target="_blank" rel="noopener noreferrer">ticket<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a> on drupal.org. Please have in mind that Thunder is a collection of Drupal modules, a set of configurations, and very little custom code.</p><p>So, if you can track down an issue to a specific module, please open the ticket in the corresponding issue queue on drupal.org.</p><p>If you want to open a PR for the Thunder distribution, please make sure you created a corresponding issue on d.o. before. All created pull requests should contain a d.o. issue number in its title.</p><p>Please also note the pull request template to create better quality pull requests.</p><h2 id="setup-thunder-for-development" tabindex="-1"><a class="header-anchor" href="#setup-thunder-for-development" aria-hidden="true">#</a> Setup Thunder for development</h2><p>To install the Thunder Distribution for development create the thunder-develop project:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">composer</span> create-project thunder/thunder-develop -s dev
<span class="token builtin class-name">cd</span> thunder-develop
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>This will install thunder into the docroot folder. The actual distribution repository will be cloned into docroot/profiles/contrib/thunder.</p><p>Now you can install thunder. Point the web server to the docroot directory and do a normal site install.</p><p>To work on the distribution, work inside the docroot/profiles/contrib/thunder folder.</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token builtin class-name">cd</span> docroot/profiles/contrib/thunder
<span class="token function">git</span> checkout -b feature/new-thunder-feature <span class="token comment"># <-- this will be a branch in the distribution not the project</span>
<span class="token operator"><</span>make changes<span class="token operator">></span>
<span class="token function">git</span> commit <span class="token builtin class-name">.</span>
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h2 id="automated-code-checks" tabindex="-1"><a class="header-anchor" href="#automated-code-checks" aria-hidden="true">#</a> Automated code checks</h2><p>All Thunder pull requests are executed on <a href="https://github.com/thunder/thunder-distribution/actions" target="_blank" rel="noopener noreferrer">GitHub actions<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>. On every pull request tests will be executed (or when new commits are pushed into the pull request branch). All code will be checked against coding style.</p><p>We support some test execution options. They can be provided by pull request labels. Here is a list of supported labels:</p><ul><li><em>test-upgrade</em> - this option will execute a custom test path, where an update (including the execution of update hooks) from Thunder 2 will be tested. This option should be used in case of a pull request with update hooks or module updates.</li><li><em>test-min</em> - this option installs the pull request version of Thunder with the oldest possible dependencies and executes the test suite.</li><li><em>test-performance</em> - this option pushed the codebase to our performance testing infrastructure. A successful test-max build is required for this.</li></ul><h2 id="how-to-s" tabindex="-1"><a class="header-anchor" href="#how-to-s" aria-hidden="true">#</a> How-To's</h2><h3 id="update-profile-configuration" tabindex="-1"><a class="header-anchor" href="#update-profile-configuration" aria-hidden="true">#</a> Update profile configuration</h3><p>The Thunder distribution ships the config_profile module as a dev dependency for easier config updates. The workflow for updating config files that are shipped in the distribution should be:</p><ul><li><p>Install the latest dev version of Thunder</p></li><li><p>Enable the Config Profile module</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>drush en config_profile
</code></pre><div class="line-numbers"><span class="line-number">1</span><br></div></div></li><li><p>Apply all your changes in the UI</p></li><li><p>Export your configuration</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>drush cex
</code></pre><div class="line-numbers"><span class="line-number">1</span><br></div></div><p>The configuration is exported to the chosen config_directory and simultaneously to your profile folder.</p></li><li><p>config_profile has now copied all the config changes to the profile folder</p></li><li><p>Put all new config files to the desired folder and add track it in git</p></li><li><p>Remove all untracked files</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">git</span> clean -fd
</code></pre><div class="line-numbers"><span class="line-number">1</span><br></div></div></li></ul><h3 id="writing-update-hooks" tabindex="-1"><a class="header-anchor" href="#writing-update-hooks" aria-hidden="true">#</a> Writing update hooks</h3><p>To support the creation of update hooks, Thunder integrated the <code>update_helper</code> module. That contains several methods to e.g. update the existing configuration or enabling modules.</p><p>Outputting results of update hook is highly recommended for that we have provided UpdateLogger, it handles the output of result properly for <code>drush</code> or UI (<code>update.php</code>) update workflow. That's why every update hook that changes something should log what is changed and was it successful or it has failed. And the last line in the update hook should be returning of UpdateLogger output. UpdateLogger service is also used by Thunder Updater and it can be retrieved from it. Here are two examples of how to get and use UpdateLogger. All text logged as INFO, will be outputted as success in <code>drush</code> output.</p><div class="language-php ext-php line-numbers-mode"><pre class="language-php"><code> <span class="token comment">// Get service directly.</span>
<span class="token doc-comment comment">/** <span class="token keyword">@var</span> <span class="token class-name"><span class="token punctuation">\</span>Drupal<span class="token punctuation">\</span>update_helper<span class="token punctuation">\</span>UpdateLogger</span> <span class="token parameter">$updateLogger</span> */</span>
<span class="token variable">$updateLogger</span> <span class="token operator">=</span> <span class="token class-name class-name-fully-qualified static-context"><span class="token punctuation">\</span>Drupal</span><span class="token operator">::</span><span class="token function">service</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'update_helper.logger'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// Log change success or failures.</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">...</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token variable">$updateLogger</span><span class="token operator">-></span><span class="token function">info</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'Change is successful.'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">else</span> <span class="token punctuation">{</span>
<span class="token variable">$updateLogger</span><span class="token operator">-></span><span class="token function">warning</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'Change has failed.'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token comment">// At end of update hook return result of UpdateLogger::output().</span>
<span class="token keyword">return</span> <span class="token variable">$updateLogger</span><span class="token operator">-></span><span class="token function">output</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><p>Other way to get UpdateLogger is from Update Helper Updater service.</p><div class="language-php ext-php line-numbers-mode"><pre class="language-php"><code> <span class="token comment">// Get service from Thunder Updater service.</span>
<span class="token doc-comment comment">/** <span class="token keyword">@var</span> <span class="token class-name"><span class="token punctuation">\</span>Drupal<span class="token punctuation">\</span>update_helper<span class="token punctuation">\</span>Updater</span> <span class="token parameter">$updater</span> */</span>
<span class="token variable">$updater</span> <span class="token operator">=</span> <span class="token class-name class-name-fully-qualified static-context"><span class="token punctuation">\</span>Drupal</span><span class="token operator">::</span><span class="token function">service</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'update_helper.updater'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token variable">$updateLogger</span> <span class="token operator">=</span> <span class="token variable">$updater</span><span class="token operator">-></span><span class="token function">logger</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token operator">...</span>
<span class="token comment">// At end of update hook return result of UpdateLogger::output().</span>
<span class="token keyword">return</span> <span class="token variable">$updateLogger</span><span class="token operator">-></span><span class="token function">output</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br></div></div><h4 id="importing-new-configurations" tabindex="-1"><a class="header-anchor" href="#importing-new-configurations" aria-hidden="true">#</a> Importing new configurations</h4><p>You have to create configuration update definition file with global <code>import_configs</code> action. For example:</p><div class="language-yaml ext-yml line-numbers-mode"><pre class="language-yaml"><code><span class="token key atrule">__global</span><span class="token punctuation">:</span>
<span class="token key atrule">import_configs</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> config.to.import
<span class="token punctuation">-</span> config.to.import<span class="token punctuation">-</span>no2
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>After that you just have to execute configuration update. For example:</p><div class="language-php ext-php line-numbers-mode"><pre class="language-php"><code> <span class="token doc-comment comment">/** <span class="token keyword">@var</span> <span class="token class-name"><span class="token punctuation">\</span>Drupal<span class="token punctuation">\</span>update_helper<span class="token punctuation">\</span>Updater</span> <span class="token parameter">$updater</span> */</span>
<span class="token variable">$updater</span> <span class="token operator">=</span> <span class="token class-name class-name-fully-qualified static-context"><span class="token punctuation">\</span>Drupal</span><span class="token operator">::</span><span class="token function">service</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'update_helper.updater'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token variable">$updater</span><span class="token operator">-></span><span class="token function">executeUpdate</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'thunder_article'</span><span class="token punctuation">,</span> <span class="token string single-quoted-string">'thunder_update_8101'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">return</span> <span class="token variable">$updater</span><span class="token operator">-></span><span class="token function">logger</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">-></span><span class="token function">output</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p>This update hook will import configurations, that are in a module or profile config directory.</p><h4 id="updating-existing-configuration-with-manually-defined-configuration-changes" tabindex="-1"><a class="header-anchor" href="#updating-existing-configuration-with-manually-defined-configuration-changes" aria-hidden="true">#</a> Updating existing configuration (with manually defined configuration changes)</h4><p>Before Drupal\update_helper\Updater::updateConfig() updates existing configuration, it could check the current values of that config. That helps to leave the modified, existing configuration in a valid state.</p><div class="language-php ext-php line-numbers-mode"><pre class="language-php"><code> <span class="token comment">// List of configurations that should be checked for existence.</span>
<span class="token variable">$expectedConfig</span><span class="token punctuation">[</span><span class="token string single-quoted-string">'content'</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token string single-quoted-string">'field_url'</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
<span class="token string single-quoted-string">'type'</span> <span class="token operator">=></span> <span class="token string single-quoted-string">'instagram_embed'</span><span class="token punctuation">,</span>
<span class="token string single-quoted-string">'weight'</span> <span class="token operator">=></span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string single-quoted-string">'label'</span> <span class="token operator">=></span> <span class="token string single-quoted-string">'hidden'</span><span class="token punctuation">,</span>
<span class="token string single-quoted-string">'settings'</span> <span class="token operator">=></span> <span class="token punctuation">[</span>
<span class="token string single-quoted-string">'width'</span> <span class="token operator">=></span> <span class="token number">241</span><span class="token punctuation">,</span>
<span class="token string single-quoted-string">'height'</span> <span class="token operator">=></span> <span class="token number">313</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token string single-quoted-string">'third_party_settings'</span> <span class="token operator">=></span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token comment">// New configuration that should be applied.</span>
<span class="token variable">$newConfig</span><span class="token punctuation">[</span><span class="token string single-quoted-string">'content'</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token string single-quoted-string">'thumbnail'</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
<span class="token string single-quoted-string">'type'</span> <span class="token operator">=></span> <span class="token string single-quoted-string">'image'</span><span class="token punctuation">,</span>
<span class="token string single-quoted-string">'weight'</span> <span class="token operator">=></span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string single-quoted-string">'region'</span> <span class="token operator">=></span> <span class="token string single-quoted-string">'content'</span><span class="token punctuation">,</span>
<span class="token string single-quoted-string">'label'</span> <span class="token operator">=></span> <span class="token string single-quoted-string">'hidden'</span><span class="token punctuation">,</span>
<span class="token string single-quoted-string">'settings'</span> <span class="token operator">=></span> <span class="token punctuation">[</span>
<span class="token string single-quoted-string">'image_style'</span> <span class="token operator">=></span> <span class="token string single-quoted-string">'media_thumbnail'</span><span class="token punctuation">,</span>
<span class="token string single-quoted-string">'image_link'</span> <span class="token operator">=></span> <span class="token string single-quoted-string">''</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token string single-quoted-string">'third_party_settings'</span> <span class="token operator">=></span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token doc-comment comment">/** <span class="token keyword">@var</span> <span class="token class-name"><span class="token punctuation">\</span>Drupal<span class="token punctuation">\</span>update_helper<span class="token punctuation">\</span>Updater</span> <span class="token parameter">$updater</span> */</span>
<span class="token variable">$updater</span> <span class="token operator">=</span> <span class="token class-name class-name-fully-qualified static-context"><span class="token punctuation">\</span>Drupal</span><span class="token operator">::</span><span class="token function">service</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'update_helper.updater'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token variable">$updater</span><span class="token operator">-></span><span class="token function">updateConfig</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'core.entity_view_display.media.instagram.thumbnail'</span><span class="token punctuation">,</span> <span class="token variable">$newConfig</span><span class="token punctuation">,</span> <span class="token variable">$expectedConfig</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br></div></div><h4 id="updating-existing-configuration-with-using-of-generated-configuration-changes" tabindex="-1"><a class="header-anchor" href="#updating-existing-configuration-with-using-of-generated-configuration-changes" aria-hidden="true">#</a> Updating existing configuration (with using of generated configuration changes)</h4><p>With the Thunder Updater module, we have provided Drupal Console command that will generate update configuration changes (it's called configuration update definition or CUD). Configuration update definition (CUD) will be stored in <code>config/update</code> directory of the module and it can be easily executed with Thunder Updater.</p><p>Workflow to generate Thunder configuration update is following:</p><ol><li>Make a clean install of the previous version of Thunder (version for which one you want to create configuration update). For example, if you are merging changes to <code>develop</code> branch, then you should install Thunder for that branch</li><li>When Thunder is installed, make code update (with code update also configuration files will be updated, but not active configuration in the database)</li><li>Execute update hooks if it's necessary (e.g. in a case when you have a module and/or core updates in your branch)</li><li>Now is a moment to generate Thunder configuration update code. For that, we have provided the following drush command: <code>drush generate configuration-update</code>. That command should be executed and there is some information that has to be filled, like module name where all generated data will be saved (CUD file, checklist <code>update.yml</code> and update hook function). Then also information for checklist entry, like title, success message, and failure message. Command will generate CUD file and save it in <code>config/update</code> folder of the module, it will add an entry in <code>update.yml</code> file for the checklist and it will create an update hook function in <code><module_name>.install</code> file.</li><li>After the command has finished it will display what files are modified and generated. It's always good to make an additional check of generated code.</li></ol><h3 id="write-automated-tests" tabindex="-1"><a class="header-anchor" href="#write-automated-tests" aria-hidden="true">#</a> Write automated tests</h3><p>Thunder distribution comes with a set of Drupal tests. They can be used to validate Thunder installation or to use provided traits for your own project Drupal tests.</p><h3 id="how-to-run-the-tests" tabindex="-1"><a class="header-anchor" href="#how-to-run-the-tests" aria-hidden="true">#</a> How to run the tests</h3><p>Please see the official <a href="https://www.drupal.org/docs/automated-testing/phpunit-in-drupal" target="_blank" rel="noopener noreferrer">Drupal documentation<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a></p><p>To speed up the test execution time, you can provide a database dump to Thunder tests:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token builtin class-name">cd</span> docroot
php ./core/scripts/db-tools.php dump-database-d8-mysql <span class="token operator">|</span> <span class="token function">gzip</span> <span class="token operator">></span> thunder.sql.gz
<span class="token builtin class-name">export</span> <span class="token assign-left variable">thunderDumpFile</span><span class="token operator">=</span>/path/to/thunder.sql.gz
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h3 id="how-to-run-the-nightwatchjs-performance-tests" tabindex="-1"><a class="header-anchor" href="#how-to-run-the-nightwatchjs-performance-tests" aria-hidden="true">#</a> How to run the NightwatchJS performance tests <span class="badge danger" style="vertical-align:bottom;"><!--[-->Not reviewed<!--]--></span></h3><ol><li>You need to install <a href="https://yarnpkg.com" target="_blank" rel="noopener noreferrer">Yarn<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>. Please check the installation documentation for it.</li><li>You have to install <code>thunder/thunder_performance_measurement</code> package. To do that, execute the following command in your project root directory: <code>composer require thunder/thunder_performance_measurement:dev-master --dev</code> and enable the module by executing: <code>drush en thunder_performance_measurement</code> in your <code>docroot</code> directory.</li><li>You need to install <a href="https://www.npmjs.com/package/elastic-apm-node" target="_blank" rel="noopener noreferrer">Elastic APM Node.js Agent<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a> in Drupal Core node packages. To do that go to your <code>docroot/core</code> directory and execute the following command: <code>yarn add elastic-apm-node --dev</code></li><li>You have to adjust your <code>.env</code> file inside <code>docroot/core</code> directory. You can copy the <code>.env.example</code> to <code>.env</code> and edit it accordingly. Thunder tests require the following environment variables: <code>DRUPAL_TEST_BASE_URL</code> , <code>THUNDER_BRANCH</code>, <code>THUNDER_SITE_HOSTNAME</code> and <code>THUNDER_APM_URL</code>. The <code>THUNDER_BRANCH</code> is the branch name where tests are executing, for example, <code>8.x-4.x</code>. The <code>THUNDER_SITE_HOSTNAME</code> is the hostname where tests are executing, for example, <code>thunder.dev</code>. The <code>THUNDER_APM_URL</code> is URL to Elastic APM Server, for example, <code>http://localhost:8200</code>.</li><li>After that, you can run NightwatchJS tests by executing the following command inside <code>docroot/core</code> directory: <code>yarn test:nightwatch <path to JS Test file></code>. Here is an example: <code>yarn test:nightwatch ../profiles/contrib/thunder/tests/src/Nightwatch/Tests/CreateMostUsedContent.js</code></li></ol><h4 id="if-you-have-a-problem-with-outdated-chromedriver" tabindex="-1"><a class="header-anchor" href="#if-you-have-a-problem-with-outdated-chromedriver" aria-hidden="true">#</a> If you have a problem with outdated chromedriver</h4><p>Drupal core does not update javascript dependencies so fast and chromedriver may be outdated and unable to work with chrome installed on the system. You can provide chrome that can be used by chromedriver inside a docker container. You can do it with the following command:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">docker</span> run --name selenium_chrome -d -P -p <span class="token number">6000</span>:5900 -p <span class="token number">4444</span>:4444 --shm-size 256m --add-host<span class="token operator">=</span><span class="token string">"thunder.dd:172.16.123.1"</span> selenium/standalone-chrome-debug:3.141.59-selenium
</code></pre><div class="line-numbers"><span class="line-number">1</span><br></div></div><p>You have to find what is correct docker image tag for the chrome version you need. To do that you have to take a look at <a href="https://github.com/SeleniumHQ/docker-selenium/releases" target="_blank" rel="noopener noreferrer">selenium docker releases<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>. This workflow is similar to PHP JavaScript tests and for additional information, you can take a look at <strong>How to run the tests</strong> section.</p><p>After you have running chrome in docker, you have also to change environment variables in <code>.env</code> file. The following environment variable should be set:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token assign-left variable">DRUPAL_TEST_WEBDRIVER_PORT</span><span class="token operator">=</span><span class="token number">4444</span>
<span class="token assign-left variable">DRUPAL_TEST_WEBDRIVER_PATH_PREFIX</span><span class="token operator">=</span>/wd/hub
<span class="token assign-left variable">DRUPAL_TEST_CHROMEDRIVER_AUTOSTART</span><span class="token operator">=</span>false
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><p>You can copy/paste this section to the bottom of your <code>.env</code> file.</p><h2 id="documentation" tabindex="-1"><a class="header-anchor" href="#documentation" aria-hidden="true">#</a> Documentation</h2><p>To help with the documentation, please run:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">git</span> clone [email protected]:thunder/thunder-distribution.git
<span class="token builtin class-name">cd</span> thunder-distribution
nvm use
<span class="token function">npm</span> <span class="token function">install</span>
<span class="token function">npm</span> run docs:dev
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p>This will serve the docs server at <a href="http://localhost:8080" target="_blank" rel="noopener noreferrer">http://localhost:8080<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a>.</p><!--]--></div><footer class="page-meta"><div class="meta-item edit-link"><a class="external-link meta-item-label" href="https://github.com/thunder/thunder-distribution/edit/6.3.x/docs/contributing.md" rel="noopener noreferrer" target="_blank" aria-label="Edit this page"><!--[--><!--]--> Edit this page <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><!----></footer><!----><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
<script type="module" src="/assets/app.d438baca.js" defer></script>
</body>
</html>