Skip to content

Commit 1cfdbb8

Browse files
garvinhickingfroemkensbuerk
authored
[TASK] Add a "Quick start" tutorial for contributors (DevDays) (#345)
* [TASK] Add a "Quick start" tutorial for contributors (DevDays) * Update indents in Quick Start * Update typo in Visual Studio * Update indents in 2-Accounts * Update indents in 3-git * Update indents in 4-ddev * Update 1-Preqrequisites.rst Co-authored-by: Stefan Frömken <[email protected]> * Update 2-Accounts.rst Co-authored-by: Stefan Frömken <[email protected]> * Update 5-TYPO3.rst Co-authored-by: Stefan Frömken <[email protected]> * Update 5-TYPO3.rst Co-authored-by: Stefan Frömken <[email protected]> * Update 6-Patch-Intermezzo.rst Co-authored-by: Stefan Frömken <[email protected]> * Update 6-Patch-Intermezzo.rst Co-authored-by: Stefan Frömken <[email protected]> * Update 6-Patch.rst Co-authored-by: Stefan Frömken <[email protected]> * Update 7-Contribute.rst Co-authored-by: Stefan Frömken <[email protected]> * Update Index.rst Co-authored-by: Stefan Frömken <[email protected]> * Update 4-DDEV.rst * Update 4-DDEV.rst * Update 5-TYPO3.rst * Update 7-Contribute.rst * [TASK] Remove copy&paste left over This change removes a copy&paste left over from the `Quickstart/Index.rst`. * [TASK] Modify quickguide prerequisites page This change modifies the `Quickstart/1-Prerequisites.rst` to add minor additional information to some points. * [TASK] Enhance `Quickstart/Git setup guide` This change modifes the `Quickguide/3-Git.rst` file to enhance the experience by ... * ensuring single commands per code block to allow block copy and pasting by using the block copy icon. * using more cross operating-system compatible commands. * note when in a command replacements are needed * add a general tip to copy commands to a text file or editor to do the replacement before pasting it into a terminal * add a additional verification step at the end. * [TASK] Enhance `Quickguide: Set up DDEV` page This change modifies `Quickstart/4-DDEV.rst` to enhance the guide slightly. * [TASK] Enhance `Quick Start: Set up TYPO3` chapter This change modifies the `Quickstart/5-TYPO3.rst` file to enhance the experience for the user proceeding this chapter by * ensuring to have single command or command chain to simply use the copy icon and have no issues pasting them into the terminal. * adding generic project folder switch as note at the top. * providing `EXT:styleguide` create commands creating the frontend based on `TypoScript records` instead of the Site Sets feature, which seems to be broken for now with ddev. * Reworded the attention block to state the reason instead of leaving a to do - which looks kind of weired for readers. * [TASK] Minor change of quickstart patch intermezzo * [TASK] Enhance `Quick Start: Create a patch` chapter This change modifies the `Create a patch` chapter slightly to make it more easier for contributors to create their first patch by * ensuring single commands or proper command chains which can be properly copied using the copy icon and pasted into a terminal. * using `:caption:` tags for `code blocks` to explain each command copy block itself. * adding general remember on top to be in the right folder. * adding a additional `cleanup` point at the end providing suitable commands and small explanation. * [TASK] Hint for clean repository to the `patch intermezzo` chapter This change adds a general hint to the `Quick Start: Create a patch - Intention` chapter raising awareness for a clean repository state and how to deal with it if not. * [TASK] Sync `repository reset and cleanup` information in multiple places This change streamlines the `reset and cleanup` steps and information throughout multiple places to contain as much information as possible while still beeing able to copy single command and chains for easy copy&paste experiance. * [TASK] Combined code review This addresses: * Rename "15 minutes" to "under 30 minutes" * Streamline $HOME dir usage * Remove some explanations that enlarge the text too much * Remove some of the prerequisites that are needed, and would otherwise take up too much text. The long version is still part of this guide, it fits there better. * streamline ddev config for rename * fix minor typos * [TASK] Use same convention homefolder for git setup like mentioned in other places * [TASK] Move `attention` block to `EXT:styleguide` point * [TASK] Use `git commit -a` instead of the not wildy known `git commit .` --------- Co-authored-by: Stefan Frömken <[email protected]> Co-authored-by: Stefan Bürk <[email protected]>
1 parent caf13d5 commit 1cfdbb8

File tree

17 files changed

+1072
-31
lines changed

17 files changed

+1072
-31
lines changed

Documentation/BugfixingAZ/Index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ Step by Step Walkthrough
4242
========================
4343

4444
You should have a cloned Git repository with a working TYPO3 installation
45-
as described in :ref:`setup <setup>`. Especially the
45+
as described in :ref:`setup <setup>` (or via the
46+
:ref:`Quick start guide <quickstart>`). Especially the
4647
:ref:`Git setup <Setting-up-your-Git-environment>` is required.
4748

4849
.. rst-class:: bignums-xxl
@@ -182,6 +183,7 @@ as described in :ref:`setup <setup>`. Especially the
182183

183184
#. Optional: Advertise review on Slack channel
184185

186+
.. _announce-slack:
185187
Once your push to Gerrit_ goes through, you will receive a URL for your new
186188
change. If you are on `Slack <https://typo3.slack.com>`__ you can now advertise
187189
your new change in the **#typo3-cms-coredev** channel. You can get a preformatted

Documentation/HandlingAPatch/CleanupTypo3.rst

Lines changed: 52 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ Cleanup git repository
1616

1717
Before :ref:`Cherry-picking a patch <cherry-pick-a-patch>` or starting a new patch:
1818

19-
.. code-block:: bash
20-
:caption: shell command
19+
.. code-block:: bash
20+
:caption: **Reset local repository**
2121
22-
git fetch --all
23-
git reset --hard origin/main
24-
git pull --rebase
22+
Build/Scripts/runTests.sh -s clean && \
23+
git fetch --all && \
24+
git reset --hard origin/main && \
25+
git pull --rebase
2526
2627
2728
.. _cleanup-typo3:
@@ -35,31 +36,16 @@ cleanup your TYPO3 installation.
3536
It depends on the files that have changed, what you need to execute. In
3637
any case or if in doubt, you can safely perform all steps.
3738

38-
**Flush the cache**:
39+
.. code-block:: bash
40+
:caption: **Flush the cache**:
3941
40-
.. code-block:: bash
41-
:caption: shell command
42+
ddev typo3 cache:flush && \
43+
ddev typo3 cache:warmup
4244
43-
Build/Scripts/runTests.sh -s clean
44-
# For DDEV environments, prefix with `ddev ...`
45-
bin/typo3 cache:flush
46-
bin/typo3 cache:warmup
45+
.. code-block:: bash
46+
:caption: **Changes in composer.json**:
4747
48-
**Changes in composer.json**:
49-
50-
.. tabs::
51-
52-
.. group-tab:: runTests.sh
53-
54-
.. code-block:: bash
55-
56-
Build/Scripts/runTests.sh -s composerInstall
57-
58-
.. group-tab:: direct command
59-
60-
.. code-block:: bash
61-
62-
composer install
48+
Build/Scripts/runTests.sh -s composerInstall
6349
6450
**Changes in .css / .js files**:
6551

@@ -69,14 +55,50 @@ Delete browser cache or
6955

7056
Also you may need to create the JS/CSS assets:
7157

72-
.. code-block:: bash
58+
.. code-block:: bash
7359
74-
./Build/Scripts/runTests.sh -s buildCss
75-
./Build/Scripts/runTests.sh -s buildJavascript
60+
./Build/Scripts/runTests.sh -s buildCss && \
61+
./Build/Scripts/runTests.sh -s buildJavascript
7662
7763
**Changes in DB schema (ext_tables.sql)**:
7864

65+
.. code:: bash
66+
:caption: Create missing tables and fields
67+
68+
ddev typo3 extension:setup
69+
7970
:guilabel:`Maintenance: Analyze Database Structure, Apply selected changes.`
8071

8172
.. image:: /Images/ManualScreenshots/analyze.svg
8273
:class: with-shadow
74+
75+
**Update core-testing docker images**
76+
77+
.. code:: bash
78+
:caption: **Pull latest core-testing images versions**
79+
80+
./Build/Scripts/runTests.sh -u
81+
82+
One-liner command
83+
~~~~~~~~~~~~~~~~~
84+
85+
If you want to reset your local installation in one go, you could use the following
86+
one-liner command, combining the mentioned parts from above:
87+
88+
.. code:: bash
89+
:caption: **Reset local repository to upstream state**
90+
91+
./Build/Scripts/runTests.sh -u && \
92+
Build/Scripts/runTests.sh -s clean && \
93+
git fetch --all && \
94+
git reset --hard origin/main && \
95+
git pull --rebase && \
96+
./Build/Scripts/runTests.sh composerInstall && \
97+
ddev typo3 cache:flush && \
98+
ddev typo3 cache:warmup && \
99+
ddev typo3 extension:setup
100+
101+
.. note::
102+
103+
You may still check the `Database Analyzer` in the backend for changes or
104+
removed columns and tables to ensure a clean state.
116 KB
Loading
210 KB
Loading
199 KB
Loading
204 KB
Loading

Documentation/Index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ TYPO3 Contribution Guide - Core Development
3030

3131
On these pages you will learn how to become a TYPO3 Core contributor.
3232

33+
.. rst-class:: horizbuttons-primary-m
34+
35+
* :ref:`Quick Start: Contribute in under 30 Minutes! <quickstart>`
36+
3337
----
3438

3539
**Table of Contents:**
@@ -63,6 +67,7 @@ On these pages you will learn how to become a TYPO3 Core contributor.
6367
:titlesonly:
6468
:caption: HOWTOS
6569

70+
Quickstart/Index
6671
ReportingAnIssue/Index
6772
BugfixingAZ/Index
6873
Build/Index
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
:navigation-title: Prerequisites
2+
.. include:: /Includes.rst.txt
3+
4+
.. index::
5+
single: Prerequisites
6+
7+
.. _quickstart-prerequisites:
8+
9+
Quick Start: Prerequisites
10+
==========================
11+
12+
We will not explain you how to set up the following prerequisites.
13+
There are several tutorials for this on the web, and if you follow
14+
the Quick Start guide, you should know how to do this.
15+
16+
.. rst-class:: bignums-xxl
17+
18+
1. Operating System
19+
20+
A computer running Windows with WSL2, macOS or Linux - connected to
21+
the Internet.
22+
23+
2. Docker
24+
25+
Either the "original" `Docker Desktop <https://www.docker.com/products/docker-desktop/>`__
26+
or an alternative like `OrbStack <https://orbstack.dev/>`__, `Podman <https://podman.io/>`__,
27+
`Colima <https://github.com/abiosoft/colima>`__ or others. Linux users
28+
do not need to install any `Desktop` variants, but can use their base
29+
Docker or Podman setup.
30+
31+
3. DDEV
32+
33+
`DDEV <https://ddev.com>`__ is a layer on top of Docker. How to utilize it is
34+
covered in this guide.
35+
36+
4. Terminal (Bash)
37+
38+
Your operating system needs to provide a Bash terminal, many steps of this guide
39+
will be executed on the shell.
40+
41+
You are free to use another local shell for your work, but the scripts
42+
provided by the TYPO3 Core (most importantly `runTests.sh`) require Bash
43+
to be available.
44+
45+
5. Git client
46+
47+
This guide expects you can execute `git` terminal commands.
48+
49+
This guide uses the *https* method to connect to GitHub, so you do not
50+
need to have a GitHub account.
51+
52+
6. SSH client plus SSH key(s) and an email account
53+
54+
This guide expects you can execute `ssh` terminal commands and connect to
55+
foreign hosts. You will need a private SSH key pair and know how to authenticate
56+
with it. You need an email account to setup accounts.
57+
58+
7. PHP IDE / Editor
59+
60+
It is recommended to use a good PHP IDE. As part of the target audience of this guide
61+
you should already use something like PhpStorm, Visual Studio Code, vi(m)...
62+
63+
.. _quickstart-assumptions:
64+
8. Assumed path structure and name usage
65+
66+
We will use:
67+
68+
* **$HOME/work/TYPO3-Contribute/** as your working directory (created in the guide).
69+
* **John Doe** to be your name.
70+
* **[email protected]** to be your email address that you used for all accounts.
71+
* **john-doe** to be your TYPO3.org username.
72+
* A TYPO3 **legacy mode** installation (Non-Composer) with MariaDB 10.11 and PHP 8.2.
73+
74+
Adjust any occurences of this to match your environment.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
:navigation-title: Accounts
2+
.. include:: /Includes.rst.txt
3+
4+
.. index::
5+
single: Accounts
6+
7+
.. _quickstart-accounts:
8+
9+
Quick Start: Accounts needed
10+
============================
11+
12+
13+
14+
.. rst-class:: bignums-xxl
15+
16+
1. My TYPO3 (`https://my.typo3.org`__)
17+
18+
Vital account! Acts as a Single Sign On (SSO) provider for
19+
several other services. See :ref:`TYPO3Account`.
20+
21+
2. Gerrit (`https://review.typo3.org`__)
22+
23+
The code review system that is used for your code contributions.
24+
There, all patches are commented and voted/approved/rejected.
25+
26+
First login via the `My TYPO3` SSO account. Afterwards you need to upload
27+
your SSH public key here. See :ref:`GerritAccount`.
28+
29+
3. Forge (`https://forge.typo3.org/`__)
30+
31+
The issue tracking platform (Redmine) where bugs and feature
32+
requests are reported. Every patch in Gerrit needs to have
33+
a corresponding issue.
34+
35+
You login here via the `My TYPO3` SSO account.
36+
37+
4. Slack (`https://typo3.slack.com/`__)
38+
39+
The chat platform where developers get in touch with each other.
40+
The channel `#typo3-cms-coredev` is important.
41+
42+
You need to register an account for Slack, see `https://typo3.org/community/meet/chat-slack/`__
43+
and :ref:`slack-account`.
44+

Documentation/Quickstart/3-Git.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
:navigation-title: Git
2+
.. include:: /Includes.rst.txt
3+
4+
.. index::
5+
single: Git repository
6+
7+
.. _quickstart-git:
8+
9+
Quick Start: Set up Git repository
10+
==================================
11+
12+
.. tip::
13+
14+
You may want to adapt some commands that are shown here.
15+
Copy them by using the copy icon in the code block, paste them
16+
in a raw text file or editor, adjust the values. Then copy it
17+
from there to paste it into your terminal again.
18+
19+
.. rst-class:: bignums-xxl
20+
21+
1. Init directory and clone Repository
22+
23+
.. code:: bash
24+
:caption: **Create contribution folder and clone TYPO3 into a it**
25+
26+
mkdir -p $HOME/work/TYPO3-Contribute && \
27+
cd $HOME/work/TYPO3-Contribute && \
28+
git clone https://github.com/typo3/typo3.git .
29+
30+
2. Set up Git specifics
31+
32+
.. note::
33+
34+
Remember that we use some convetions for username and email, see
35+
:ref:`prerequisite assumptions <quickstart-assumptions>.
36+
37+
.. code:: bash
38+
:caption: **Set up git user meta data and repository**
39+
40+
git config user.name "John Doe" && \
41+
git config user.email "[email protected]" && \
42+
git config remote.origin.pushurl \
43+
ssh://[email protected]:29418/Packages/TYPO3.CMS.git && \
44+
git config remote.origin.push +refs/heads/main:refs/for/main
45+
46+
.. code:: bash
47+
:caption: **Configure recommended git options only for the repository**
48+
49+
git config branch.autosetuprebase remote
50+
51+
.. code:: bash
52+
:caption: **Install hooks and git commit template**
53+
54+
mkdir -p .git/hooks && \
55+
cp Build/git-hooks/commit-msg .git/hooks/commit-msg && \
56+
cp Build/git-hooks/unix+mac/pre-commit .git/hooks/ && \
57+
chmod +x .git/hooks/commit-msg && \
58+
chmod +x .git/hooks/pre-commit && \
59+
{
60+
echo '[BUGFIX|TASK|FEATURE|DOCS]'
61+
echo ''
62+
echo 'Resolves: #'
63+
echo 'Releases: main'
64+
} > $HOME/.gitmessage-typo3.txt && \
65+
git config commit.template $HOME/.gitmessage-typo3.txt

0 commit comments

Comments
 (0)