config.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * This configuration will be read and overlaid on top of the
  4. * default configuration. Command-line arguments will be applied
  5. * after this file is read.
  6. */
  7. return [
  8. // If this is set to `null`,
  9. // then Phan assumes the PHP version which is closest to the minor version
  10. // of the php executable used to execute Phan.
  11. //
  12. // Note that the **only** effect of choosing `'5.6'` is to infer
  13. // that functions removed in php 7.0 exist.
  14. // (See `backward_compatibility_checks` for additional options)
  15. 'target_php_version' => null,
  16. 'minimum_target_php_version' => '8.2',
  17. // A list of directories that should be parsed for class and
  18. // method information. After excluding the directories
  19. // defined in exclude_analysis_directory_list, the remaining
  20. // files will be statically analyzed for errors.
  21. //
  22. // Thus, both first-party and third-party code being used by
  23. // your application should be included in this list.
  24. 'directory_list' => [
  25. 'examples',
  26. 'src',
  27. 'tests',
  28. 'vendor',
  29. '.phan/stubs',
  30. ],
  31. // A regex used to match every file name that you want to
  32. // exclude from parsing. Actual value will exclude every
  33. // "test", "tests", "Test" and "Tests" folders found in
  34. // "vendor/" directory.
  35. 'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@',
  36. // A directory list that defines files that will be excluded
  37. // from static analysis, but whose class and method
  38. // information should be included.
  39. //
  40. // Generally, you'll want to include the directories for
  41. // third-party code (such as "vendor/") in this list.
  42. //
  43. // n.b.: If you'd like to parse but not analyze 3rd
  44. // party code, directories containing that code
  45. // should be added to both the `directory_list`
  46. // and `exclude_analysis_directory_list` arrays.
  47. 'exclude_analysis_directory_list' => [
  48. 'vendor/',
  49. '.phan/stubs',
  50. ],
  51. 'suppress_issue_types' => [
  52. 'PhanAccessMethodInternal',
  53. 'PhanAccessOverridesFinalConstant',
  54. 'PhanDeprecatedClass',
  55. 'PhanDeprecatedClassConstant',
  56. 'PhanNoopNew',
  57. 'PhanTypePossiblyInvalidDimOffset',
  58. ],
  59. ];