Closed andresilvagomez closed 1 year ago
Hi @andresilvagomez ,
Could you please point me to where the phpunit
command is being run when you run php artisan scout:extended
? I can't find anything related to this in our code.
Thank you in advance.
@DevinCodes sorry for this delay, thanks to you to answer.
I never execute, only when I put in the terminal, this commands it appear.
I'm not able to reproduce this issue, does it come from some configuration in your project perhaps?
Would you be able to provide the steps for me to reproduce this? Thank you in advance!
This error can be caused when the SearchableFinder
scans for classes but finds tests. More specifically if you have test files anywhere in a PSR4 autoloaded directory (eg /app
)
The call tree:
/vendor/algolia/scout-extended/src/Helpers/SearchableFinder.php:97 - require_once()
/vendor/algolia/scout-extended/src/Helpers/SearchableFinder.php:64 - getProjectClasses()
/vendor/algolia/scout-extended/src/Helpers/SearchableFinder.php:47 - find()
/vendor/algolia/scout-extended/src/Console/Commands/StatusCommand.php:44 - fromCommand()
This library is setup to handle exceptions during this discovery process but Pest calls exit
and kills execution.
2024: was getting errors for any scout command.
thanks @freshleafmedia , your response helped me fix this error. We found some tests deep in our /app
folder. once removed, the scout commands worked fine.
cheers! 🍻
Description
When I Run
php artisan scout:sync
Please run
./vendor/bin/pest
instead of/vendor/bin/phpunit
.Steps To Reproduce