Partially support self<A> and static<B> in phpdoc types. (#4226)
This support is incomplete and may run into issues with inheritance.
Bug fixes:
Properly infer the literal string value of __FUNCTION__ for global functions in namespaces (#4231)
Fix false positive PhanPossiblyInfiniteLoop for do {} while (false); that is unchangeably false (#4236)
Infer that array_shift and array_pop return null when the passed in array could be empty, not false. (#4239)
Handle PhpToken::getAll() getting renamed to PhpToken::tokenize() in PHP 8.0.0RC4. (#4189)
Oct 12 2020, Phan 3.2.3
New features (CLI, Config):
Add light_high_contrast support for --color-scheme. (#4203)
This may be useful in terminals or CI web pages that use white backgrounds.
New features (Analysis):
Infer that parent::someMethodReturningStaticType() is a subtype of the current class, not just the parent class. (#4202)
Support phpdoc @abstract or @phan-abstract on non-abstract class constants, properties, and methods
to indicate that the intent is for non-abstract subclasses to override the definition. (#2278, #2285)
New issue types: PhanCommentAbstractOnInheritedConstant, PhanCommentAbstractOnInheritedProperty, PhanCommentOverrideOnNonOverrideProperty
For example, code using static::SOME_CONST or static::$SOME_PROPERTY or $this->someMethod()
may declare a placeholder @abstract constant/property/method,
and use this annotation to ensure that all non-abstract subclasses override the constant/property/method
(if using real abstract methods is not practical for a use case)
Warn about @override on properties that do not override an ancestor's property definition.
New issue type: PhanCommentOverrideOnNonOverrideProperty.
(Phan already warns for constants and methods)
Plugins:
Emit PhanPluginUseReturnValueGenerator for calling a function returning a generator without using the returned Generator. (#4013)
Bug fixes:
Properly analyze the right hand side for $cond || throw ...; (e.g. emit PhanCompatibleThrowException) (#4199)
Don't infer implications of left || right on the right hand expression when the right hand side has no side effects. (#4199)
Emit PhanTypeInvalidThrowStatementNonThrowable for thrown expressions that definitely aren't \Throwable
even when warn_about_undocumented_throw_statements is disabled or the throw expression is in the top level scope. (#4200)
Increase the minimum requirements in composer.json to what Phan actually requires. (#4217)
Sep 19 2020, Phan 3.2.2
New features (Analysis):
Improve handling of missing argument info when analyzing calls to functions/methods.
This will result in better issue detection for inherited methods or methods which Phan does not have type info for.
... (truncated)
Commits
079a6fc Merge pull request #4240 from TysonAndre/release-3.2.4
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on phan/phan to permit the latest version.
Changelog
Sourced from phan/phan's changelog.
... (truncated)
Commits
079a6fc
Merge pull request #4240 from TysonAndre/release-3.2.4c810bc8
Release Phan 3.2.429ec064
Handle PhpToken::getAll() getting renamed to ::tokenize()7710186
Fix plugin type inference for array_shift/array_popa3e9bd9
Add alternate setrawcookie() signature15d52a0
Fix test failure with paratest and php 7.2fb120fb
Fix false positive PhanPossiblyInfiniteLoopo6708e1e
Fix inferred value of__FUNCTION__
in namespaces2a13936
Merge pull request #4227 from TysonAndre/template-support70feb29
Support tracking static<T> and self<T>Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)