6.0.0
roave/backward-compatibility-check
6.0.0
Merry Christmas! 🎄 🎅
This release of roave/backward-compatibility-check
brings some major features:
php:~8.0.12
andphp:~8.1.0
supportcomposer/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 yourrequire-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
- 371: #342 implemented GitHub Actions output format thanks to @Ocramius
- 340: Add testsand implementation for property types changing from docblock-only to native type thanks to @tomasnorre
- 323: Use native invocations instead of explicit
__invoke()
thanks to @Ocramius - 322:
totallyTyped="true"
in psalm configuration thanks to @Ocramius - 306: replace
thecodingmachine/safe
,webmozart/assert
, andsymfony/process
byazjezz/psl
thanks to @azjezz - 305: Support
composer/composer:^2
thanks to @Legion112 - 288: Expanded the CI documentation to make it clearer about tags and suchlike thanks to @asgrim
- 269: Improve message for classes with removed traits with properties thanks to @acrobat
- 203: Add option to install
require-dev
dependencies when analyzing a codebase thanks to @Nyholm - 59: Use native invocations instead of explicit __invoke() thanks to @Majkl578
dependencies,php
- 370: Bump phpunit/phpunit from 9.5.10 to 9.5.11 thanks to @dependabot[bot]
- 368: Upgraded to stable
roave/better-reflection:^5.0.0
, now that it is released thanks to @Ocramius - 366: Bump composer/composer from 2.1.14 to 2.2.1 thanks to @dependabot[bot]
- 365: Bump beberlei/assert from 3.3.1 to 3.3.2 thanks to @dependabot[bot]
- 364: Bump roave/infection-static-analysis-plugin from 1.12.0 to 1.13.0 thanks to @dependabot[bot]
- 363: Bump seld/phar-utils from 1.1.2 to 1.2.0 thanks to @dependabot[bot]
- 362: Bump squizlabs/php_codesniffer from 3.6.1 to 3.6.2 thanks to @dependabot[bot] and @Ocramius
- 359: Bump symfony/console from 5.4.0 to 5.4.1 thanks to @dependabot[bot]
- 358: Bump symfony/string from 6.0.0 to 6.0.1 thanks to @dependabot[bot]
- 355: Bump vimeo/psalm from 4.14.0 to 4.15.0 thanks to @dependabot[bot]
- 354: Bump slevomat/coding-standard from 7.0.17 to 7.0.18 thanks to @dependabot[bot]
- 353: Bump slevomat/coding-standard from 7.0.16 to 7.0.17 thanks to @dependabot[bot]
- 351: Bump phpunit/php-file-iterator from 3.0.5 to 3.0.6 thanks to @dependabot[bot]
- 350: Bump roave/infection-static-analysis-plugin from 1.10.0 to 1.12.0 thanks to @dependabot[bot]
- 347: Bump vimeo/psalm from 4.12.0 to 4.14.0 thanks to @dependabot[bot]
- 346: Bump phpunit/php-code-coverage from 9.2.8 to 9.2.10 thanks to @dependabot[bot]
- 343: Bump composer/composer from 2.1.11 to 2.1.14 thanks to @dependabot[bot]
- 337: Bump vimeo/psalm from 4.12.0 to 4.13.1 thanks to @dependabot[bot]
- 334: Bump phpunit/php-code-coverage from 9.2.8 to 9.2.9 thanks to @dependabot[bot]
- 333: Bump vimeo/psalm from 4.12.0 to 4.13.0 thanks to @dependabot[bot]
- 331: Bump composer/spdx-licenses from 1.5.5 to 1.5.6 thanks to @dependabot[bot]
- 328: Bump sebastian/exporter from 4.0.3 to 4.0.4 thanks to @dependabot[bot]
- 327: Bump composer/composer from 2.1.11 to 2.1.12 thanks to @dependabot[bot]
- 325: Bump vimeo/psalm from 4.11.2 to 4.12.0 thanks to @dependabot[bot]
dependencies,github_actions
- 367: Bump laminas/laminas-continuous-integration-action from 1.14.1 to 1.14.2 thanks to @dependabot[bot]
- 345: Bump laminas/laminas-continuous-integration-action from 1.14.0 to 1.14.1 thanks to @dependabot[bot]
- 344: Bump laminas/laminas-continuous-integration-action from 1.13.2 to 1.14.0 thanks to @dependabot[bot]
bug
- 361: Remove accidental dependency on thecodingmachine/safe thanks to @asgrim
- 318: Fix YAML indentation in GitHub actions integration docs thanks to @Legion112
- 282: Remove extra redundant word in reported BC break text thanks to @greg0ire
enhancement,github_actions
- 352: Run BC checks as part of the main
"Continuous Integration"
workflow thanks to @Ocramius
dependencies,enhancement,php
bc break,enhancement
- 324: PHP 8.0 and PHP 8.1 support, BetterReflection 5.x upgrade thanks to @Ocramius and @WyriHaximus
- 320: Upgrade CI setup, configure Dependabot with auto-merge thanks to @Ocramius and @asgrim
- 266: Detect BC breaks due to parameter name changes, in line with PHP 8.0 named arguments requirements thanks to @asgrim
bc break,enhancement,hacktoberfest-accepted
dependencies
- 296: Upgrade to GitHub-native Dependabot thanks to @dependabot-preview[bot]
- 286: Bump symfony/console from 5.2.1 to 5.2.2 thanks to @dependabot-preview[bot]
- 284: Bump symfony/process from 5.2.1 to 5.2.2 thanks to @dependabot-preview[bot]
- 281: Bump thecodingmachine/safe from 1.1.3 to 1.3.3 thanks to @dependabot-preview[bot]
- 278: Bump nikolaposa/version from 4.0.0 to 4.1.0 thanks to @dependabot-preview[bot]
- 277: Bump ocramius/package-versions from 1.10.0 to 1.11.0 thanks to @dependabot-preview[bot]
- 276: Bump symfony/console from 5.1.2 to 5.2.1 thanks to @dependabot-preview[bot]
- 275: Bump doctrine/coding-standard from 8.1.0 to 8.2.0 thanks to @dependabot-preview[bot]
- 274: Bump symfony/process from 5.1.2 to 5.2.1 thanks to @dependabot-preview[bot]
- 272: Bump squizlabs/php_codesniffer from 3.5.5 to 3.5.8 thanks to @dependabot-preview[bot] and @Legion112
dependencies,enhancement
- 295: Replaced PHPUnit's
at()
matcher withonConsecutive()
in mock/spy methods thanks to @weirdan - 261: Replace Travis-CI with Github Actions thanks to @Ocramius
- 254: Moved all builds and tests to github actions thanks to @Ocramius