Extension Kickstarter

The Extension Kickstarter (kickstarter) is a tool that helps you to quickly create your own TYPO3 extensions. It provides a basic framework and templates. It has been designed to help you work more productively. This tool comes with a set of commands that can be used to create different parts of an extension, such as controllers, models, repositories, services and configurations.

Using the provided commands, you can make your development workflow much more efficient by automating repetitive tasks, improving consistency, and following TYPO3 best practices. This makes it easier for both beginners and experienced developers to build strong and customised TYPO3 extensions efficiently.

To get started, read the sections below to learn how to install, configure, and use the extension effectively.

Installation

Explains how to install this extension in Composer-based and Classic TYPO3 installations.

Configuration

Learn how to configure this extension.

Commands

Learn which commands are available and how to use them.

FAQ

These questions have been frequently asked.

Installation

Install with Composer

Install the extension for development installations via Composer:

composer req friendsoftypo3/kickstarter --dev
Copied!

Install in Classic Mode

On non composer based TYPO3 installations you can install EXT:kickstarter still over the ExtensionManager:

  1. Login

    Login to backend of your TYPO3 installation as an administrator or system maintainer.

  2. Open ExtensionManager

    Click on Extensions from the left menu to open the ExtensionManager.

  3. Update Extensions

    Choose Get Extensions from the upper selectbox and click on the Update now button at the upper right.

  4. Install EXT:kickstarter

    Use the search field to find kickstarter. Choose the kickstarter line from the search result and click on the cloud icon to install kickstarter.

Next step

Configure Extension Kickstarter.

Configuration

In extension settings (Install Tool) you will find just one option:

exportDirectory

