-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5.22 crash on scan: Uncaught RuntimeException: PHP Error: Uninitialized string offset 0 #10707
Comments
Was working fine on 5.21 |
We would need to see the docblock it crashes on. You can try locating it by running |
This is the doc block of the last class it is trying to scan /**
* Defines the essential information a package has that is used during solving/installation
*
* PackageInterface & derivatives are considered internal, you may use them in type hints but extending/implementing them is not recommended and not supported. Things may change without notice.
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*
* @phpstan-type AutoloadRules array{psr-0?: array<string, string|string[]>, psr-4?: array<string, string|string[]>, classmap?: list<string>, files?: list<string>, exclude-from-classmap?: list<string>}
* @phpstan-type DevAutoloadRules array{psr-0?: array<string, string|string[]>, psr-4?: array<string, string|string[]>, classmap?: list<string>, files?: list<string>}
*/ Here's the last few lines of the output using the debug flag :
|
Reproduced, seems to depend on the number of spaces between the type name and type definition. Crashes: https://psalm.dev/r/a6494c8bae |
I found these snippets: https://psalm.dev/r/a6494c8bae<?php
/**
* @phpstan-type _T int
*/
interface I {}
https://psalm.dev/r/902d894ce5<?php
/**
* @phpstan-type _T int
*/
interface I {}
|
The first snippet additionally outputs:
|
Fixed in #10711 |
The text was updated successfully, but these errors were encountered: