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
Call to undefined method Composer\XdebugHandler\XdebugHandler::isXdebugActive #1677
Comments
As I remember, we had different issues with generated PHAR and PHP 7.4, like this one #1573 (which hasn't been fixed and won't be).
|
Just tried to use that as a composer package, but that does not work, too:
Using PHP 8.0 does also not work as expected:
I also tried to use a PHP 8.0 image and install |
I am seeing this on the latest release with PHP 8.1 as well:
|
@deviantintegral I've just created an empty repository with only Could you please create a minimal reproducible repository? Thank you. |
It looks like this is caused by projects having
I'm surprised by this, because I thought the point of the phar version was to avoid such dependency issues. I figured this out because I've since upgraded #!/bin/bash
git clone https://github.com/deviantintegral/har.git
cd har
git checkout c839755e # Last commit before php-cs-fixer was upgraded.
composer install
echo "================"
echo "Show that phpunit tests work with coverage..."
echo "================"
XDEBUG_MODE=coverage vendor/bin/phpunit
echo "================"
echo "Run with infection..."
echo "================"
wget https://github.com/infection/infection/releases/download/0.26.13/infection.phar
chmod +x infection.phar
cat >infection.json <<EOD
{
"\$schema": "https://raw.githubusercontent.com/infection/infection/0.26.13/resources/schema.json",
"source": {
"directories": [
"src"
]
},
"mutators": {
"@default": true
}
}
EOD
./infection.phar
echo "================"
echo "Show current xdebug-handler dependency..."
echo "================"
composer why composer/xdebug-handler
echo "================"
echo "Upgrade php-cs-fixer..."
echo "================"
composer require -W --dev friendsofphp/php-cs-fixer:^3
echo "================"
echo "Rerun infection..."
echo "================"
./infection.phar -j8 |
Thank you for all the details @deviantintegral, fixed in master |
infection.phar --version
)I originally posted this already as a comment on this PR, but I think it's better to have that as a separate issue, so here we go:
I'm getting an error since #1518 was merged and released (in
0.25.4
):My
Dockerfile
looks like this:The same behavior occurs in all future releases after 0.25.4.
I've extracted the phar and checked how that looks inside:
Am I doing something wrong?
phpunit.xml
Output with issue
How I execute infection
I build the docker image first in the directory where my
Dockerfile
is, like so:After that I run infection like this:
The text was updated successfully, but these errors were encountered: