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

Groups definition in (global) config lead to warning "Array to string conversion" in Run.php line 592. #6673

Open
tzimpel opened this issue Jun 20, 2023 · 1 comment

Comments

@tzimpel
Copy link

tzimpel commented Jun 20, 2023

What are you trying to achieve?

Use a global groups definition, as defined at https://codeception.com/docs/Customization#Group-Files.

This is required in order for infection/infection to work with codeception.

What do you get instead?

Provide console output if related. Use -vvv mode for more details.

In Run.php line 592:
                                         
  [PHPUnit\Framework\Error\Warning (2)]  
  Array to string conversion             
                                         

Exception trace:
  at /data/vendor/codeception/codeception/src/Codeception/Command/Run.php:592
 Codeception\Subscriber\ErrorHandler->errorHandler() at /data/vendor/codeception/codeception/src/Codeception/Command/Run.php:592
 Codeception\Command\Run->Codeception\Command\{closure}() at n/a:n/a
 array_map() at /data/vendor/codeception/codeception/src/Codeception/Command/Run.php:592
 Codeception\Command\Run->runIncludedSuites() at /data/vendor/codeception/codeception/src/Codeception/Command/Run.php:487
 Codeception\Command\Run->execute() at /data/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at /data/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at /data/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at /data/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /data/vendor/codeception/codeception/src/Codeception/Application.php:112
 Codeception\Application->run() at /data/vendor/codeception/codeception/app.php:45
 {closure}() at /data/vendor/codeception/codeception/app.php:46
 require() at /data/vendor/codeception/codeception/codecept:7
 include() at /data/vendor/bin/codecept:120

Provide test source code if related

1. Groups definition in config:

codeception.yml

groups:
  infection: [path/to/SomeTest.php]

Run codecept run -g infection

2. Overwrite when calling codecept run (this is what infection/infection does)

Run codecept run -g infection -o "groups: infection: [path/to/SomeTest.php]"

Details

  • Codeception version: v5.0.10
  • PHP Version: 8.1.18
  • Operating System: Alpine Linux 3.17.3 (docker container)
  • Installation type: Composer
  • List of installed packages

installed-packages.txt

  • Suite configuration:
irrelevant
@tzimpel
Copy link
Author

tzimpel commented Aug 7, 2023

Hey there!

Are there any updates regarding this issue?

Best regards

Tobias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant