tighten / duster

Automatic configuration for Laravel apps to apply Tighten's standard linting & code standards.
MIT License
493 stars 16 forks source link

Multiple errors when running duster #82

Closed Synchro closed 1 year ago

Synchro commented 1 year ago

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?

driftingly commented 1 year ago

Not sure, but there are a few things we can try.

Can you try running with the verbose flag:

vendor/bin/duster fix -vvv

I'm also wondering if there are conflicts. Does your project require any of the included tools in composer still - TLint, PHP_CodeSniffer, PHP CS Fixer, Pint? or nikic/php-parser.

I may need to isolate the Phar.

Synchro commented 1 year ago

I did have phpcs 3.7.2 installed already (but not the others), so I removed that, did a composer update, but the problem remains. With -vvv, I get more info. Just the first error here:

Box Requirements Checker
========================

> Using PHP 8.2.3
> PHP is using the following php.ini file:
  /opt/homebrew/etc/php/8.2/php.ini

> Checking Box requirements:
  ✔ The application requires the version "^8.0" or greater.
  ✔ The application requires the extension "zlib".

 [OK] Your system is ready to run the application.                                                                                                                                               

                                                                                       Linting using TLint                                                                                       
Lints for /Users/marcus/Sites/myapp/database/migrations/2023_02_02_084149_add_daily_inbound.php
============
! Prefer `Namespace\...` over `\Namespace\...`.
31 : `                    ->default(\App\Enums\LogisticsStatus::SCHEDULED->value);`

Lints for /Users/marcus/Sites/myapp/database/migrations/2020_03_09_073326_add_payment_fields.php
============
! Prefer `Namespace\...` over `\Namespace\...`.
18 : `                    ->default(\App\Models\User::PAYMENT_STATUS_UNSET)`
! Prefer `Namespace\...` over `\Namespace\...`.
50 : `                    ->default(\App\Models\User::PAYMENT_STATUS_NEW)`

Lints for /Users/marcus/Sites/myapp/database/migrations/2021_11_04_113626_add_extra_fields_to_vouchers.php
============
! Prefer `Namespace\...` over `\Namespace\...`.
15 : `                ->default(\App\Enums\VoucherType::percentage());`

In MailableMethodsInBuild.php line 29:

  [ErrorException]                                    
  Undefined property: PhpParser\Node\Stmt\Nop::$expr  

