struggle-for-php/sfp-phpstan-psr-log

Rules for context array should be get values with `->getConstantArrays()`

sasezaki opened this issue · 0 comments

  • ContextKeyRule
  • ContextRequireExceptionKeyRule
    • seems useless. currently already variable array is supported, and union type is not supported. union type support is meaningless for this rule.
  • also PlaceholderCorrespondToKeysRule

current implementations only checks dynamic parameter $logger->info('foo', ['key' => 'bar']);.
Rules should be checked with phpdoc parameter, method scope array variable( $context = ['key' => 'bar']; $logger->info('foo', $context); )