Open
Description
What would you like to do?
When a fatal error is thrown, it would be great to have a bit more context about what file was being processed when the error occured.
Example output when running the PHP7.3 Array Functions task:
>>> Event: Processing paths: app, database/factories, database/seeders, vendor-custom/brilliantpackages/laravel-mysql-spatial/src/Eloquent, config, database/migrations, routes, tests
Fatal error: Cannot declare class Illuminate\Support\Collection, because the name is already in use in /project/vendor/laravel/framework/src/Illuminate/Collections/Collection.php on line 11
Failed to run rector: adopt-new-array-functions: #0 phar:///opt/shift/workbench/src/Tasks/Workbench/AdoptNewArrayFunctions.php(18): Shift\Tasks\Workbench\AdoptNewArrayFunctions->rector('/opt/shift/reso...')
#1 phar:///opt/shift/workbench/workbench.php(95): Shift\Tasks\Workbench\AdoptNewArrayFunctions->perform()
#2 /opt/shift/workbench(9): require('phar:///opt/shi...')
#3 {main}
I’ve searched my codebase for class Collection
and it’s not coming up just found it in _ide_helper.php
from this package.
If possible, it would be nice to see the file being processed when the error occurred so I can more easily track it down.
Before/After code snippets
Perhaps something like this:
>>> Event: Processing paths: app, database/factories, database/seeders, vendor-custom/brilliantpackages/laravel-mysql-spatial/src/Eloquent, config, database/migrations, routes, tests
Fatal error: Cannot declare class Illuminate\Support\Collection, because the name is already in use in /project/vendor/laravel/framework/src/Illuminate/Collections/Collection.php on line 11
+ File currently being processed: _ide_helper.php
Failed to run rector: adopt-new-array-functions: #0 phar:///opt/shift/workbench/src/Tasks/Workbench/AdoptNewArrayFunctions.php(18): Shift\Tasks\Workbench\AdoptNewArrayFunctions->rector('/opt/shift/reso...')
#1 phar:///opt/shift/workbench/workbench.php(95): Shift\Tasks\Workbench\AdoptNewArrayFunctions->perform()
#2 /opt/shift/workbench(9): require('phar:///opt/shi...')
#3 {main}