How to fix: weird phpstan internal errors from class loading when running analyse

Internal error: Internal error: The autoloader expected class “Hoa\Zformat\Parameter” to be defined in file “phar:///app/vendor/phpstan/phpstan/phpstan.phar/vendor/composer/../hoa/zformat/Parameter.php”. The file was found but the class was not in it, the class name or namespace probably has a typo. in file
/app/src/php/WebsiteBundle/Model/StoryBlok/Story.php
Run PHPStan with — debug option and post the stack trace to:
https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md
Child process error (exit code 1):
The autoloader expected class "Stringable" to be defined in file "/home/joris/vhosts/wachtrij/backend/vendor/composer/../symfony/polyfill-php80/Resources/stubs/Stringable.php". The file was found but the class was not in it, the class name or namespace probably has a typo.
Debug::enable();

--

--

--

Senior Web Developer — Entrepreneur — yaymemories.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Network pricing

Step by Step: How to Export an XML File from Excel?

Python Typosquatting for Fun not Profit

Optimizing Git’s Merge Machinery, #2

Top Rated API To Categorize Website Data

How to design task management system?

JavaScript vs. Golang for IoT: Is Gopher Winning?

Epoch 1 is drawing to a close, and in just a few days we will be entering into Epoch 2.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Philipp Scheit

Philipp Scheit

Senior Web Developer — Entrepreneur — yaymemories.com

More from Medium

Testing Twig Extensions The Right Way

A handsome, young Afro-American  man pointing on his temple thinking: “no tests? More time for coding”

How to Create a Connection to Spotify’s Web API Using Symfony

Today I Learnt — Twig and Services

Php 8.1 New Features — Readonly Properties