Giter VIP home page Giter VIP logo

Comments (8)

maks-rafalko avatar maks-rafalko commented on September 7, 2024 1

Released: https://github.com/infection/infection/releases/tag/0.29.5

from infection.

maks-rafalko avatar maks-rafalko commented on September 7, 2024

Hello!

It can be related to the recent changes in finding the root of the project, from here: #1978

  • is it working on 0.29.3?
  • could you please run infection with -vvv and past a detailed stack trace?
  • could you please show the command line, how you run Infection on CI with all the options / arguments?

Thank you.

from infection.

rolfdenhartog avatar rolfdenhartog commented on September 7, 2024

Thanks for the quick response! Quick answer: it is working on 0.29.3. I'll do the changed later this afternoon and come back with the results.

from infection.

rolfdenhartog avatar rolfdenhartog commented on September 7, 2024

The command we're using in Azure CI is:

php vendor/bin/infection --threads=4

from infection.

rolfdenhartog avatar rolfdenhartog commented on September 7, 2024

The output of the command with -vvv:

fatal: not a git repository (or any of the parent directories): .git

In ExecException.php line 9:
                                   
  [Safe\Exceptions\ExecException]  
  An error occured                 
                                   

Exception trace:
  at /home/vsts/work/1/s/vendor/thecodingmachine/safe/generated/Exceptions/ExecException.php:9
 Safe\Exceptions\ExecException::createFromPhpError() at /home/vsts/work/1/s/vendor/thecodingmachine/safe/generated/exec.php:119
 Safe\shell_exec() at /home/vsts/work/1/s/vendor/infection/infection/src/Command/RunCommand.php:446
 Infection\Command\RunCommand->createContainer() at /home/vsts/work/1/s/vendor/infection/infection/src/Command/RunCommand.php:383
 Infection\Command\RunCommand->executeCommand() at /home/vsts/work/1/s/vendor/infection/infection/src/Command/BaseCommand.php:75
 Infection\Command\BaseCommand->execute() at /home/vsts/work/1/s/vendor/symfony/console/Command/Command.php:326
 Symfony\Component\Console\Command\Command->run() at /home/vsts/work/1/s/vendor/symfony/console/Application.php:1078
 Symfony\Component\Console\Application->doRunCommand() at /home/vsts/work/1/s/vendor/symfony/console/Application.php:324
 Symfony\Component\Console\Application->doRun() at /home/vsts/work/1/s/vendor/symfony/console/Application.php:175
 Symfony\Component\Console\Application->run() at /home/vsts/work/1/s/vendor/infection/infection/bin/infection:85
 include() at /home/vsts/work/1/s/vendor/bin/infection:119

Using the new --logger-project-root-directory option:

php vendor/bin/infection --threads=4 -vvv --logger-project-root-directory=/home/vsts/work/1/s
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/e0ebfa6a-6eb1-48c7-bf4c-ed336580ec14.sh
[debug] Checking INFECTION_ALLOW_XDEBUG
[debug] The Xdebug extension is loaded (3.3.2) xdebug.mode=coverage
[debug] Process restarting (INFECTION_ALLOW_XDEBUG=internal|3.3.2|1|*|*)
[debug] Running: [/usr/bin/php8.3, vendor/bin/infection, --threads=4, -vvv, --logger-project-root-directory=/home/vsts/work/1/s]
[debug] Checking INFECTION_ALLOW_XDEBUG
[debug] Restarted (111 ms). The Xdebug extension is not loaded
...

The issue is solved using the new option! For Azure it's necessary to use the new option.

from infection.

maks-rafalko avatar maks-rafalko commented on September 7, 2024

Thanks, that helps. Could you please also past your infection.json5 config?

from infection.

sidz avatar sidz commented on September 7, 2024

git is not installed. Detailed issue reported #1981

from infection.

rolfdenhartog avatar rolfdenhartog commented on September 7, 2024

Thanks, that helps. Could you please also past your infection.json5 config?

Sure:

{
    "$schema": "vendor/infection/infection/resources/schema.json",
    "source": {
        "directories": [
            "src"
        ]
    },
    "logs": {
        "html": "tests/infection/infection.html"
    },
    "tmpDir": "var/tmp",
    "phpUnit": {
        "customPath": "vendor\/bin\/phpunit"
    },
    "mutators": {
        "@default": true,
        "global-ignore": [
            "App\\Infrastructure\\Database\\ProjectDatabaseConnectionFactory",
            "App\\UserInterface\\Controller\\LegacyController",
            "App\\UserInterface\\Kernel"
        ],
        "CastString": {
            ignoreSourceCodeByRegex: [
                ".*\\(string\\) \\\\preg_replace.*",
                ".*\\(string\\) \\$request.*"
            ]
        }
    }
}

from infection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.