phpstan/phpdoc-parser

Union operator on a new line causes parsing error

internalsystemerror opened this issue · 3 comments

Original issue: phpstan/phpstan#9019

When we have a type defined such as

/**
 * @phpstan-type FactoriesConfigurationType = array<
 *      string,
 *      (class-string<Factory\FactoryInterface>|Factory\FactoryInterface)
 *      |callable(ContainerInterface,?string,?array<mixed>|null):object
 * >
 */

We get an error Unexpected token "|", expected '>'. According to the original issue the problem is caused by this package.