Cleanup tasks

Cleanup git repository

Before Cherry-picking a patch or starting a new patch:

Reset local repository
Build/Scripts/runTests.sh -s clean && \
    git fetch --all && \
    git reset --hard origin/main && \
    git pull --rebase
Copied!

Cleanup TYPO3 installation

After downloading a new patch or making changes to an existing patch, you may need to cleanup your TYPO3 installation.

It depends on the files that have changed, what you need to execute. In any case or if in doubt, you can safely perform all steps.

Flush the cache:
ddev typo3 cache:flush && \
    ddev typo3 cache:warmup
Copied!
Changes in composer.json:
Build/Scripts/runTests.sh -s composerInstall
Copied!

Changes in .css / .js files:

Delete browser cache or hard refresh (e.g. CTRL + F5)

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

./Build/Scripts/runTests.sh -s buildCss && \
    ./Build/Scripts/runTests.sh -s buildJavascript
Copied!

Changes in DB schema (ext_tables.sql):

Create missing tables and fields
ddev typo3 extension:setup
Copied!

Maintenance: Analyze Database Structure, Apply selected changes.

Update core-testing docker images

Pull latest core-testing images versions
./Build/Scripts/runTests.sh -u
Copied!

One-liner command

If you want to reset your local installation in one go, you could use the following one-liner command, combining the mentioned parts from above:

Reset local repository to upstream state
./Build/Scripts/runTests.sh -u && \
    Build/Scripts/runTests.sh -s clean && \
    git fetch --all && \
    git reset --hard origin/main && \
    git pull --rebase && \
    ./Build/Scripts/runTests.sh composerInstall && \
    ddev typo3 cache:flush && \
    ddev typo3 cache:warmup && \
    ddev typo3 extension:setup
Copied!