If empty, your created extensions will be exported to [TYPO3 temp. dir]/ext-kickstarter/* by default. I prefer to set this directory to packages/. That's the default import directory for local available packages.

This setting can not be set via CLI usage.

activateModule

EXT:kickstarter comes with a TYPO3 backend module to kickstart your extensions visually. Is this feature is not full featured and beta, this module is hidden by default. If you are really sure you want to experiment a bit, feel free to activate the module.

FAQ

Yes, no, maybe. There are some commands available which completely rewrite the existing PHP files. I have no clue, if this will work for any PHP class. Try it. Fail. Revert it ;-) But don't tell me that it is not working. Move the foreign extension into the configured export directory. I'm pretty sure for commands which just adds complete new files you will not get any error, but please be careful while adding further controller action methods or getter/setters for foreign domain model.

See chapter Configuration. By default a new extension will be exported to [TYPO3 Temp. Dir]/ext-kickstarter/*.

Sure, extension kickstarter will completely rewrite full PHP file, but in most cases it keeps existing code as it. It only adds new functionality and will never delete a method or modify existing methods. But yes, it may happen that some spaces or empty lines will be removed after rewriting a PHP file. Extension Kickstarter does not have any kind of configuration file where you can define what have to be overwritten or not like done in EXT:extension_builder. I prefer to backup your extension before you start modifying it with extension kickstarter.

Commands

The Extension Kickstarter comes with some various commands to create individual parts of your own TYPO3 extension. I prefer to execute the commands in listed ordering. As an example, you can create an extbase domain model, but as long as there is no TCA table and some columns defined you can not chose which column you want to get into your model.

All commands come with the same additional argument "extension key". It does not prevent the extension key question, but it will be provided as default value. I can not remove that question, because I have to check for correct extension key spelling before.

make:extension

This is the first command you should execute. It will ask you various questions about extension key, author, company, email, autoloader and some more. For most questions I tried to build some good defaults which you can take over by pressing ENTER.

vendor/bin/typo3 make:extension
Copied!

make:repository

This command will create a new Extbase Repository. You will find the new file in directory Classes/Domain/Repository/*. If you just enter "blog" as repository classname it will throw an error, but it asks you for classname again with correct classname BlogRepository as default.

vendor/bin/typo3 make:repository
Copied!

make:controller

With one of the first questions this command will ask you to build an Extbase Controller or a native TYPO3 controller (useful for userFunc usage).

You will find the new file in directory Classes/Controller/*. If you just enter "blog" as controller classname it will throw an error, but it asks you for classname again with correct classname BlogController as default.

Later on you can add one or more controller action methods. If you just enter "show", it will fail, but asks you again with "showAction" as default.

Maybe in future I provide a possibility to "inject" repositories which are available in your extension. That's why "make:repository" is listed this command.

vendor/bin/typo3 make:controller
Copied!

make:plugin

With one of the first questions this command will ask you to build an Extbase Plugin or a native TYPO3 plugin (useful for TypoScript usage).

This command will update ext_localconf.php and also tt_content.php.

Currently, you have to add extbase controller and its actions manually. This feature is already on my list <https://github.com/froemken/ext-kickstarter/issues/14>.

vendor/bin/typo3 make:plugin
Copied!

make:table

This command will create the TCA table and its columns.

You will find the new file in directory Configuration/TCA/*. If you just enter "blog" as table name it will ask you, if you want to create table tx_yourext_domain_model_blog instead. If you chose "no" here, it will create table name blog.

Last question is a loop where you can add one or more columns. I supply all official TCA types as a choice. I use a modified version of the Schema API to build the SQL definition for ext_tables.sql.

vendor/bin/typo3 make:table
Copied!

make:model

This command will create a new Extbase Domain Model.

You will find the new file in directory Classes/Domain/Model/*. It will ask you for mapped table name. That's why it was important to execute "make:table" first. The expected table name is available as default value.

Last question is a loop where you can map one or more TCA columns to model properties. Extension Kickstarter will automatically lowerCamelCase the table column for you.

vendor/bin/typo3 make:model
Copied!

make:command

This command will create a new Console Command (CLI) class.

See the official documentation for more information on Console commands (CLI).

You will find the new file in directory Classes/Command/*.

vendor/bin/typo3 make:command
Copied!

make:event

This command will create a new Event PHP class.

You will find the new file in directory Classes/Event/*.

vendor/bin/typo3 make:event
Copied!

make:eventlistener

This command will create a new EventListener PHP class.

You will find the new file in directory Classes/EventListener/*.

Please update the used Event classname on your own.

vendor/bin/typo3 make:eventlistener
Copied!

make:typeconverter

This command will create a new Extbase TypeConverter PHP class.

You will find the new file in directory Classes/Property/TypeConverter/*.

Currently you have to register this class in "Services.yaml" on your own. But I have that on my list <https://github.com/froemken/ext-kickstarter/issues/10>.

vendor/bin/typo3 make:typeconverter
Copied!

make:testenv

This command will add TYPO3 testing environment to your extension.

You will find the new files in directory Build/*.

vendor/bin/typo3 make:testenv
Copied!

make:upgrade

This command will create a new Upgrade Wizard PHP class.

You will find the new file in directory Classes/Upgrade/*.

vendor/bin/typo3 make:upgrade
Copied!

make:applycgl

This command enforces TYPO3 Coding Guidelines (CGL) on your extension code by applying PHP CS Fixer rules. Since it's not PhpParser's responsibility to generate source code in a specific format like PSR, this command provides an additional step to ensure your code follows TYPO3's coding standards.

Requirements

  • TYPO3 must be running in Composer mode
  • PHP function exec must be available
  • php-cs-fixer must be installed

The command will process the following directories if they exist in your extension:

  • Classes/
  • Configuration/
  • Tests/

Usage

vendor/bin/typo3 make:applycgl
Copied!

The command will:

  1. Verify that all requirements are met
  2. Locate the php-cs-fixer binary and configuration
  3. Apply TYPO3 coding guidelines to all applicable files in your extension
  4. Display the results of the formatting process

Note: The command uses a predefined configuration file located at EXT:kickstarter/Build/cgl/.php-cs-fixer.dist.php

Where to get help

You can get help in the TYPO3 Slack. Currently, there is no independent Slack channel for this extension available. I prefer using #extension-builder for now.

Report Issues

You can report issues at GitHub.