TYPO3 / coding-standards

TYPO3 Coding Standards to be used by TYPO3 projects or extensions
MIT License
52 stars 16 forks source link

Initial setup of typo3-coding-standards fails because of missing but provided option parameter #64

Closed Moongazer closed 1 year ago

Moongazer commented 1 year ago

Is there an existing issue for this?

Operating System

DDEV with Debian GNU/Linux 11 (bullseye)

Composer version

2.4.1

PHP version

8.0.21

TYPO3 Coding Standards Package version

Latest stable release

Additional version information

TYPO3 v11.5.17

Current Behavior

We try to setup typo3-coding-standards for our TYPO3 v11 project. After installing the package via composer, the docs says we should run the command composer exec typo3-coding-standards setup project. But it fails with

dev@project-web:/var/www/html$ composer exec -- typo3-coding-standards setup project
You need to specify at least one option. Use 'extension' or 'project'.
Script typo3-coding-standards handling the __exec_command event returned with error code 1

Also none of these variants work (same error):

composer exec -- typo3-coding-standards setup project
composer exec -- typo3-coding-standards setup=project
composer exec typo3-coding-standards setup
composer exec -- typo3-coding-standards setup
composer exec typo3-coding-standards
composer exec -- typo3-coding-standards

Expected Behavior

Initial setup like described in docs.

Steps To Reproduce

No response

Anything else?

After debugging we found the solution: it seems the README descriptions are outdated. We was able to setup the project with this command:

// leaving away the option "setup" works:
composer exec -- typo3-coding-standards project

But the option --force does not work either, so the docs needing some updates.

gilbertsoft commented 1 year ago

Hi @Moongazer ,

it looks like you have used the instructions from the main branch and not the one delivered with your version. Can you please check if the instructions included with your version are fine? See also https://github.com/TYPO3/coding-standards/tree/v0.5.5#readme

Moongazer commented 1 year ago

Yes, possibly I've read the instructions at Github (main) but didn't check which version is installed (or if the instructions differs from the main repository descriptions). Sorry and thanks for pointing it out.