Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!!![TASK] Remove typo3cms binary #1115

Merged
merged 1 commit into from
Feb 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To achieve this, you need to acquire the TYPO3 Console source code:
You can run the test suite by executing `ddev exec vendor/bin/phpunit`.

Before you submit a pull request with a new or changed command,
make sure you run `ddev exec ./typo3cms commandreference:render` beforehand
make sure you run `ddev exec vendor/bin/typo3 commandreference:render` beforehand
and include the changes in the PR

Contributing policy
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A clear and concise description of what you expected to happen.

**TYPO3 Console command executed**
```
typo3cms command:name --option argument
typo3 command:name --option argument
```

**TYPO3 Console command output**
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@ jobs:
- name: Test Command Reference
if: matrix.os == 'ubuntu-latest' && !matrix.experimental
run: |
./typo3cms commandreference:render
vendor/bin/typo3 commandreference:render
git diff --exit-code

- name: Test Install (Unix)
if: matrix.os == 'ubuntu-latest' && !matrix.experimental
run: 'php ./typo3cms install:setup --install-steps-config=Tests/Console/Functional/Fixtures/Install/mysql-install.yaml --no-interaction -vvv'
run: 'php vendor/bin/typo3 install:setup --install-steps-config=Tests/Console/Functional/Fixtures/Install/mysql-install.yaml --no-interaction -vvv'

- name: Test Install (Windows)
if: matrix.os == 'windows-latest' && !matrix.experimental
run: 'php ./typo3cms install:setup --install-steps-config=Tests/Console/Functional/Fixtures/Install/sqlite-install.yaml --no-interaction -vvv'
run: 'php vendor/bin/typo3 install:setup --install-steps-config=Tests/Console/Functional/Fixtures/Install/sqlite-install.yaml --no-interaction -vvv'

- name: Test
if: matrix.os == 'ubuntu-latest' && !matrix.experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function configure()
<<<'EOH'
Shows local configuration option value by path.
Shows the value which is stored in LocalConfiguration.php.
Note that this value could be overridden. Use <code>typo3cms configuration:show <path></code> to see if this is the case.
Note that this value could be overridden. Use <code>typo3 configuration:show <path></code> to see if this is the case.

<b>Example:</b>

Expand Down
2 changes: 1 addition & 1 deletion Classes/Console/Command/Database/DatabaseImportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function configure()

<b>Example (import):</b>

<code>ssh remote.server '/path/to/typo3cms database:export' | %command.full_name%</code>
<code>ssh remote.server '/path/to/typo3 database:export' | %command.full_name%</code>

<b>Example (select):</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ protected function configure()
Automatically create files and folders, required for a TYPO3 installation.