Exception trace:
  at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Linters/MailableMethodsInBuild.php:29
 Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:266
 Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Linters/MailableMethodsInBuild.php:29
 Tighten\TLint\Linters\MailableMethodsInBuild->Tighten\TLint\Linters\{closure}() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php:42
 PhpParser\NodeVisitor\FindingVisitor->enterNode() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:200
 PhpParser\NodeTraverser->traverseArray() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:114
 PhpParser\NodeTraverser->traverseNode() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:223
 PhpParser\NodeTraverser->traverseArray() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:114
 PhpParser\NodeTraverser->traverseNode() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:223
 PhpParser\NodeTraverser->traverseArray() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:91
 PhpParser\NodeTraverser->traverse() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/BaseLinter.php:37
 Tighten\TLint\BaseLinter->visitUsing() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/BaseLinter.php:44
 Tighten\TLint\BaseLinter->traverseAutomatically() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/BaseLinter.php:15
 Tighten\TLint\BaseLinter->lint() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/TLint.php:21
 Tighten\TLint\TLint->lint() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Commands/LintCommand.php:120
 Tighten\TLint\Commands\LintCommand->lintFile() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Commands/LintCommand.php:63
 Tighten\TLint\Commands\LintCommand->execute() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Command/Command.php:291
 Symfony\Component\Console\Command\Command->run() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:1014
 Symfony\Component\Console\Application->doRunCommand() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/app/Support/TLint.php:40
 App\Support\TLint->App\Support\{closure}() at n/a:n/a
 array_map() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/collections/Arr.php:560
 Illuminate\Support\Arr::map() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/collections/Collection.php:768
 Illuminate\Support\Collection->map() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/app/Support/TLint.php:37
 App\Support\TLint->process() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/app/Support/TLint.php:18
 App\Support\TLint->lint() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/app/Actions/Clean.php:22
 App\Actions\Clean->App\Actions\{closure}() at n/a:n/a
 array_filter() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/collections/Arr.php:830
 Illuminate\Support\Arr::where() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/collections/Collection.php:382
 Illuminate\Support\Collection->filter() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/app/Actions/Clean.php:22
 App\Actions\Clean->execute() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/app/Commands/LintCommand.php:22
 App\Commands\LintCommand->handle() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/container/BoundMethod.php:36
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/container/Util.php:41
 Illuminate\Container\Util::unwrapIfClosure() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/container/BoundMethod.php:93
 Illuminate\Container\BoundMethod::callBoundMethod() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/container/BoundMethod.php:35
 Illuminate\Container\BoundMethod::call() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/container/Container.php:661
 Illuminate\Container\Container->call() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/console/Command.php:183
 Illuminate\Console\Command->execute() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Command/Command.php:291
 Symfony\Component\Console\Command\Command->run() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/console/Command.php:152
 Illuminate\Console\Command->run() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:1014
 Symfony\Component\Console\Application->doRunCommand() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/console/Application.php:102
 Illuminate\Console\Application->run() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Console/Kernel.php:155
 Illuminate\Foundation\Console\Kernel->handle() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/laravel-zero/framework/src/Kernel.php:96
 LaravelZero\Framework\Kernel->handle() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/app/DusterKernel.php:19
 App\DusterKernel->handle() at phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/duster:34
 require() at /Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster:14
 include() at /Users/marcus/Sites/myapp/vendor/bin/duster:120

lint [--diff] [--json] [--only ONLY] [--] [<file or directory>]
driftingly commented 1 year ago

Can you test if TLint runs standalone?

# install
composer require tightenco/tlint

# run
vendor/bin/tlint
Synchro commented 1 year ago

Yes, that runs fine.

driftingly commented 1 year ago

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.

driftingly commented 1 year ago

I just tagged 1.0.1; curious if that makes a difference for you.

Synchro commented 1 year ago

Now I'm getting a different problem, also inside duster, when I do a composer update:

> Illuminate\Foundation\ComposerScripts::postAutoloadDump
Script Illuminate\Foundation\ComposerScripts::postAutoloadDump handling the post-autoload-dump event terminated with an exception

In autoload_real.php line 41:                                                                                                                                        
  require(/Users/marcus/Sites/myapp/vendor/composer/../tightenco/duster/vendor/squizlabs/php_codesniffer/autoload.php): Failed to open stream: No such file or directory  
bohlken34 commented 1 year ago

Having a very similar problem to @Synchro

driftingly commented 1 year ago

@Synchro @bohlken34 do an update now, I just tagged 1.0.2.

bohlken34 commented 1 year ago

Thanks! Updated and I'm happy to report that all is well 👍

Synchro commented 1 year ago

1.0.2 doesn't break on composer update as 1.0.1 did, but running it crashes like this:

                                                                                       Linting using TLint                                                                                       
Lints for /Users/marcus/Sites/myall/database/migrations/2023_02_02_084149_add_daily_inbound.php
============
! Prefer `Namespace\...` over `\Namespace\...`.
31 : `                    ->default(\App\Enums\LogisticsStatus::SCHEDULED->value);`

Lints for /Users/marcus/Sites/myapp/database/migrations/2020_03_09_073326_add_payment_fields.php
============
! Prefer `Namespace\...` over `\Namespace\...`.
18 : `                    ->default(\App\Models\User::PAYMENT_STATUS_UNSET)`
! Prefer `Namespace\...` over `\Namespace\...`.
50 : `                    ->default(\App\Models\User::PAYMENT_STATUS_NEW)`

