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 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 ciwhich will run:ci:composer: normalize ci:yaml: lint ci:json: lint ci:php: lint ci:php: cs- fixer ci:php: stan ci:php: rector ci:tests: unit ci:tests: functional ci:tests: postman
ddev docs ciwhich will check if docs can be rendered without problems.
If called with arguments like
ddev ci
this command will restart ddev, set required PHP, install required version of TYPO3
with optional composer option
-- 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 14 8.4 lowest
ddev ci all
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/. It uses the TYPO3 core extension impexp.
These exported files are later used by command
ddev install .
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 14
or
ddev data export 13
. 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-You can browse it for example on PHPStorm "open in browser" option.GENERATED- temp - 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 automated fixes: Rector, PHP CS Fixer and composer normalization.
ddev install [T3_VERSION|all]
This command will install specific (or all) integration testing instances
of TYPO3 in folder /.. List of supported TYPO3 versions is defined
in file .ddev/ in variable TYPO3_.
Integration testing instances are available under url https://.
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 14
ddev install all
ddev next [major|minor|patch]
This command helps to release the next version of the extension. The default branch can be protected (changes only through pull requests), so the version files are changed in a pull request and the command is run twice.
It does several checks first:
- Checks if you are on default branch.
- Checks if you are up to date with remote default branch.
- Checks if you do not have any not pushed changes to remote.
- Checks validity of last tag.
- Checks if the version in
/ext_emconf.phpis the last tag or the next version - otherwise you passed another version type than in the first run.
The next version is computed from the last tag, so both runs compute the same version.
First run updates the version in:
/ext_emconf.php/composer.json /Documentation/(guides. xml release- full version,version- major and minor)
and outputs a command which pushes them to a new branch:
zsh -e -c "git switch -c 'version-5.1.0'; git add Documentation/guides.xml ext_emconf.php composer.json; git commit -m 'Tag version 5.1.0'; git push -u origin 'version-5.1.0'"
Open a pull request from this branch to the default branch and merge it.
Second run - on the updated default branch (
git pull
), with the same version type. The version files are up
to date, so it outputs a command which pushes the tag only:
zsh -e -c "git tag -a '5.1.0' -m 'Version 5.1.0' -s; git push origin '5.1.0'"
Pushing the tag starts the release workflow (GitHub release and publishing to TER).
When the version files are already updated in the branch merged to the default branch (e.g. a release branch), the first run outputs the tag command right away.