duster: Multiple errors when running duster
I just installed Duster for the first time in a Laravel 9 + PHP 8.2 app that already has some phpcs rules enforced, so it’s quite clean already. First of all phpcs gets through some of the code, but then crashes:
In MailableMethodsInBuild.php line 89:
Undefined property: PhpParser\Node\Stmt\Nop::$expr
format [--diff] [--only ONLY] [--] [<file or directory>]
It then goes on to run PHP_CodeSniffer tasks, but immediately dies again showing many errors and spewing random source snippets. Too many errors to post here, but it starts like this:
Linting using PHP_CodeSniffer
&& $i === $this->tokens[$i]['parenthesis_opener']
) {
$i = $this->tokens[$i]['parenthesis_closer'];
} else if (
In Runner.php line 608:
include(phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/squizlabs/php_codesniffer/src/Files/File.php): Failed to open stream: phar error: internal corr
uption of phar "/Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster" (crc32 mismatch on file "vendor/squizlabs/php_codesniffer/src/Files/File.php") in phar:///Users/marc
us/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/squizlabs/php_codesniffer/autoload.php on line 169
kens[$prev]['code'] === T_USE) {
return true;
}
}
}
While that crc mismatch suggests a corrupted file, these problems have persisted even after a composer reinstall '*'
. All this happens pretty much the same way with both lint
and fix
commands.
Any idea why this is breaking?
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 21 (11 by maintainers)
I’ve released a new version with the updated TLint, which should fix at least some of the issues noted here.
Hopefully, I’ll have a fix released tomorrow. Not sure it will fix all issues here, but it should fix issues with the mailable class.
@Synchro @bohlken34 do an update now, I just tagged 1.0.2.
Ok, thanks!
I haven’t been able to get this building with PHP Scoper. I do have a release coming where I remove a lot of dev dependencies, which may help.