From local to global: publishing TYPO3 extensions professionally

Fortunately, the days of manually uploading .t3x files to the TER (TYPO3 Extension Repository) are over. The modern standard is Composer. Here we describe the workflow to deploy your extension cleanly to github and packagist so that it can be easily loaded and installed via Composer.

1. preparation: The composer.json

So that Packagist and TYPO3 know what to do with your code, a correct composer.json in the root directory of your extension is essential. For modern installations (TYPO3 v13 & v14) we rely on PHP 8.3+ and current standards.

 

{
    "name": "rmsstuttgart/rms-ai-search",
    "type": "typo3-cms-extension",
    "description": "AI Search extension for TYPO3 - connect your TYPO3 to chat.rm-solutions.de/",
    "license": "GPL-2.0-or-later",
    "authors": [
        {
            "name": "Michael Kettel",
            "role": "Developer",
            "homepage": "https://rm-solutions.de"
        }
    ],
    "config": {
        "allow-plugins": {
            "typo3/cms-composer-installers": true,
            "typo3/class-alias-loader": true
        }
    },
    "require": {
        "php": "^8.3",
        "typo3/cms-core": "^12.4 || ^13.4 || ^14.0"
    },
    "require-dev": {
        "phpstan/phpstan": "^1.10",
        "typo3/coding-standards": "^0.8",
        "ssch/typo3-rector": "^2.15"
    },
    "autoload": {
        "psr-4": {
            "Rmsstuttgart\\RmsAiSearch\\": "Classes/"
        }
    },
    "extra": {
        "typo3/cms": {
            "extension-key": "rms_ai_search"
        }
    }
}

 

2 GitHub Deployment

Create a new public repository on GitHub and push your code there. Clean versioning is key here.

 

git init
git add .
git commit -m "Initial commit: Support for TYPO3 v13 and v14"
git branch -M main
git remote add origin github.com/nutzername/my-extension.git
git push -u origin main

 

3. packagist registration

In order for users to find your extension via composer require, you need to register it on Packagist.org.

  1. Log in to Packagist (preferably via GitHub login).
  2. Click on the Submit button.
  3. Enter the GitHub URL of your repository.
  4. Click on Check and after validation on Submit.

4. automation via webhook

We set up automatic synchronization so that Packagist knows immediately when you publish a new version (a new tag). This prevents you from having to manually click "Update" on Packagist after each release.

The way via the GitHub webhook:

  • On Packagist, go to your profile > Show API Token. Copy this token.
  • Go to your GitHub repository > Settings > Webhooks.
  • Click on Add webhook.
  • Payload URL: packagist.org/api/github
  • Content type: application/json
  • Secret: Your Packagist API token.
  • Select "Just the push event" (Packagist automatically filters out relevant tags).
  • Add webhook.

As soon as you create and push a Git tag, Packagist will be updated within seconds:

 

git tag 1.0.0
git push origin --tags

 

5. installation of the extension

Once everything is set up, users (or you yourself in a test project) can simply install the extension. Composer automatically takes care of the correct placement in the TYPO3 system thanks to the type typo3-cms-extension:

composer require rmsstuttgart/rms-ai-search