I would expect that the parameter $completelySilent should either be absent or false in the code mentioned above. When I go to the vendor/ source and change that line to false, I get the stacktrace and exception output as expected.
I can submit a PR for this, if you agree with my analysis.
Yeah, I think the reason for that was to limit noise, since model instantiation was not very customizable in the past. But you're correct, this shouldn't swallow exceptions. PR welcome 👍
Scribe version
4.37.0
PHP version
8.2
Framework
Laravel
Framework version
11.12.0
Scribe config
What happened?
Reproduce
php artisan scribe:generate -vvv
(orphp artisan scribe:generate --verbose
)Explanation/analysis
The reason there is no exception output is that
$completelySilent
parameter for the functiondumpExceptionIfVerbose
is always set totrue
in the model factory exception handler: https://github.com/knuckleswtf/scribe/blob/3ab4ae7029b3db58b5509e3721b2dc146f04a17e/src/Extracting/InstantiatesExampleModels.php#L56Possible fix
I would expect that the parameter
$completelySilent
should either be absent orfalse
in the code mentioned above. When I go to thevendor/
source and change that line tofalse
, I get the stacktrace and exception output as expected.I can submit a PR for this, if you agree with my analysis.
Docs