--level used: problem occurs on all levelsA few days ago larastan stopped working. The progress stops always on 92% and larastan never terminates. I don't get any error message. Even with the highest verbose level. The problem occurs on all environments.
Edit: Without the ./vendor/nunomaduro/larastan/extension.neon extension phpstan terminates successfully.
Because there is no error message it is really hard to investigate. Do you have any idea how to tackle the problem?
Thank you for the report.
Have you tried the --debug option?
Thanks! Indeed, I missed that flag. Now I could spot the piece of code that causes the problem. I'm using artesaos/seotools to embed Schema.org information to the HTML:
JsonLd::setType('BlogPosting')
->setImage($post->getFirstMediaUrl('post-images'))
->setTitle($post->title)
->setDescription($post->description)
->setUrl(url($post->path()))
->setSite($post->title)
->addValue('datePublished', $post->created_at)
->addValue('dateModified', $post->updated_at)
->addValue('headline', $post->title)
->addValue('author', [
'@type' => 'Person',
'name' => $post->user->name,
'image' => url('/img/' . $post->user->avatar . '.jpg')
])
->addValue('publisher', [
'@type' => 'Organization',
'name' => 'Company',
'url' => 'https://www.example.com',
'logo' => [
'@type' => 'ImageObject',
'name' => 'Company',
'url' => url('/img/logo.png'),
],
]);
If deleting this Larastan works.
Thank you!! 馃樆
Could you remove one by one the addValue-s/others and rerun Larastan?
The JsonLd facade is missing the setImage method annotation. After swapping this method with the setImages method (which is annotated correctly) the code is still working and larastan terminates successfully.
Problem is solved for me. I would consider that as a bug why I'm let this issue open. Feel free to close.
Thanks for your help!
Glad you solved your problem. But this does not sound like a Larastan problem. Closing as it's solved.
Most helpful comment
Thank you for the report.
Have you tried the
--debugoption?