Larastan: Progress bar stops on 92%, larastan never terminates

Created on 7 Jun 2020  路  5Comments  路  Source: nunomaduro/larastan

  • Larastan Version: 0.5.8
  • --level used: problem occurs on all levels

Description

A 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?

bug

Most helpful comment

Thank you for the report.
Have you tried the --debug option?

All 5 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Braunson picture Braunson  路  4Comments

spaceemotion picture spaceemotion  路  4Comments

bogdankharchenko picture bogdankharchenko  路  4Comments

fgilio picture fgilio  路  4Comments

zlodes picture zlodes  路  3Comments