Skip to content

6.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 26 Dec 06:14
· 66 commits to 6.1.x since this release
6.0.0
316285b

roave/backward-compatibility-check 6.0.0

Merry Christmas! 🎄 🎅

This release of roave/backward-compatibility-check brings some major features:

  • php:~8.0.12 and php:~8.1.0 support
  • composer/composer:^2.2.1 support
  • detection of BC breaks due to renamed method parameters: since PHP 8.0 introduced named parameters,
    changing the name of a parameter is considered backwards-incompatible, unless you annotate the function/method
    with @no-named-arguments.
  • detection of BC breaks due to class property native type changes
  • detection of BC breaks due to type variance in parameters/return values in union and intersection types
  • --format=github-actions output format, for better integration with GitHub Actions
  • ability to run with --install-development-dependencies, to also include your require-dev in autoload definitions,
    during analysis.
  • internal type safety with vimeo/psalm
  • full mutation test coverage with roave/infection-static-analysis-plugin

BC Breaks

This release includes multiple changes to bring it up-to-date with the latest capabilities
from roave/better-reflection:5.0.0.

In order to upgrade to the latest and greatest of each library, some internals of this library
have changed radically.

If you were using the library as a CLI tool only, you only need to worry about these new checks,
which may affect your build automation:

  • property type change analysis
  • parameter name change analysis

If you were extending/customizing this library, chances are that you may need to perform major adjustments,
in order to reach compatibility with 6.0.0.

Generated list of BC breaks:

Changed

  • [BC] The parameter $definedSymbols of Roave\BackwardCompatibility\CompareApi#__invoke() changed from Roave\BetterReflection\Reflector\ClassReflector to Roave\BetterReflection\Reflector\Reflector
  • [BC] The parameter $pastSourcesWithDependencies of Roave\BackwardCompatibility\CompareApi#__invoke() changed from Roave\BetterReflection\Reflector\ClassReflector to Roave\BetterReflection\Reflector\Reflector
  • [BC] The parameter $newSourcesWithDependencies of Roave\BackwardCompatibility\CompareApi#__invoke() changed from Roave\BetterReflection\Reflector\ClassReflector to Roave\BetterReflection\Reflector\Reflector
  • [BC] The return type of Roave\BackwardCompatibility\Changes#getIterator() changed from iterable to the non-covariant Traversable
  • [BC] The number of required arguments for Roave\BackwardCompatibility\LocateDependencies\LocateDependenciesViaComposer#__invoke() increased from 1 to 2
  • [BC] The number of required arguments for Roave\BackwardCompatibility\LocateDependencies\LocateDependencies#__invoke() increased from 1 to 2
  • [BC] The return type of Roave\BackwardCompatibility\Factory\ComposerInstallationReflectorFactory#__invoke() changed from Roave\BetterReflection\Reflector\ClassReflector to the non-covariant Roave\BetterReflection\Reflector\Reflector
  • [BC] The parameter $type of Roave\BackwardCompatibility\DetectChanges\Variance\TypeIsCovariant#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionType|null to a non-contravariant Roave\BetterReflection\Reflection\ReflectionIntersectionType|Roave\BetterReflection\Reflection\ReflectionUnionType|Roave\BetterReflection\Reflection\ReflectionNamedType|null
  • [BC] The parameter $comparedType of Roave\BackwardCompatibility\DetectChanges\Variance\TypeIsCovariant#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionType|null to a non-contravariant Roave\BetterReflection\Reflection\ReflectionIntersectionType|Roave\BetterReflection\Reflection\ReflectionUnionType|Roave\BetterReflection\Reflection\ReflectionNamedType|null
  • [BC] The parameter $type of Roave\BackwardCompatibility\DetectChanges\Variance\TypeIsContravariant#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionType|null to a non-contravariant Roave\BetterReflection\Reflection\ReflectionIntersectionType|Roave\BetterReflection\Reflection\ReflectionUnionType|Roave\BetterReflection\Reflection\ReflectionNamedType|null
  • [BC] The parameter $comparedType of Roave\BackwardCompatibility\DetectChanges\Variance\TypeIsContravariant#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionType|null to a non-contravariant Roave\BetterReflection\Reflection\ReflectionIntersectionType|Roave\BetterReflection\Reflection\ReflectionUnionType|Roave\BetterReflection\Reflection\ReflectionNamedType|null
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\SkipFunctionBasedErrors#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\SkipFunctionBasedErrors#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ReturnTypeCovarianceChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ReturnTypeCovarianceChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ReturnTypeChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ReturnTypeChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ReturnTypeByReferenceChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ReturnTypeByReferenceChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\RequiredParameterAmountIncreased#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\RequiredParameterAmountIncreased#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ParameterTypeContravarianceChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ParameterTypeContravarianceChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ParameterTypeChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ParameterTypeChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ParameterDefaultValueChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ParameterDefaultValueChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ParameterByReferenceChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ParameterByReferenceChanged#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\MultipleChecksOnAFunction#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\MultipleChecksOnAFunction#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\FunctionBecameInternal#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\FunctionBecameInternal#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\FunctionBased#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\FunctionBased#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\FunctionBased#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\FunctionBased#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $fromFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ExcludeInternalFunction#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] The parameter $toFunction of Roave\BackwardCompatibility\DetectChanges\BCBreak\FunctionBased\ExcludeInternalFunction#__invoke() changed from Roave\BetterReflection\Reflection\ReflectionFunctionAbstract to a non-contravariant Roave\BetterReflection\Reflection\ReflectionMethod|Roave\BetterReflection\Reflection\ReflectionFunction
  • [BC] Symfony\Component\Console\Command\Command#mergeApplicationDefinition() was marked "@internal"

Removed

  • [BC] Class Roave\BackwardCompatibility\Formatter\ReflectionFunctionAbstractName has been deleted
  • [BC] Class Roave\BackwardCompatibility\Factory\DirectoryReflectorFactory has been deleted
  • [BC] Class Roave\BackwardCompatibility\DetectChanges\BCBreak\PropertyBased\PropertyDocumentedTypeChanged has been deleted
  • [BC] Method Symfony\Component\Console\Command\Command#mergeApplicationDefinition() was removed

6.0.0

  • Total issues resolved: 10
  • Total pull requests resolved: 59
  • Total contributors: 14

bug,duplicate

enhancement

dependencies,php

dependencies,github_actions

bug

enhancement,github_actions

dependencies,enhancement,php

bc break,enhancement

bc break,enhancement,hacktoberfest-accepted

dependencies

dependencies,enhancement

duplicate,enhancement

enhancement,good first issue