Replace Experience Builder name everywhere
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3543402. -->
Reported by: [tedbow](https://www.drupal.org/user/240860)
Related to !1 !2 !1483 !1485
>>>
<p>--- AI TRACKER METADATA ---<br>
<strong>Update Summary: </strong>Replace Experience Builder name everywhere<br>
<strong>Check-in Date: </strong>MM/DD/YYYY (US format) [When we should see progress/get an update]<br>
<strong>Due Date:</strong> MM/DD/YYYY (US format) [When the issue should be fully completed]<br>
<strong>Blocked by:</strong> [#XXXXXX] (New issues on new lines)<br>
<strong>Additional Collaborators:</strong> @username1, @username2<br>
AI Tracker found here: <a href="https://www.drupalstarforge.ai/" title="AI Tracker">https://www.drupalstarforge.ai/</a><br>
--- END METADATA ---</p>
<h3 id="overview">Overview</h3>
<p>Starting a script</p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<p>Provide a script to change the module name from Experience Builder to Canvas</p>
<p>Run the script <code>composer rename</code><br>
There are 2 MRs, </p>
<ol>
<li><a href="https://git.drupalcode.org/project/experience_builder/-/merge_requests/1485">MR !1485</a> with just the script and it supporting changes, very litte</li>
<li><a href="https://git.drupalcode.org/project/experience_builder/-/merge_requests/1483">MR !1483</a> with the script plus the result of the script being run, all the renames
<p>Any changes I have had made this MR than that I have put a <code>@todo RENAME,</code> so we can know to revert.<br>
I suggest keep this MR as close to the just the results of the script as possible. If we need to do stuff like, skip certain files, skip certain patterns in certain files, lets try to build that into the script so it is repeatable.
</p></li>
</ol>
<p>The script has a list search and replace strings like</p>
<div class="codeblock">
<pre><span style="color: #000000"><span style="color: #0000BB"><?php<br>$replacements </span><span style="color: #007700">= [<br> </span><span style="color: #0000BB">$old_machine_name </span><span style="color: #007700">=> </span><span style="color: #0000BB">$new_machine_name</span><span style="color: #007700">,<br> </span><span style="color: #FF8000">// @todo What should this be?<br> </span><span style="color: #DD0000">'xbt' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'cvt'</span><span style="color: #007700">,<br> </span><span style="color: #DD0000">'EXPERIENCE_BUILDER' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'CANVAS'</span><span style="color: #007700">,<br> </span><span style="color: #DD0000">'Experience Builder' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Canvas'</span><span style="color: #007700">,<br> </span><span style="color: #DD0000">'Experience-Builder' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Canvas'</span><span style="color: #007700">,<br> </span><span style="color: #DD0000">'experience-builder' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'canvas'</span><span style="color: #007700">,<br> </span><span style="color: #DD0000">'experience builder' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'canvas'</span><span style="color: #007700">,<br> </span><span style="color: #DD0000">'Experience builder' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Canvas'</span><span style="color: #007700">,<br> </span><span style="color: #DD0000">'xb' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'cv'</span><span style="color: #007700">,<br> </span><span style="color: #DD0000">'ExperienceBuilder' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Canvas'</span><span style="color: #007700">,<br> ];<br></span><span style="color: #0000BB">?></span></span></pre></div>
<p>Then it does the replaces in</p>
<ol>
<li>The file contents</li>
<li>The file names</li>
<li>The directory names, starting with the most nested</li>
</ol>
<h4>A workflow proposal:</h4>
<ol>
<li>On <code>3543402-script-only</code>, do whatever change you need to fix in the script, and commit it.</li>
<li>Checkout <code>3543402-replace-experience-builder</code> and <code>git cherry-pick</code> that commit from the other branch.</li>
<li>Run <code>composer run command</code> (or <code>ddev -d /var/www/html/web/modules/contrib/experience_builder composer run rename</code> in ddev)
<ol>
<li>If the output is what you expect and move us forward: Commit and push both branches.</li>
<li>If not, <code>git clean -fd</code> is your friend, go back to 1.</li>
</ol></li>
</ol>
<h5>Starting again:</h5>
<p>If something goes wrong and we want to step back and do more specific risk-free operations, let's rewrite history on <code>3543402-replace-experience-builder</code>.<br>
We <strong>never</strong> should rewrite history on <code>3543402-script-only</code>, as someone might have WIP there.</p>
<ol>
<li><code>git checkout 3543402-script-only</code></li>
<li><code>git branch -D 3543402-replace-experience-builder</code></li>
<li><code>git checkout -b 3543402-replace-experience-builder</code></li>
<li><code>git revert 1b1546ca</code> (because we need to revert the gitlabci.yml removal, and needs to happen before running the script itself)</li>
<li>Run <code>composer run rename</code> (or <code>ddev -d /var/www/html/web/modules/contrib/experience_builder composer run rename</code> in ddev)</li>
<li><code>git ci -m 'your changes'</code></li>
<li><code>git push -u experience_builder-3543402 3543402-replace-experience-builder --force-with-lease</code></li>
</ol>
<h3 id="ui-changes">User interface changes</h3>
> Related issue: [Issue #3543320](https://www.drupal.org/node/3543320)
> Related issue: [Issue #3544412](https://www.drupal.org/node/3544412)
> Related issue: [Issue #3546166](https://www.drupal.org/node/3546166)
issue