Commands list

Below is a list of commands that you can use in the development process of ext:t3api.

ddev cache-flush

This command will run typo3 flush:cache for all active TYPO3 integration testing instances.

ddev ci [T3_VERSION|all] [PHP_VERSION] [lowest]

If called without any arguments, this command will run multiple commands for testing and linting.

  • ddev composer ci which will run:

    • ci:composer:normalize
    • ci:yaml:lint
    • ci:json:lint
    • ci:php:lint
    • ci:php:cs-fixer
    • ci:php:stan
    • ci:tests:unit
    • ci:tests:functional
    • ci:tests:postman
  • ddev docs ci which will check if docs can be rendered without problems.

If called with arguments like ddev ci [T3_VERSION] [PHP_VERSION] [lowest] this command will restart ddev, set required PHP, install required version of TYPO3 with optional composer option --prefer-lowest and then run ddev ci on it.

When the argument is only all, then this command will run matrix tests for all supported TYPO3, PHP, COMPOSER. The same command is run for each TYPO3, PHP, COMPOSER combination in matrix tests on github actions.

Examples:

ddev ci
ddev ci 12 8.3 lowest
ddev ci all
Copied!

You can use this command to fast switch with development to whatever TYPO3/PHP version you like because after ci tests it does not return to previous TYPO3/PHP.

ddev data [export|import] [T3_VERSION]

This command will export or import database/files of specific testing instance into folder .ddev/test/impexp/. It uses the TYPO3 core extension impexp. These exported files are later used by command ddev install [T3_VERSION]. When you do new features or write postman tests this is very likely that you will need to do changes to database/files and commit this state to git. This command is just for that reason.

All TYPO3 testing instances are using the same exported files. This means that there is no much difference if you make ddev data export 13 or ddev data export 12. Important is only that you do export from the testing instance you actually modified.

ddev docs [watch|build|ci]

build
will build docs into the folder Documentation-GENERATED-temp You can browse it for example on PHPStorm "open in browser" option.
watch
this command will run hot reload for documentation.
ci
this command will test if docs are able to render correctly. Used in ddev ci [T3_VERSION|all] [PHP_VERSION] [lowest] command.

ddev fix

This command will run all possible automate fixes. For now it makes PHP CS Fixer changes and composer normalisation.

ddev install [T3_VERSION|all]

This command will install specific (or all) integration testing instances of TYPO3 in folder /.test/. List of supported TYPO3 versions is defined in file .ddev/docker-compose.web.yaml in variable TYPO3_VERSIONS. Integration testing instances are available under url https://[T3_VERSION].t3api.ddev.site. You can also open https://t3api.ddev.site to see list of all supported testing instances for given t3api version.

Example:

ddev install
ddev install 12
ddev install all
Copied!

ddev next [major|minor|patch]

This command will help to tag next release of extension.

It does several checks. Amongst other it:

  1. Checks if you are on default branch.
  2. Checks if you are are up to date with remote default branch.
  3. Checks if you do not have any not pushed changes to remote.
  4. Checks validity of last tag.
  5. Increase version in few files:

    • /ext_emconf.php
    • /Documentation/guides.xml

After all checks it outputs a command you need to run to push changes and tag to git.

Example output:

git add Documentation/guides.xml ext_emconf.php && git commit -m 'Tag version 3.1.0' && git tag -a '3.1.0' -m 'Version 3.1.0' -s && git push origin main --tags
Copied!