1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Update UPGRADING.md

This commit is contained in:
Bruce Weirdan 2022-02-06 00:33:29 +02:00
parent a331ac0b21
commit aea950a10c
No known key found for this signature in database
GPG Key ID: CFC3AAB181751B0D

View File

@ -149,11 +149,11 @@
- `Psalm\Plugin\EventHandler\Event\PropertyTypeProviderEvent`
- `Psalm\Plugin\EventHandler\Event\PropertyVisibilityProviderEvent`
- `Psalm\Plugin\EventHandler\Event\StringInterpreterEvent`
- [BC] Atomic::__toString() used to return a string representation of the type that was using double quotes (") to quote literals. This is now using single quotes (') to be more aligned with the rest of the codebase.
- [BC] Atomic::__toString() is now final
- [BC] Atomic::__toString() now returns a more detailed version of the type (it calls getId() under the hood)
- [BC] Atomic::getId() has now a first param $exact. Calling the method with false will return a less detailed version of the type in some cases (similarly to what __toString used to return)
- [BC] To remove a variable from the context, Context::remove(). Calling
- [BC] `Atomic::__toString()` used to return a string representation of the type that was using double quotes (`"`) to quote literals. This is now using single quotes (`'`) to be more aligned with the rest of the codebase.
- [BC] `Atomic::__toString()` is now final
- [BC] `Atomic::__toString()` now returns a more detailed version of the type (it calls `getId()` under the hood)
- [BC] Atomic::getId() has now a first param $exact. Calling the method with false will return a less detailed version of the type in some cases (similarly to what `__toString` used to return)
- [BC] To remove a variable from the context, use `Context::remove()`. Calling
`unset($context->vars_in_scope[$var_id])` can cause problems when using references.
- [BC] `TKeyOfClassConstant` has been renamed to `TKeyOfArray`.
- [BC] `TValueOfClassConstant` has been renamed to `TValueOfArray`.
@ -222,6 +222,291 @@
- [BC] Class `Psalm\ErrorBaseline` became final
- [BC] `Psalm\Config#__construct()` was marked `@internal`
- [BC] Class `Psalm\DocComment` became final
- All non-abstract issues are now final:
- [BC] Class `Psalm\Issue\InaccessibleProperty` became final
- [BC] Class `Psalm\Issue\TaintedShell` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidIterator` became final
- [BC] Class `Psalm\Issue\MethodSignatureMustOmitReturnType` became final
- [BC] Class `Psalm\Issue\TaintedHtml` became final
- [BC] Class `Psalm\Issue\DuplicateConstant` became final
- [BC] Class `Psalm\Issue\MissingConstructor` became final
- [BC] Class `Psalm\Issue\PossiblyFalseIterator` became final
- [BC] Class `Psalm\Issue\PossiblyUndefinedArrayOffset` became final
- [BC] Class `Psalm\Issue\FalseOperand` became final
- [BC] Class `Psalm\Issue\MixedArrayAssignment` became final
- [BC] Class `Psalm\Issue\MixedArrayAccess` became final
- [BC] Class `Psalm\Issue\TaintedUnserialize` became final
- [BC] Class `Psalm\Issue\NullFunctionCall` became final
- [BC] Class `Psalm\Issue\UnusedConstructor` became final
- [BC] Class `Psalm\Issue\InvalidEnumCaseValue` became final
- [BC] Class `Psalm\Issue\MissingClosureReturnType` became final
- [BC] Class `Psalm\Issue\LessSpecificClassConstantType` became final
- [BC] Class `Psalm\Issue\MixedPropertyFetch` became final
- [BC] Class `Psalm\Issue\PossiblyNullArrayAccess` became final
- [BC] Class `Psalm\Issue\MissingPropertyType` became final
- [BC] Class `Psalm\Issue\TaintedCallable` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidMethodCall` became final
- [BC] Class `Psalm\Issue\TaintedHeader` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidArrayAssignment` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidCast` became final
- [BC] Class `Psalm\Issue\ImpurePropertyAssignment` became final
- [BC] Class `Psalm\Issue\MixedPropertyTypeCoercion` became final
- [BC] Class `Psalm\Issue\UnresolvableConstant` became final
- [BC] Class `Psalm\Issue\LoopInvalidation` became final
- [BC] Class `Psalm\Issue\TooManyTemplateParams` became final
- [BC] Class `Psalm\Issue\InvalidCatch` became final
- [BC] Class `Psalm\Issue\MismatchingDocblockReturnType` became final
- [BC] Class `Psalm\Issue\PossiblyUndefinedIntArrayOffset` became final
- [BC] Class `Psalm\Issue\NullArrayAccess` became final
- [BC] Class `Psalm\Issue\NoEnumProperties` became final
- [BC] Class `Psalm\Issue\ImpureByReferenceAssignment` became final
- [BC] Class `Psalm\Issue\RedundantConditionGivenDocblockType` became final
- [BC] Class `Psalm\Issue\MixedReturnTypeCoercion` became final
- [BC] Class `Psalm\Issue\PossiblyNullOperand` became final
- [BC] Class `Psalm\Issue\InvalidGlobal` became final
- [BC] Class `Psalm\Issue\PossiblyNullArgument` became final
- [BC] Class `Psalm\Issue\ForbiddenCode` became final
- [BC] Class `Psalm\Issue\RedundantCast` became final
- [BC] Class `Psalm\Issue\UnusedParam` became final
- [BC] Class `Psalm\Issue\DuplicateArrayKey` became final
- [BC] Class `Psalm\Issue\MissingImmutableAnnotation` became final
- [BC] Class `Psalm\Issue\MutableDependency` became final
- [BC] Class `Psalm\Issue\MixedPropertyAssignment` became final
- [BC] Class `Psalm\Issue\DeprecatedTrait` became final
- [BC] Class `Psalm\Issue\InvalidArrayAccess` became final
- [BC] Class `Psalm\Issue\LessSpecificReturnStatement` became final
- [BC] Class `Psalm\Issue\AssignmentToVoid` became final
- [BC] Class `Psalm\Issue\InvalidPropertyAssignment` became final
- [BC] Class `Psalm\Issue\InvalidFalsableReturnType` became final
- [BC] Class `Psalm\Issue\IfThisIsMismatch` became final
- [BC] Class `Psalm\Issue\UndefinedPropertyFetch` became final
- [BC] Class `Psalm\Issue\UndefinedMagicPropertyFetch` became final
- [BC] Class `Psalm\Issue\PossiblyUnusedReturnValue` became final
- [BC] Class `Psalm\Issue\PossiblyNullPropertyFetch` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidPropertyFetch` became final
- [BC] Class `Psalm\Issue\MixedClone` became final
- [BC] Class `Psalm\Issue\DuplicateFunction` became final
- [BC] Class `Psalm\Issue\InaccessibleClassConstant` became final
- [BC] Class `Psalm\Issue\UndefinedGlobalVariable` became final
- [BC] Class `Psalm\Issue\ImplicitToStringCast` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidDocblockTag` became final
- [BC] Class `Psalm\Issue\ReservedWord` became final
- [BC] Class `Psalm\Issue\InvalidOperand` became final
- [BC] Class `Psalm\Issue\UnusedProperty` became final
- [BC] Class `Psalm\Issue\UnevaluatedCode` became final
- [BC] Class `Psalm\Issue\NullPropertyFetch` became final
- [BC] Class `Psalm\Issue\ParamNameMismatch` became final
- [BC] Class `Psalm\Issue\CircularReference` became final
- [BC] Class `Psalm\Issue\UndefinedThisPropertyFetch` became final
- [BC] Class `Psalm\Issue\NonStaticSelfCall` became final
- [BC] Class `Psalm\Issue\NullOperand` became final
- [BC] Class `Psalm\Issue\MixedAssignment` became final
- [BC] Class `Psalm\Issue\MixedFunctionCall` became final
- [BC] Class `Psalm\Issue\InvalidTypeImport` became final
- [BC] Class `Psalm\Issue\PossiblyNullArrayOffset` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidArrayOffset` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidArgument` became final
- [BC] Class `Psalm\Issue\UndefinedPropertyAssignment` became final
- [BC] Class `Psalm\Issue\UnusedReturnValue` became final
- [BC] Class `Psalm\Issue\ImpureFunctionCall` became final
- [BC] Class `Psalm\Issue\RedundantFunctionCallGivenDocblockType` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidPropertyAssignmentValue` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidOperand` became final
- [BC] Class `Psalm\Issue\ArgumentTypeCoercion` became final
- [BC] Class `Psalm\Issue\OverriddenPropertyAccess` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidArrayAccess` became final
- [BC] Class `Psalm\Issue\UnusedForeachValue` became final
- [BC] Class `Psalm\Issue\ImplementedParamTypeMismatch` became final
- [BC] Class `Psalm\Issue\InvalidConstantAssignmentValue` became final
- [BC] Class `Psalm\Issue\PossiblyUndefinedMethod` became final
- [BC] Class `Psalm\Issue\DuplicateEnumCaseValue` became final
- [BC] Class `Psalm\Issue\RawObjectIteration` became final
- [BC] Class `Psalm\Issue\UndefinedVariable` became final
- [BC] Class `Psalm\Issue\MissingDocblockType` became final
- [BC] Class `Psalm\Issue\NullArrayOffset` became final
- [BC] Class `Psalm\Issue\PropertyNotSetInConstructor` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidPropertyAssignment` became final
- [BC] Class `Psalm\Issue\PossiblyNullPropertyAssignmentValue` became final
- [BC] Class `Psalm\Issue\UnsafeInstantiation` became final
- [BC] Class `Psalm\Issue\UnimplementedAbstractMethod` became final
- [BC] Class `Psalm\Issue\UnusedClosureParam` became final
- [BC] Class `Psalm\Issue\PossiblyNullFunctionCall` became final
- [BC] Class `Psalm\Issue\UndefinedAttributeClass` became final
- [BC] Class `Psalm\Issue\NullableReturnStatement` became final
- [BC] Class `Psalm\Issue\DuplicateMethod` became final
- [BC] Class `Psalm\Issue\TooFewArguments` became final
- [BC] Class `Psalm\Issue\UndefinedConstant` became final
- [BC] Class `Psalm\Issue\NullReference` became final
- [BC] Class `Psalm\Issue\ImplementedReturnTypeMismatch` became final
- [BC] Class `Psalm\Issue\InvalidEnumBackingType` became final
- [BC] Class `Psalm\Issue\InvalidNullableReturnType` became final
- [BC] Class `Psalm\Issue\ImpureVariable` became final
- [BC] Class `Psalm\Issue\TypeDoesNotContainNull` became final
- [BC] Class `Psalm\Issue\ConstructorSignatureMismatch` became final
- [BC] Class `Psalm\Issue\ImpurePropertyFetch` became final
- [BC] Class `Psalm\Issue\RedundantCastGivenDocblockType` became final
- [BC] Class `Psalm\Issue\PropertyTypeCoercion` became final
- [BC] Class `Psalm\Issue\InvalidDocblockParamName` became final
- [BC] Class `Psalm\Issue\UnsafeGenericInstantiation` became final
- [BC] Class `Psalm\Issue\MissingClosureParamType` became final
- [BC] Class `Psalm\Issue\TraitMethodSignatureMismatch` became final
- [BC] Class `Psalm\Issue\ImpureStaticProperty` became final
- [BC] Class `Psalm\Issue\InvalidThrow` became final
- [BC] Class `Psalm\Issue\ParentNotFound` became final
- [BC] Class `Psalm\Issue\ImpureStaticVariable` became final
- [BC] Class `Psalm\Issue\PossiblyFalseReference` became final
- [BC] Class `Psalm\Issue\ComplexMethod` became final
- [BC] Class `Psalm\Issue\PossiblyNullArrayAssignment` became final
- [BC] Class `Psalm\Issue\AbstractInstantiation` became final
- [BC] Class `Psalm\Issue\UncaughtThrowInGlobalScope` became final
- [BC] Class `Psalm\Issue\MismatchingDocblockPropertyType` became final
- [BC] Class `Psalm\Issue\UnresolvableInclude` became final
- [BC] Class `Psalm\Issue\DocblockTypeContradiction` became final
- [BC] Class `Psalm\Issue\TaintedEval` became final
- [BC] Class `Psalm\Issue\UnusedVariable` became final
- [BC] Class `Psalm\Issue\DeprecatedConstant` became final
- [BC] Class `Psalm\Issue\TaintedSystemSecret` became final
- [BC] Class `Psalm\Issue\EmptyArrayAccess` became final
- [BC] Class `Psalm\Issue\UndefinedInterface` became final
- [BC] Class `Psalm\Issue\MixedInferredReturnType` became final
- [BC] Class `Psalm\Issue\TaintedCookie` became final
- [BC] Class `Psalm\Issue\UndefinedMagicPropertyAssignment` became final
- [BC] Class `Psalm\Issue\NamedArgumentNotAllowed` became final
- [BC] Class `Psalm\Issue\MethodSignatureMustProvideReturnType` became final
- [BC] Class `Psalm\Issue\MissingParamType` became final
- [BC] Class `Psalm\Issue\InvalidArrayAssignment` became final
- [BC] Class `Psalm\Issue\UnimplementedInterfaceMethod` became final
- [BC] Class `Psalm\Issue\InvalidPassByReference` became final
- [BC] Class `Psalm\Issue\MissingDependency` became final
- [BC] Class `Psalm\Issue\ReferenceConstraintViolation` became final
- [BC] Class `Psalm\Issue\TaintedLdap` became final
- [BC] Class `Psalm\Issue\PossiblyNullIterator` became final
- [BC] Class `Psalm\Issue\InvalidScalarArgument` became final
- [BC] Class `Psalm\Issue\DeprecatedMethod` became final
- [BC] Class `Psalm\Issue\NullPropertyAssignment` became final
- [BC] Class `Psalm\Issue\InvalidExtendClass` became final
- [BC] Class `Psalm\Issue\DeprecatedClass` became final
- [BC] Class `Psalm\Issue\ReferenceReusedFromConfusingScope` became final
- [BC] Class `Psalm\Issue\UndefinedFunction` became final
- [BC] Class `Psalm\Issue\LessSpecificImplementedReturnType` became final
- [BC] Class `Psalm\Issue\NullIterator` became final
- [BC] Class `Psalm\Issue\TaintedInclude` became final
- [BC] Class `Psalm\Issue\UnusedMethodCall` became final
- [BC] Class `Psalm\Issue\InvalidIterator` became final
- [BC] Class `Psalm\Issue\PsalmInternalError` became final
- [BC] Class `Psalm\Issue\InvalidParent` became final
- [BC] Class `Psalm\Issue\AmbiguousConstantInheritance` became final
- [BC] Class `Psalm\Issue\InvalidLiteralArgument` became final
- [BC] Class `Psalm\Issue\MixedReturnStatement` became final
- [BC] Class `Psalm\Issue\AbstractMethodCall` became final
- [BC] Class `Psalm\Issue\InvalidClone` became final
- [BC] Class `Psalm\Issue\DuplicateEnumCase` became final
- [BC] Class `Psalm\Issue\InvalidDocblock` became final
- [BC] Class `Psalm\Issue\RedundantIdentityWithTrue` became final
- [BC] Class `Psalm\Issue\MissingReturnType` became final
- [BC] Class `Psalm\Issue\RedundantCondition` became final
- [BC] Class `Psalm\Issue\UnnecessaryVarAnnotation` became final
- [BC] Class `Psalm\Issue\ConfigIssue` became final
- [BC] Class `Psalm\Issue\InternalClass` became final
- [BC] Class `Psalm\Issue\UndefinedDocblockClass` became final
- [BC] Class `Psalm\Issue\DuplicateParam` became final
- [BC] Class `Psalm\Issue\MismatchingDocblockParamType` became final
- [BC] Class `Psalm\Issue\LessSpecificReturnType` became final
- [BC] Class `Psalm\Issue\PossiblyUnusedProperty` became final
- [BC] Class `Psalm\Issue\PossiblyNullReference` became final
- [BC] Class `Psalm\Issue\MissingFile` became final
- [BC] Class `Psalm\Issue\InvalidArgument` became final
- [BC] Class `Psalm\Issue\PossiblyUndefinedGlobalVariable` became final
- [BC] Class `Psalm\Issue\UndefinedThisPropertyAssignment` became final
- [BC] Class `Psalm\Issue\ConflictingReferenceConstraint` became final
- [BC] Class `Psalm\Issue\InvalidCast` became final
- [BC] Class `Psalm\Issue\MoreSpecificReturnType` became final
- [BC] Class `Psalm\Issue\ImpureMethodCall` became final
- [BC] Class `Psalm\Issue\UnrecognizedExpression` became final
- [BC] Class `Psalm\Issue\NoValue` became final
- [BC] Class `Psalm\Issue\DeprecatedInterface` became final
- [BC] Class `Psalm\Issue\InvalidStringClass` became final
- [BC] Class `Psalm\Issue\MixedMethodCall` became final
- [BC] Class `Psalm\Issue\UndefinedMagicMethod` became final
- [BC] Class `Psalm\Issue\MissingThrowsDocblock` became final
- [BC] Class `Psalm\Issue\TaintedTextWithQuotes` became final
- [BC] Class `Psalm\Issue\InvalidReturnStatement` became final
- [BC] Class `Psalm\Issue\DeprecatedFunction` became final
- [BC] Class `Psalm\Issue\InterfaceInstantiation` became final
- [BC] Class `Psalm\Issue\TooManyArguments` became final
- [BC] Class `Psalm\Issue\PossibleRawObjectIteration` became final
- [BC] Class `Psalm\Issue\PossiblyFalsePropertyAssignmentValue` became final
- [BC] Class `Psalm\Issue\FalsableReturnStatement` became final
- [BC] Class `Psalm\Issue\RedundantFunctionCall` became final
- [BC] Class `Psalm\Issue\ImplementationRequirementViolation` became final
- [BC] Class `Psalm\Issue\InternalMethod` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidFunctionCall` became final
- [BC] Class `Psalm\Issue\OverriddenMethodAccess` became final
- [BC] Class `Psalm\Issue\MixedArgumentTypeCoercion` became final
- [BC] Class `Psalm\Issue\InvalidAttribute` became final
- [BC] Class `Psalm\Issue\UndefinedInterfaceMethod` became final
- [BC] Class `Psalm\Issue\InvalidPropertyFetch` became final
- [BC] Class `Psalm\Issue\PossiblyUnusedMethod` became final
- [BC] Class `Psalm\Issue\UndefinedTrace` became final
- [BC] Class `Psalm\Issue\NullArgument` became final
- [BC] Class `Psalm\Issue\UndefinedMethod` became final
- [BC] Class `Psalm\Issue\TaintedUserSecret` became final
- [BC] Class `Psalm\Issue\UndefinedTrait` became final
- [BC] Class `Psalm\Issue\UnusedClass` became final
- [BC] Class `Psalm\Issue\StringIncrement` became final
- [BC] Class `Psalm\Issue\InaccessibleMethod` became final
- [BC] Class `Psalm\Issue\PossiblyUnusedParam` became final
- [BC] Class `Psalm\Issue\Trace` became final
- [BC] Class `Psalm\Issue\UnhandledMatchCondition` became final
- [BC] Class `Psalm\Issue\DuplicateClass` became final
- [BC] Class `Psalm\Issue\InvalidClass` became final
- [BC] Class `Psalm\Issue\TypeDoesNotContainType` became final
- [BC] Class `Psalm\Issue\InvalidScope` became final
- [BC] Class `Psalm\Issue\TaintedCustom` became final
- [BC] Class `Psalm\Issue\TaintedSSRF` became final
- [BC] Class `Psalm\Issue\InvalidNamedArgument` became final
- [BC] Class `Psalm\Issue\InvalidPropertyAssignmentValue` became final
- [BC] Class `Psalm\Issue\ContinueOutsideLoop` became final
- [BC] Class `Psalm\Issue\MixedArgument` became final
- [BC] Class `Psalm\Issue\TaintedSql` became final
- [BC] Class `Psalm\Issue\UnusedFunctionCall` became final
- [BC] Class `Psalm\Issue\InternalProperty` became final
- [BC] Class `Psalm\Issue\InvalidParamDefault` became final
- [BC] Class `Psalm\Issue\RedundantPropertyInitializationCheck` became final
- [BC] Class `Psalm\Issue\InvalidTraversableImplementation` became final
- [BC] Class `Psalm\Issue\InvalidTemplateParam` became final
- [BC] Class `Psalm\Issue\InvalidStaticInvocation` became final
- [BC] Class `Psalm\Issue\MixedArrayOffset` became final
- [BC] Class `Psalm\Issue\PossiblyInvalidClone` became final
- [BC] Class `Psalm\Issue\InvalidFunctionCall` became final
- [BC] Class `Psalm\Issue\InvalidMethodCall` became final
- [BC] Class `Psalm\Issue\ComplexFunction` became final
- [BC] Class `Psalm\Issue\UnusedPsalmSuppress` became final
- [BC] Class `Psalm\Issue\MixedStringOffsetAssignment` became final
- [BC] Class `Psalm\Issue\UnrecognizedStatement` became final
- [BC] Class `Psalm\Issue\TaintedFile` became final
- [BC] Class `Psalm\Issue\UnusedMethod` became final
- [BC] Class `Psalm\Issue\PossiblyFalseArgument` became final
- [BC] Class `Psalm\Issue\DeprecatedProperty` became final
- [BC] Class `Psalm\Issue\PossiblyUndefinedVariable` became final
- [BC] Class `Psalm\Issue\PossiblyNullPropertyAssignment` became final
- [BC] Class `Psalm\Issue\MixedOperand` became final
- [BC] Class `Psalm\Issue\NoInterfaceProperties` became final
- [BC] Class `Psalm\Issue\InvalidReturnType` became final
- [BC] Class `Psalm\Issue\MixedArrayTypeCoercion` became final
- [BC] Class `Psalm\Issue\ParadoxicalCondition` became final
- [BC] Class `Psalm\Issue\InvalidToString` became final
- [BC] Class `Psalm\Issue\MethodSignatureMismatch` became final
- [BC] Class `Psalm\Issue\PossiblyFalseOperand` became final
- [BC] Class `Psalm\Issue\UndefinedClass` became final
- [BC] Class `Psalm\Issue\OverriddenInterfaceConstant` became final
- [BC] Class `Psalm\Issue\MissingTemplateParam` became final
- [BC] Class `Psalm\Issue\InvalidArrayOffset` became final
- [BC] Class `Psalm\Issue\MoreSpecificImplementedParamType` became final
- [BC] Class `Psalm\Issue\UninitializedProperty` became final
- [BC] Class `Psalm\Issue\ParseError` became final
- [BC] Class `Psalm\Issue\PossiblyUndefinedStringArrayOffset` became final
- [BC] Class `Psalm\Issue\ExtensionRequirementViolation` became final
## Removed
- [BC] Property `Psalm\Codebase::$php_major_version` was removed, use
@ -279,3 +564,4 @@
- :information_source: migration possible using `Psalm\PluginFileExtensionsSocket`
- [BC] Method `\Psalm\Plugin\EventHandler\Event\AfterFunctionLikeAnalysisEvent::getClasslikeStorage()` was removed,
use correct `\Psalm\Plugin\EventHandler\Event\AfterFunctionLikeAnalysisEvent::getFunctionlikeStorage()` instead