Lints for /Users/marcus/Sites/myall/database/migrations/2021_11_04_113626_add_extra_fields_to_vouchers.php
============
! Prefer `Namespace\...` over `\Namespace\...`.
15 : `                ->default(\App\Enums\VoucherType::percentage());`

                                                                                  Linting using PHP_CodeSniffer                                                                                  

In Runner.php line 608:

  Class "PHP_CodeSniffer\Exceptions\RuntimeException" not found  

In Runner.php line 608:

  include(phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/composer/../illuminate/view/Component.php): Failed to open stream: phar error: internal corrupt  
  ion of phar "/Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster" (crc32 mismatch on file "vendor/illuminate/view/Component.php") in phar:///Users/marcus/Sites/clubzero-  
 api/vendor/tightenco/duster/builds/duster/.box/vendor/composer/ClassLoader.php on line 571                                                                                                    

In Runner.php line 608:

  Class "PHP_CodeSniffer\Exceptions\RuntimeException" not found  

In NullLogger.php line 13:

  Class "Psr\Log\AbstractLogger" not found  

In Runner.php line 608:

  include(phar:///Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/squizlabs/php_codesniffer/src/Files/LocalFile.php): Failed to open stream: phar error: internal  
   corruption of phar "/Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster" (crc32 mismatch on file "vendor/squizlabs/php_codesniffer/src/Files/LocalFile.php") in phar:///  
  Users/marcus/Sites/myapp/vendor/tightenco/duster/builds/duster/vendor/squizlabs/php_codesniffer/autoload.php on line 169                                                               

In OpeningFunctionBraceBsdAllmanSniff.php line 143:

  syntax error, unexpected token "<", expecting end of

That line 608 error is repeated many more times, interspersed with random snippets out of the phar. As you can see it's still reporting corruption of the phar.

mb6792 commented 1 year ago

I'm facing the same issue running on v1.0.3 of duster. Here is the below output when running verbose:

./vendor/bin/duster fix -vvv

Box Requirements Checker
========================

> Using PHP 8.1.16
> PHP is using the following php.ini file:
  /opt/homebrew/etc/php/8.1/php.ini

> Checking Box requirements:
  ✔ The application requires the version "^8.0" or greater.
  ✔ The application requires the extension "zlib".

 [OK] Your system is ready to run the application.

                                                                                                              Fixing using TLint

In MailableMethodsInBuild.php line 89:

  [ErrorException]
  Undefined property: PhpParser\Node\Stmt\Nop::$expr

Exception trace:
  at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Formatters/MailableMethodsInBuild.php:89
 Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:266
 Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Formatters/MailableMethodsInBuild.php:89
 PhpParser\NodeVisitorAbstract@anonymous\phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Formatters/MailableMethodsInBuild.php:49$7c->Tighten\TLint\Formatters\{closure}() at n/a:n/a
 array_filter() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/collections/Arr.php:830
 Illuminate\Support\Arr::where() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/collections/Collection.php:382
 Illuminate\Support\Collection->filter() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Formatters/MailableMethodsInBuild.php:104
 PhpParser\NodeVisitorAbstract@anonymous\phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Formatters/MailableMethodsInBuild.php:49$7c->enterNode() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:200
 PhpParser\NodeTraverser->traverseArray() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:114
 PhpParser\NodeTraverser->traverseNode() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:223
 PhpParser\NodeTraverser->traverseArray() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:114
 PhpParser\NodeTraverser->traverseNode() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:223
 PhpParser\NodeTraverser->traverseArray() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:91
 PhpParser\NodeTraverser->traverse() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Formatters/MailableMethodsInBuild.php:36
 Tighten\TLint\Formatters\MailableMethodsInBuild->format() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/TFormat.php:27
 Tighten\TLint\TFormat->format() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Commands/FormatCommand.php:117
 Tighten\TLint\Commands\FormatCommand->formatFile() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/tightenco/tlint/src/Commands/FormatCommand.php:61
 Tighten\TLint\Commands\FormatCommand->execute() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Command/Command.php:291
 Symfony\Component\Console\Command\Command->run() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:1014
 Symfony\Component\Console\Application->doRunCommand() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/app/Support/TLint.php:40
 App\Support\TLint->App\Support\{closure}() at n/a:n/a
 array_map() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/collections/Arr.php:560
 Illuminate\Support\Arr::map() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/collections/Collection.php:768
 Illuminate\Support\Collection->map() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/app/Support/TLint.php:41
 App\Support\TLint->process() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/app/Support/TLint.php:25
 App\Support\TLint->fix() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/app/Actions/Clean.php:22
 App\Actions\Clean->App\Actions\{closure}() at n/a:n/a
 array_filter() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/collections/Arr.php:830
 Illuminate\Support\Arr::where() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/collections/Collection.php:382
 Illuminate\Support\Collection->filter() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/app/Actions/Clean.php:22
 App\Actions\Clean->execute() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/app/Commands/FixCommand.php:22
 App\Commands\FixCommand->handle() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/container/BoundMethod.php:36
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/container/Util.php:41
 Illuminate\Container\Util::unwrapIfClosure() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/container/BoundMethod.php:93
 Illuminate\Container\BoundMethod::callBoundMethod() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/container/BoundMethod.php:37
 Illuminate\Container\BoundMethod::call() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/container/Container.php:661
 Illuminate\Container\Container->call() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/console/Command.php:183
 Illuminate\Console\Command->execute() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Command/Command.php:291
 Symfony\Component\Console\Command\Command->run() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/console/Command.php:153
 Illuminate\Console\Command->run() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:1014
 Symfony\Component\Console\Application->doRunCommand() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/illuminate/console/Application.php:102
 Illuminate\Console\Application->run() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Console/Kernel.php:155
 Illuminate\Foundation\Console\Kernel->handle() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/vendor/laravel-zero/framework/src/Kernel.php:96
 LaravelZero\Framework\Kernel->handle() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/app/DusterKernel.php:19
 App\DusterKernel->handle() at phar:///Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster/duster:36
 require() at /Users/markbonnici/Development/myapp/vendor/tightenco/duster/builds/duster:14
 include() at /Users/markbonnici/Development/myapp/vendor/bin/duster:98
driftingly commented 1 year ago

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.

driftingly commented 1 year ago

I've released a new version with the updated TLint, which should fix at least some of the issues noted here.

Synchro commented 1 year ago

That's a big improvement, thanks, and it gets much further than before, but eventually fails in the same way in phpcs, line 608 of Runner.php, crc32 check failed in various bits of phpcs.

driftingly commented 1 year ago

Ok, thanks. I had a feeling they were separate issues :(

I'll keep digging.

mb6792 commented 1 year ago

It's working for me. Thanks @driftingly :)

driftingly commented 1 year ago

@Synchro can you check your composer.lock file for squizlabs/php_codesniffer

Synchro commented 1 year ago

It's not in my composer.lock file except as a dev dependency of other packages, i.e. it's not installed separately.

driftingly commented 1 year ago

Could someone try limiting the tools to see which are causing the issue:

# lint
./vendor/bin/duster lint --using="tlint"
./vendor/bin/duster lint --using="phpcodesniffer"
./vendor/bin/duster lint --using="phpcsfixer"
./vendor/bin/duster lint --using="pint"

# fix
./vendor/bin/duster fix --using="tlint"
./vendor/bin/duster fix --using="phpcodesniffer"
./vendor/bin/duster fix --using="phpcsfixer"
./vendor/bin/duster fix --using="pint"
driftingly commented 1 year ago

I'm not sure where to go from here. Closing for now. I'll reopen when more information becomes available.