This command creates the required folder structure needed for TYPO3 including extensions.
It is recommended to be executed <b>after</b> executing
<code>typo3cms install:generatepackagestates</code>, to ensure proper generation of
required folders for all active extensions.
EOH
);
}
Expand Down
3 changes: 2 additions & 1 deletion Classes/Console/Mvc/Cli/CommandDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ private function __construct(array $commandLinePrefix, array $environmentVars =
*/
public static function createFromComposerRun(...$arguments): self
{
throw new \RuntimeException('Currently not implemented', 1677436170);
if (isset($arguments[0]) && $arguments[0] instanceof ScriptEvent) {
// Calling createFromComposerRun with ScriptEvent as first argument is deprecated and will be removed with 6.0
array_shift($arguments);
Expand Down Expand Up @@ -114,7 +115,7 @@ public static function createFromTestRun($typo3CommandPath = null): self
if (!isset($_SERVER['argv'][0]) || strpos($_SERVER['argv'][0], 'phpunit') === false) {
throw new RuntimeException(sprintf('Tried to create %s command runner from wrong context', Application::COMMAND_NAME), 1493570522);
}
$typo3CommandPath = $typo3CommandPath ?: dirname(__DIR__, 4) . '/' . Application::COMMAND_NAME;
$typo3CommandPath = $typo3CommandPath ?? dirname(__DIR__, 4) . '/' . Application::COMMAND_NAME;

return self::create($typo3CommandPath);
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Console/Mvc/Cli/Symfony/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
class Application extends BaseApplication
{
const TYPO3_CONSOLE_VERSION = '7.1.6';
const COMMAND_NAME = 'typo3cms';
const COMMAND_NAME = 'typo3';

/**
* @var RunLevel
Expand Down
10 changes: 1 addition & 9 deletions Documentation/AdministratorManual/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ just issue the following Composer command in your project root directory::

composer require helhum/typo3-console

The `typo3cms` binary will be installed by Composer in the specified bin-dir
(by default `vendor/bin`).

In case you are unsure how to create a Composer based TYPO3 project, you can
check out this `TYPO3 distribution
<https://github.com/helhum/TYPO3-Distribution>`_, which already provides TYPO3
Expand All @@ -52,11 +49,6 @@ For the extension to work, it **must** be installed in the `typo3conf/ext/`
directory **not** in any other possible extension location. This is the default
location when downloading it from TER with the Extension Manager.

The `typo3cms` script will be copied to your TYPO3 root directory, when you
activate it. When you symlink the `typo3cms` script to a location of your
preference, TYPO3 Console will work, even when it is not marked as active in
the Extension Manager.



Shell auto complete
Expand All @@ -68,7 +60,7 @@ Install the package and make the binary available in your path. Please read the
installation instructions of this package on how to do that.

To temporary activate auto complete in the current shell session, type `eval
"$(symfony-autocomplete --aliases=typo3cms)"` You can also put this into your
"$(symfony-autocomplete --aliases=typo3)"` You can also put this into your
`.profile` or `.bashrc` file to have it always available. Auto completion is
then always dynamic and reflects the commands you have available in your TYPO3
installation.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/CommandReference/CacheFlushtags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Flushes caches by tags, optionally only caches in specified groups.

.. code-block:: shell

typo3cms cache:flushtags news_123 --groups pages,all
typo3 cache:flushtags news_123 --groups pages,all


Arguments
Expand Down
2 changes: 1 addition & 1 deletion Documentation/CommandReference/ConfigurationRemove.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ LocalConfiguration.php and not be overridden elsewhere.

.. code-block:: shell

typo3cms configuration:remove DB,EXT/EXTCONF/realurl
typo3 configuration:remove DB,EXT/EXTCONF/realurl


Arguments
Expand Down
8 changes: 4 additions & 4 deletions Documentation/CommandReference/ConfigurationSet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ Set system configuration option value by path.

.. code-block:: shell

typo3cms configuration:set SYS/fileCreateMask 0664
typo3 configuration:set SYS/fileCreateMask 0664


.. code-block:: shell

typo3cms configuration:set EXTCONF/processor_enabled true --json
typo3 configuration:set EXTCONF/processor_enabled true --json


.. code-block:: shell

typo3cms configuration:set EXTCONF/lang/availableLanguages '["de", "fr"]' --json
typo3 configuration:set EXTCONF/lang/availableLanguages '["de", "fr"]' --json


.. code-block:: shell

typo3cms configuration:set configuration:set BE/adminOnly -- -1
typo3 configuration:set configuration:set BE/adminOnly -- -1


Arguments
Expand Down
2 changes: 1 addition & 1 deletion Documentation/CommandReference/ConfigurationShow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ the difference between these values is shown.

.. code-block:: shell

typo3cms configuration:show DB
typo3 configuration:show DB


Arguments
Expand Down
2 changes: 1 addition & 1 deletion Documentation/CommandReference/ConfigurationShowactive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Shows the configuration value that is currently effective, no matter where and h

.. code-block:: shell

typo3cms configuration:showactive DB --json
typo3 configuration:showactive DB --json


Arguments
Expand Down
4 changes: 2 additions & 2 deletions Documentation/CommandReference/ConfigurationShowlocal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ configuration:showlocal

Shows local configuration option value by path.
Shows the value which is stored in LocalConfiguration.php.
Note that this value could be overridden. Use `typo3cms configuration:show <path>` to see if this is the case.
Note that this value could be overridden. Use `typo3 configuration:show <path>` to see if this is the case.

**Example:**


.. code-block:: shell

typo3cms configuration:showlocal DB
typo3 configuration:showlocal DB


Arguments
Expand Down
4 changes: 2 additions & 2 deletions Documentation/CommandReference/DatabaseExport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Tables to be excluded from the export can be specified fully qualified or with w

.. code-block:: shell

typo3cms database:export -c Default -e 'cf_*' -e 'cache_*' -e '[bf]e_sessions' -e sys_log
typo3 database:export -c Default -e 'cf_*' -e 'cache_*' -e '[bf]e_sessions' -e sys_log



.. code-block:: shell

typo3cms database:export database:export -c Default -- --column-statistics=0
typo3 database:export database:export -c Default -- --column-statistics=0


Arguments
Expand Down
6 changes: 3 additions & 3 deletions Documentation/CommandReference/DatabaseImport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ This obviously only works when MySQL is used as DBMS.

.. code-block:: shell

ssh remote.server '/path/to/typo3cms database:export' | typo3cms database:import
ssh remote.server '/path/to/typo3 database:export' | typo3 database:import

**Example (select):**


.. code-block:: shell

echo 'SELECT username from be_users WHERE admin=1;' | typo3cms database:import
echo 'SELECT username from be_users WHERE admin=1;' | typo3 database:import

**Example (interactive):**


.. code-block:: shell

typo3cms database:import --interactive
typo3 database:import --interactive



Expand Down
6 changes: 3 additions & 3 deletions Documentation/CommandReference/DatabaseUpdateschema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ To avoid shell matching all types with wildcards should be quoted.

.. code-block:: shell

typo3cms database:updateschema "*.add,*.change"
typo3 database:updateschema "*.add,*.change"



.. code-block:: shell

typo3cms database:updateschema "*.add" --raw
typo3 database:updateschema "*.add" --raw



.. code-block:: shell

typo3cms database:updateschema "*" --verbose
typo3 database:updateschema "*" --verbose


Arguments
Expand Down
6 changes: 3 additions & 3 deletions Documentation/CommandReference/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Command Reference

.. note::

This reference uses `typo3cms` as the command to invoke. If you are on
Windows, this will probably not work, there you need to use `typo3cms.bat`
instead. In Composer based installations, the `typo3cms` binary will be
This reference uses `typo3` as the command to invoke. If you are on
Windows, this will probably not work, there you need to use `typo3.bat`
instead. In Composer based installations, the `typo3` binary will be
located in the binary directory specified in the root composer.json (by
default `vendor/bin`)

Expand Down
3 changes: 0 additions & 3 deletions Documentation/CommandReference/InstallFixfolderstructure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ install:fixfolderstructure
Automatically create files and folders, required for a TYPO3 installation.

This command creates the required folder structure needed for TYPO3 including extensions.
It is recommended to be executed **after** executing
`typo3cms install:generatepackagestates`, to ensure proper generation of
required folders for all active extensions.



Expand Down
12 changes: 6 additions & 6 deletions Documentation/CommandReference/UpgradeRun.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,32 @@ When no identifier is specified a select UI is presented to select a wizard out

.. code-block:: shell

typo3cms upgrade:run all
typo3 upgrade:run all


.. code-block:: shell

typo3cms upgrade:run all --confirm all
typo3 upgrade:run all --confirm all


.. code-block:: shell

typo3cms upgrade:run argon2iPasswordHashes --confirm all
typo3 upgrade:run argon2iPasswordHashes --confirm all


.. code-block:: shell

typo3cms upgrade:run all --confirm all --deny typo3DbLegacyExtension --deny funcExtension
typo3 upgrade:run all --confirm all --deny typo3DbLegacyExtension --deny funcExtension


.. code-block:: shell

typo3cms upgrade:run all --deny all
typo3 upgrade:run all --deny all


.. code-block:: shell

typo3cms upgrade:run all --no-interaction --deny all --confirm argon2iPasswordHashes
typo3 upgrade:run all --no-interaction --deny all --confirm argon2iPasswordHashes


Arguments
Expand Down
5 changes: 1 addition & 4 deletions Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ TYPO3 Console

----

TYPO3 Console provides a clean way to register commands and
a sane way to call these commands through a command line tool called `typo3cms`.

It ships many commands to execute TYPO3 actions, which otherwise would only be accessible via the TYPO3 backend.
TYPO3 Console ships many commands to execute TYPO3 actions, which otherwise would only be accessible via the TYPO3 backend.
This makes TYPO3 Console a perfect companion for development, deployment, Docker setups, continuous integration
workflows or anything else where automation is required or beneficial.

Expand Down
Loading