codeigniter4 / devkit

Development toolkit for CodeIgniter libraries and projects
MIT License
58 stars 11 forks source link

You must call one of in() or append() methods before iterating over a Finder. #102

Closed jozefrebjak closed 1 year ago

jozefrebjak commented 1 year ago

If we copy php-cs-fixer config from templates and run php-cs-fixer command, then we get error within run:

In Finder.php line 661:

  [LogicException]                                                               
  You must call one of in() or append() methods before iterating over a Finder.  
kenjis commented 1 year ago

Cannot reproduce. in() is called: https://github.com/codeigniter4/devkit/blob/a7dc5842932c29ef21fc182e00a6209acb3ceed4/src/Template/.php-cs-fixer.dist.php#L9

$ php-cs-fixer fix --ansi --verbose --diff
PHP CS Fixer 3.22.0 Chips & Pizza by Fabien Potencier and Dariusz Ruminski.
PHP runtime: 8.1.21
Loaded config CodeIgniter4 Coding Standards from "/Users/kenji/work/codeigniter/tmp/ci436/.php-cs-fixer.dist.php".
Using cache file "build/.php-cs-fixer.cache".
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
Legend: .-no changes, F-fixed, S-skipped (cached or empty file), I-invalid file syntax (file ignored), E-error

Fixed 0 of 52 files in 0.017 seconds, 16.000 MB memory used
kenjis commented 1 year ago

If you still have this issue, feel free to reopen.