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

Setting up the TYPO3 ruleset to extension failed #35

Closed
1 task done
vaxul opened this issue Jul 18, 2022 · 1 comment · Fixed by #42
Closed
1 task done

Setting up the TYPO3 ruleset to extension failed #35

vaxul opened this issue Jul 18, 2022 · 1 comment · Fixed by #42
Assignees
Labels
bug Something isn't working

Comments

@vaxul
Copy link

vaxul commented Jul 18, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Operating System

WSL Ubuntu-20.04

Composer version

2.3.10

PHP version

8.0.21

TYPO3 Coding Standards Package version

Main branch

Additional version information

The latest Composer and PHP 8.0 version is installed.

Current Behavior

If I try to run composer exec typo3-coding-standards extension, I get the following errors:

A .editorconfig file already exists in your main folder, but the -f option was not set. Nothing copied.
A .php-cs-fixer.dist.php file already exists in your main folder, but the -f option was not set. Nothing copied.

If I try the -f option, I get the error:

The "-f" option does not exist.

Workaround

If I delete the .editorconfig and .php-cs-fixer.php/.php-cs-fixer.dist.php files, I can run the script, but only a .php-cs-fixer.dist.php is created. The file itself looks a expected (without the file header config).

Expected Behavior

The switch of the ruleset should work as documented.

Steps To Reproduce

  1. I cloned the project within the Windows WSL machine, inside the Linux
  2. run composer install
  3. and try composer exec typo3-coding-standards extension

Anything else?

image

If I installed it with composer req --dev typo3/coding-standards, I get no errors, since the files are missing initially.

So maybe the only issue is, that the documented -f option is missing?

@vaxul vaxul added the bug Something isn't working label Jul 18, 2022
@gilbertsoft
Copy link
Collaborator

gilbertsoft commented Aug 2, 2022

Hey @vaxul , thanks for your report. The problem is a wrong usage, try composer exec -- typo3-coding-standards extension -f which should work properly. If you omit the -- Composer uses the -f option for the exec command which of course does not have this option and is not what you want. It is mentioned on the last line of your screenshot above by the way and normal behavior for Symfony console apps.

gilbertsoft referenced this issue in gilbertsoft/typo3-coding-standards Aug 2, 2022
gilbertsoft added a commit that referenced this issue Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants