-
-
Notifications
You must be signed in to change notification settings - Fork 741
Closed
Description
phpstan defines a php constant __PHPSTAN_RUNNING__
https://github.com/phpstan/phpstan-src/blob/ccaa6bf41cb93412536b931121abffb0d38ede6f/bin/phpstan#L14
would be great to have something similar in rector
this is usefull when working in legacy app/codes which contain classes/files which get automatically executed when files are loaded for analysis.
e.g. we have files which start with code like
<?php
if (!defined('__PHPSTAN_RUNNING__')) {
if (!defined('FILE_PATH')) {
if (!defined('APP_ROOT')) {
throw new Exception('Missing required constant, either FILE_PATH or APP_ROOT');
}
define('FILE_PATH', APP_ROOT.'/files');
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels