Changelog History
Page 1
-
v4.0.0-alpha5 Changes
November 27, 2020๐ The Phan v4 release line has the following changes from Phan 3:
- โฌ๏ธ Bump the minimum required AST version from 70 to 80 (Required to analyze php 8.0 attributes - the rest of the php 8.0 syntax changes are supported in both Phan 3 and Phan 4).
๐ A few third party plugins may be affected by the increase of the AST version. - ๐ Supports analyzing whether
#[...]
attributes are used properly when run with PHP 8.0+
๐ Changes
๐ Merge changes from Phan 3.2.6.
- โฌ๏ธ Bump the minimum required AST version from 70 to 80 (Required to analyze php 8.0 attributes - the rest of the php 8.0 syntax changes are supported in both Phan 3 and Phan 4).
-
v4.0.0-alpha4 Changes
November 26, 2020๐ The Phan v4 release line has the following changes from Phan 3:
- โฌ๏ธ Bump the minimum required AST version from 70 to 80 (Required to analyze php 8.0 attributes - the rest of the php 8.0 syntax changes are supported in both Phan 3 and Phan 4).
๐ A few third party plugins may be affected by the increase of the AST version. - ๐ Supports analyzing whether
#[...]
attributes are used properly when run with PHP 8.0+
๐ Changes
๐ Merge changes from Phan 3.2.5.
- โฌ๏ธ Bump the minimum required AST version from 70 to 80 (Required to analyze php 8.0 attributes - the rest of the php 8.0 syntax changes are supported in both Phan 3 and Phan 4).
-
v4.0.0-alpha3 Changes
November 13, 2020๐ The Phan v4 release line has the following changes from Phan 3:
- โฌ๏ธ Bump the minimum required AST version from 70 to 80 (Required to analyze php 8.0 attributes - the rest of the php 8.0 syntax changes are supported in both Phan 3 and Phan 4).
๐ A few third party plugins may be affected by the increase of the AST version. - ๐ Supports analyzing whether
#[...]
attributes are used properly when run with PHP 8.0+
๐ Changes
๐ Merge changes from Phan 3.2.4.
- โฌ๏ธ Bump the minimum required AST version from 70 to 80 (Required to analyze php 8.0 attributes - the rest of the php 8.0 syntax changes are supported in both Phan 3 and Phan 4).
-
v4.0.0-alpha2 Changes
October 12, 2020๐ The Phan v4 release line has the following changes from Phan 3:
- โฌ๏ธ Bump the minimum required AST version from 70 to 80 (Required to analyze php 8.0 attributes - the rest of the php 8.0 syntax changes are supported in both Phan 3 and Phan 4).
๐ A few third party plugins may be affected by the increase of the AST version. - ๐ Supports analyzing whether
#[...]
attributes are used properly when run with PHP 8.0+
๐ Changes
๐ Merge changes from Phan 3.2.3.
- โฌ๏ธ Bump the minimum required AST version from 70 to 80 (Required to analyze php 8.0 attributes - the rest of the php 8.0 syntax changes are supported in both Phan 3 and Phan 4).
-
v4.0.0-alpha1 Changes
September 19, 2020๐ The Phan v4 release line has the following changes from Phan 3:
- โฌ๏ธ Bump the minimum required AST version from 70 to 80 (Required to analyze php 8.0 attributes - the rest of the php 8.0 syntax changes are supported in both Phan 3 and Phan 4).
๐ A few third party plugins may be affected by the increase of the AST version. - ๐ Supports analyzing whether
#[...]
attributes are used properly when run with PHP 8.0+
๐ New features (Analysis):
๐ Support analyzing PHP 8.0 attributes when Phan is run with php 8.0 or newer.
Warn if the attribute syntax is likely to be incompatible in php 7.
Warn if using attributes incorrectly or with incorrect argument lists.๐ New issue types:
PhanCompatibleAttributeGroupOnSameLine
,PhanCompatibleAttributeGroupOnMultipleLines
,
PhanAttributeNonAttribute
,PhanAttributeNonClass
,PhanAttributeNonRepeatable
,
PhanUndeclaredClassAttribute
,PhanAttributeWrongTarget
,PhanAccessNonPublicAttribute
.Backwards incompatible changes:
- Switch from AST version 70 to AST version 80.
โฌ๏ธphp-ast
should be upgraded to version 1.0.10-dev or newer. - โฌ๏ธ Drop the no-op
--polyfill-parse-all-doc-comments
flag.
Miscellaneous:
- ๐ Make various classes from Phan implement
Stringable
.
- โฌ๏ธ Bump the minimum required AST version from 70 to 80 (Required to analyze php 8.0 attributes - the rest of the php 8.0 syntax changes are supported in both Phan 3 and Phan 4).
-
v3.2.6 Changes
November 27, 2020๐ The Phan 3.x release line uses
php-ast
's AST version 70 and supports the analysis of all PHP 8.0 syntax except attributes (when run with PHP 8).
๐ The planned 4.x release line will use AST version 80 and requirephp-ast
1.0.10+ in order to parse/analyze PHP 8.0's#[]
attributes๐ New features (Analysis):
- โก๏ธ Update many more real parameter names to match php 8.0's parameter names for php's own internal methods. (#4263)
- Infer that an instance property exists for PHP 8.0 constructor property promotion. (#3938)
- Infer types of properties from arguments passed into constructor for PHP 8.0 constructor property promotion. (#3938)
- Emit
PhanInvalidNode
andPhanRedefineProperty
when misusing syntax for constructor property promotion. (#3938) - Emit
PhanCompatibleConstructorPropertyPromotion
when the project'sminimum_target_php_version
is older than8.0
(#3938) - Emit
PhanSuspiciousMagicConstant
when using__FUNCTION__
inside of a closure. (#4222)
-
v3.2.5 Changes
November 26, 2020๐ The Phan 3.x release line uses
php-ast
's AST version 70 and supports the analysis of all PHP 8.0 syntax except attributes (when run with PHP 8).
๐ The planned 4.x release line will use AST version 80 and requirephp-ast
1.0.10+ in order to parse/analyze PHP 8.0's#[]
attributes๐ New features (Analysis):
- Convert more internal function signature types from resource to the new object types with
target_php_version
of8.0
+ (#4245, #4246) - ๐ Make internal function signature types and counts consistent with PHP 8.0's
.php.stub
files used to generate some reflection information.
๐ Bug fixes
- ๐ Fix logic error inferring the real key type of lists and arrays
and infer that the real union type of arrays isarray<int,something>
when all keys have real type int. (#4251) - ๐ Fix rendering of processed item count in
--long-progress-bar
.
Miscellaneous:
- ๐ Rename OCI-Collection and OCI-Lob to OCICollection and OCILob internally to prepare for php 8 support.
(PreviouslyOCI_Collection
andOCI_Lob
were used, to be valid fqsens internally)
- Convert more internal function signature types from resource to the new object types with
-
v3.2.4 Changes
November 13, 2020๐ The Phan 3.x release line uses
php-ast
's AST version 70 and supports the analysis of all PHP 8.0 syntax except attributes (when run with PHP 8).
๐ The planned 4.x release line will use AST version 80 and requirephp-ast
1.0.10+ in order to parse/analyze PHP 8.0's#[]
attributes๐ New features (Analysis):
- ๐ Partially support
self<A>
andstatic<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
fordo {} 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 toPhpToken::tokenize()
in PHP 8.0.0RC4. (#4189)
- ๐ Partially support
-
v3.2.3 Changes
October 12, 2020๐ The Phan 3.x release line uses
php-ast
's AST version 70 and supports the analysis of all PHP 8.0 syntax except attributes (when run with PHP 8).
๐ The planned 4.x release line will use AST version 80 and requirephp-ast
1.0.10+ in order to parse/analyze PHP 8.0's#[]
attributes๐ 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
orstatic::$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. emitPhanCompatibleThrowException
) (#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 whenwarn_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)
- Add
-
v3.2.2 Changes
September 19, 2020๐ 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.
๐ Bug fixes:
- ๐ Fix false positive
PhanUnusedVariable
infor (; $loop; ...) {}
(#4191) - 0๏ธโฃ Don't infer defaults of ancestor class properties when analyzing the implementation of
__construct
. (#4195)
0๏ธโฃ This is only affects projects where the config settinginfer_default_properties_in_construct
is overridden to be enabled. - Check
minimum_target_php_version
for more compatibility warnings about parameter types.
๐ง Maintenance:
- โ Emit a warning to stderr if run using a PHP 8 version older than 8.0.0beta4.
- ๐ Improve handling of missing argument info when analyzing calls to functions/methods.