FEDORA-2019-d351ebe7dc

bugfix update in Fedora 28 for phan

Status: testing 5 days ago

10 Feb 2019, Phan 1.2.3

New features (CLI):

  • Add -I <file_list> as an alias of --include-analysis-file-list <file>.
  • Support repeating the include option (-I <file_or_list> -I <file_or_list>) and the exclude option (-3 <file_or_list> -3 <file_or_list>).

New features (Analysis):

  • Inherit more specific phpdoc types even when there are real types in the signature. (#2409) e.g. inherit @param array<int,\stdClass> and @return MyClass[] from the ancestor class of function someMethod(array $x) : array {}.

This is only done when each phpdoc type is compatible with the real signature type.

  • Detect more expressions without side effects: PhanNoopEmpty and PhanNoopIsset (for isset(expr) and empty(expr)) (#2389)
  • Also emit PhanNoopBinaryOperator for the ??, ||, and && operators, but only when the result is unused and the right hand side has no obvious side effects. (#2389)
  • Properly analyze effects of a property/field access expression as the key of a foreach statement. (#1601)
  • Emit PhanTypeInstantiateTrait when calling new TraitName() (#2379)
  • Emit PhanTemplateTypeConstant when using @var T on a class constant's doc comment. (#2402)
  • Warn for invalid operands of a wider variety of binary operators (/, /=, >>, <<=, -, %, **, etc) (#2410) New issue types: PhanTypeInvalidRightOperandOfIntegerOp and PhanTypeInvalidLeftOperandOfIntegerOp. Also, mention the operator name in the issue message.

Language Server/Daemon mode:

  • Attempted fixes for bugs with issue filtering in the language server on Windows.
  • Add --language-server-disable-output-filter, which disables the language server filter to limit outputted issues to those in files currently open in the IDE.

Maintenance

  • Don't emit a warning to stderr when --language-server-completion-vscode is used.
  • Catch the rare RecursionDepthException in more places, improve readability of its exception message. (#2386)
  • Warn that php-ast 1.0.0 and older always crash with PHP 7.4-dev or newer.

Bug fixes:

  • Fix edge cases in checking if properties/methods are accessible from a trait (#2371)
  • Fix edge cases checking for PhanTypeInstantiateInterface and PhanTypeInstantiateAbstract (#2379)

Plugins:

  • Infer a literal string return value when calling sprintf on known literal scalar types in PrintfCheckerPlugin. (#2131)
  • Infer that ;@foo(); is not a usage of foo() in UseReturnValuePlugin. (#2412)
  • Implement NotFullyQualifiedUsagePlugin to warn about uses of global functions and constants that aren't fully qualified. (#857)

02 Feb 2019, Phan 1.2.2

New features(CLI):

  • Emit a warning to stderr if no files were parsed when Phan is invoked. (#2289)

New features(Analysis):

  • Add @phan-extends and @extends as an alias of @inherits (#2351)
  • Make checks such as $x !== 'a literal' (and !=) remove the literal string/int type from the union type. (#1789)

Language Server/Daemon mode:

  • Limit analysis results of the language server to only the currently open files. (#1722)
  • Limit analysis results of Phan daemon to just the requested files in all output formats (#2374) (not just when phan_client post-processes the output)
  • Make code completion immediately after typing -> and :: behave more consistently (#2343) Note: this fix only applies at the very last character of a line
  • Be more consistent about including types in hover text for properties (#2348)
  • Make "Go to Definition" on new MyClass go to MyClass::__construct if it exists. (#2276)
  • Support "Go to Definition" for references to global functions and global constants in comments and literal strings. Previously, Phan would only look for class definitions in comments and literal strings.
  • Fix a crash requesting completion results for some class names/global constants.

Maintenance:

  • Warn and exit immediately if any plugins are missing or invalid (instead of crashing after parsing all files) (#2099)
  • Emit warnings to stderr if any config settings seem to be the wrong type (#2376)
  • Standardize on logging to stderr.
  • Add more details about the call that crashed to the crash report.

Bug fixes:

  • Emit a warning and exit if --config-file <file> does not exist (#2271)
  • Fix inferences about foreach ($arr as [[$nested]]) {...} (#2362)
  • Properly analyze accesses of @internal elements of the root namespace from other parts of the root namespace. (#2366)
  • Consistently emit UseNormalNoEffect (etc.) when using names/functions/constants of the global scrope from the global scope.
  • Fix a bug causing incorrect warnings due to uses of global/class constants.

Plugins:

  • Add UseReturnValuePlugin, which will warn about code that calls a function/method such as sprintf or array_merge without using the return value.

The list it uses is not comprehensive; it is a small subset of commonly used functions.

This plugin can also be configured to automatically warn about failing to use a return value of any user-defined or internal function-like, when over 98% of the other calls in the codebase did use the return value.

Comments 3

This update has been submitted for testing by remi.

This update has obsoleted phan-1.2.2-1.fc28, and has inherited its bugs and notes.

This update has been pushed to testing.


Add Comment & Feedback
Toggle Preview

Comment fields support Fedora-Flavored Markdown. Comments are governed under this privacy policy.

-1 0 +1 Feedback Guidelines

Is the update generally functional? (karma)

You need to be logged in to add karma!

Content Type
RPM
Status
testing
Test Gating
Submitted by
Update Type
bugfix
Update Severity
unspecified
Karma
0
stable threshold: 3
unstable threshold: -3
Autopush
Enabled
Dates
submitted 5 days ago
in testing 5 days ago
days to stable 2

Automated Test Results