Search by

sourcebroker / deployer-extended-typo3

sourcebroker

Customisation for `sourcebroker/deployer-typo3-*` stack

Package info

github.com/sourcebroker/deployer-extended-typo3

pkg:composer/sourcebroker/deployer-extended-typo3

Statistics

Installs: 233 688

Dependents: 1

Suggesters: 0

Stars: 38

Open Issues: 0

26.0.0 2026-11-22 11:14 UTC

README

Packagist Version License: MIT Deployer 7 | 8

Note

This package is a working example (successfully used in a mid-sized agency) that shows how you can use different sourcebroker/deployer-* packages together. If you like the workflow provided here, feel free to use it as-is in your own projects.

However, it's often a better idea to create your own package so it fits your needs perfectly. You can combine different sourcebroker/deployer-* base packages to build your own high customized, agency-level solution.

An example of such a custom solution, built on top of sourcebroker/deployer-* packages, but adding their own improvements and adaptations is: liquidlight/deployer-typo3-ci

What does it do?

This package combine different sourcebroker/deployer-* base packages and adds some very high level customizations, you can call it agency-level customizations.

  1. sourcebroker/deployer-typo3-deploy - TYPO3 deploy process at local level
  2. sourcebroker/deployer-typo3-deploy-ci - TYPO3 deploy process at CI level (gitlab for now only)
  3. sourcebroker/deployer-typo3-database - TYPO3 preconfigured synchronization of databases between multiple instances
  4. sourcebroker/deployer-typo3-media - TYPO3 preconfigured synchronization of media between multiple instances

Installation

  1. Install package with composer:

    composer require sourcebroker/deployer-extended-typo3
  2. Put the following lines at the beginning of your deploy.php. You can decide which packages/functionality you want to use. For example remove the line ['get' => 'sourcebroker/deployer-typo3-database'], and there will be no tasks for database sync - you can replace it with your own tasks for database update. The same for ['get' => 'sourcebroker/deployer-typo3-media'] - maybe you prefer to use https://packagist.org/packages/ichhabrecht/filefill. Another example: if you choose to deploy using CI, use ['get' => sourcebroker/deployer-typo3-deploy-ci] instead of ['get' => sourcebroker/deployer-typo3-deploy]. Each package is completely independent, use only those you need.

    <?php
    
    require_once('./vendor/autoload.php');
    
    new \SourceBroker\DeployerLoader\Load([
        ['get' => 'sourcebroker/deployer-typo3-media'],
        ['get' => 'sourcebroker/deployer-typo3-database'],
        ['get' => 'sourcebroker/deployer-typo3-deploy'],
        ['get' => 'sourcebroker/deployer-extended-typo3'],
    ]);
  3. If you want to use database synchronization, please read the documentation at sourcebroker/deployer-typo3-database.

  4. If you want to use media synchronization, please read the documentation at sourcebroker/deployer-typo3-media.

Example of working configuration

CLI deploy (local)

This is an example of working configuration for TYPO3 13. The aim of sourcebroker/deployer-extended-typo3 is to have a very slim deploy.php file for easy upgrades to future versions.

<?php

namespace Deployer;

require_once('./vendor/autoload.php');

new \SourceBroker\DeployerLoader\Load([
    ['get' => 'sourcebroker/deployer-typo3-media'],
    ['get' => 'sourcebroker/deployer-typo3-database'],
    ['get' => 'sourcebroker/deployer-typo3-deploy'],
    ['get' => 'sourcebroker/deployer-extended-typo3'],
]);

set('repository', 'git@github.com:sourcebrokergit/t3base13.git');

host('production')
  ->setHostname('vm-dev.example.com')
  ->setRemoteUser('deploy')
  ->set('branch', 'main')
  ->set('public_urls', ['https://t3base13.example.com'])
  ->set('deploy_path', '~/t3base13/production');

host('staging')
  ->setHostname('vm-dev.example.com')
  ->setRemoteUser('deploy')
  ->set('branch', 'develop')
  ->set('public_urls', ['https://staging-t3base13.example.com'])
  ->set('deploy_path', '~/t3base13/staging');

GitLab CI deploy

Note

Deploy is from CI level, but database and media sync in below example still require SSH access from your local computer!

<?php

namespace Deployer;

require_once('./vendor/autoload.php');

new \SourceBroker\DeployerLoader\Load([
    ['get' => 'sourcebroker/deployer-typo3-media'],
    ['get' => 'sourcebroker/deployer-typo3-database'],
    ['get' => 'sourcebroker/deployer-typo3-deploy-ci'],
    ['get' => 'sourcebroker/deployer-extended-typo3'],
]);

host('production')
  ->setHostname('vm-dev.example.com')
  ->setRemoteUser('deploy')
  ->set('public_urls', ['https://t3base13.example.com'])
  ->set('deploy_path', '~/t3base13/production');

host('staging')
  ->setHostname('vm-dev.example.com')
  ->setRemoteUser('deploy')
  ->set('public_urls', ['https://staging-t3base13.example.com'])
  ->set('deploy_path', '~/t3base13/staging');

Database: additional ignored tables and per instance SQL

This package extends ignore_tables_out of database_default (from sourcebroker/deployer-typo3-database) with sys_history, sys_log, tx_powermail_domain_model_mail and tx_powermail_domain_model_answer by setting db_databases_overwrite_global. In your deploy.php:

  • To change something for all instances extend db_databases_overwrite_global. Do not set() it with a new array, as this removes the tables added here. Do not use add(), it fails on nested lists.
  • To change something for one instance set db_databases_overwrite on its host. Typical use is post_sql_in, executed after the database is imported into that instance (e.g. dep db:pull live run on it, or dep db:copy live --options=target:staging).
// all instances: add one more table to ignore_tables_out
$dbDatabasesOverwriteGlobal = get('db_databases_overwrite_global', []);
$dbDatabasesOverwriteGlobal['database_default'][0]['ignore_tables_out'][] = 'tx_my_table';
set('db_databases_overwrite_global', $dbDatabasesOverwriteGlobal);

// one instance: SQL executed after the database is imported into "staging"
host('staging')
    // ...
    ->set('db_databases_overwrite', [
        'database_default' => [
            [
                'post_sql_in' => '
                    UPDATE tx_myext_table SET field = "value" WHERE uid = 1;
                ',
            ],
        ],
    ]);

Mind the inner array ([ ... ]) around the config. Lists like ignore_tables_out are extended (values can not be removed), strings like post_sql_in are replaced (host level wins). Full explanation in deployer-extended-database.

Changelog

See CHANGELOG.md