refactor(phpstan): update bootstrap configuration

- Remove src and bin directories from analysis scope
- Replace phpstan-bootstrap.php with bin/bootstrap.php for consistent autoloader setup
- Remove redundant CLI constants definition in favor of existing bootstrap file
- Clean up obsolete phpstan-bootstrap.php file entirely
master
韩天峰 1 hour ago
parent 77e40f41ae
commit 1747a4909b
  1. 15
      phpstan-bootstrap.php
  2. 5
      phpstan.neon

@ -1,15 +0,0 @@
<?php
/**
* This file is part of TypePHP(AOT).
*
* @link https://www.swoole.com/aot/
* @contact service@swoole.com
*/
if (!defined('TYPEPHP_ROOT_PATH')) {
define('TYPEPHP_ROOT_PATH', __DIR__);
}
if (!defined('TYPEPHP_DEBUG')) {
define('TYPEPHP_DEBUG', true);
}

@ -5,10 +5,9 @@ parameters:
- src
- bin
# Define CLI constants without executing bin/bootstrap.php inside PHPStan's
# process, where loading Composer's autoloader a second time is unsafe.
# Reuse the same constants and Composer autoloader setup as the CLI tools.
bootstrapFiles:
- phpstan-bootstrap.php
- bin/bootstrap.php
# gen_stub.php is maintained as a namespaced copy of php-src's generator.
# Analyze TypePHP-owned compiler code independently from upstream diagnostics.

Loading…
Cancel
Save