Skip to content

provide stacktrace on fatal errors #2210

@staabm

Description

@staabm

Feature request

I try to setup phpstan for a legacy project. I am at a point in which the analysis gets started but gets interrupted by a PHP Parse Error:

phpstan analyse -vvv
Note: Using configuration file phpstan.neon.
PHP Parse error:  syntax error, unexpected 'new' (T_NEW) in /usr/share/php/SOAP/Server/TCP.php on line 67

my problem is, that I am not able to figure out why phpstan thinks it needs to load and analyse this PEAR file.

wouldn't it be possible to get a proper stacktrace for this error, so I can see which line of code - while beeing analyzed - triggers this error?

Env:
Ubuntu 18 LTS

phpstan -v
PHPStan - PHP Static Analysis Tool 0.11.8

php -v
PHP 7.2.19-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May 31 2019 11:17:15) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.19-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.7.1, Copyright (c) 2002-2019, by Derick Rethans
    with blackfire v1.25.0~linux-x64-non_zts72, https://blackfire.io, by Blackfire

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions