Typo3 Console: 5.0.0 Release

Release date:
July 3, 2018
Previous version:
4.9.6 (released July 3, 2018)
Magnitude:
940 Diff Delta
Contributors:
2 total committers
Data confidence:
Commits:

Top Contributors in 5.0.0

helhum
mbrodala

Directory Browser for 5.0.0

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

General remarks

We're delighted to present the next generation of TYPO3 command line tooling. For TYPO3 Console 5.0 the complete application layer (how commands are found and executed) has been refactored to use Symfony Console.

This means TYPO3 Console 5.0 is faster, more consistent, more compatible and more future proof than ever before.

Features

  • TYPO3 Console can now show and execute native Symfony Commands, that are registered for a TYPO3 instance. This seemingly small change comes with a whole bunch of improvements:
    • Command controller commands are now on the fly converted to native Symfony console commands.
    • Every command has the option -h ahich shows the help for a command (e.g. use typo3cms cache:flush -h to see the help for the cache flush command).
    • Synopsis (short syntactical info for the command) is shown for commands if something goes wrong.
    • Also authors of new commands get full control over the command name.
    • It is even possible to define aliases for commands, which will make renaming commands much easier in the future.
    • You can now use abbreviated command names. Instead of typing ./typo3cms install:generatepackagestates, you can now also type ./typo3cms i:gen and Symfony will find the right command for you as long there is only one matching command.
    • If you still miss-type a command, you will see a list of commands that you probably meant to type.
    • If an exception occurs, you only see the exception message, unless you called the command with -v
    • -v[vv] option is now globally available to increase verbosity
    • Argument and option parsing is now all done by Symfony Console, which makes this part more robust and less error prone
  • When installing TYPO3 Console along with TYPO3 8.7 with Composer, you now only have one binary available for cli commands (previously you had typo3 and typo3cms). Since TYPO3 Console 5 has become a complete replacement for the TYPO3 built in command line layer, only typo3cms is left.
  • Of course TYPO3 Console is now also compatible with TYPO3 9.0.0 and PHP 7.2
  • A new command backend:createadmin was introduced, which allows to add admin users to a TYPO3 instance
  • Many TYPO3 Console commands (especially installing or upgrading TYPO3), call other commands in sub processes. It is now possible to pass a custom php.ini file to these processes, by setting the PHP_INI_PATH environment variable.

And many more cleanups, streamlining in the code base as well as the "UI" to make interacting with and creating new commands a more pleasant experience.

Breaking Changes

The good news here is, that the majority of commands will work just like before! Nevertheless some things needed to be changed in a way that could break current workflows, scripts or commands.

The most important change is, that PHP 5 and TYPO3 7.6 will not be supported with TYPO3 Console 5. If you need these, you can still use version 4.9.x, which is still maintained and will receive bugfixes, but no new features any more.

  • Functionality that has been deprecated before has been removed, most notably here: the dummy extension that was installed by default with composer is now gone. So no need to specify that in your composer.json any more
  • The setup type "dist" has been removed from install:setup
  • Support for the old dbal extension has been removed
  • Our own autocomplete implementation has been removed, because there are better implementations available which work for all Symfony Console applications, so now also for TYPO3 Console
  • The typo3 binary is not installed with Composer any more (you won't need it anyway when using TYPO3 Console)
  • The command database:export now calls mysqldump with option --single-transaction. This means if you need a consistent state of the dump, make sure all your tables use InnoDB engine (not MyIsam).

Deprecations

A few things are deprecated, which means they still work, but won't work any more in the next major release of TYPO3 Console.

  • Symfony has a clear distinction between arguments and options. TYPO3 Command controllers do not have that. Command method arguments can always be used as both, arguments or as options. In order to be consistent and integrate both in a better way, calling arguments with their option name or options as arguments are deprecated.

E.g. arguments as options: extension:activate --extension-keys foo,bar is deprecated. Use extension:activate foo,bar instead.

E.g. options as arguments: cache:flush 1 is deprecated. Use cache:flush --force instead

  • The commands extension:activate and extension:deactivate are deprecated when TYPO3 is Composer managed (Composer mode). Use install:generatepackagestates to generate the active list of extensions automatically from the composer installed extensions and then extension:setupactive to set all active extensions up in your TYPO3 instance.
  • The command extension:removeinactive is deprecated. Only install the extensions you need, instead of installing the code and removing it afterwards.
  • For install:setup the option --non-interactive is deprecated. Use the global option --no-interaction instead
  • For install:generatepackagestates the option --activate-default is deprecated for Composer managed TYPO3. Instead require the TYPO3 core extensions you need in your project using composer.
  • For scheduler:run the option --task-id is deprecated. Use --task instead.
  • To avoid naming conflicts, command controller commands optionally made available through their "full identifier" which is vendor:namespace:command. But commands were always callable with this full identifier. This is now still possible but deprecated. Command authors should avoid naming conflicts, or declare that their command replaces a previous command with the same name. If naming conflicts still occur however, the conflicting commands will still be prefixed with the vendor (the package name).

Further changes

The full change log can be examined on Github The extension can be found at the TER release page.