Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/roave-backward-compatibility-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@ static function (string $installationPath) use ($composerIo): Installer {
)),
)),
new ClassBased\SkipClassBasedErrors(new ClassBased\PropertyChanged(
new PropertyBased\SkipPropertyBasedErrors(new PropertyBased\OnlyPublicPropertyChanged(
new PropertyBased\SkipPropertyBasedErrors(new PropertyBased\OnlyPublicPropertyChanged(new PropertyBased\ExcludeInternalProperty(
new PropertyBased\MultipleChecksOnAProperty(
new PropertyBased\SkipPropertyBasedErrors(new PropertyBased\PropertyBecameInternal()),
new PropertyBased\SkipPropertyBasedErrors(new PropertyBased\PropertyTypeChanged(new TypeIsContravariant(), new TypeIsCovariant())),
new PropertyBased\SkipPropertyBasedErrors(new PropertyBased\PropertyDefaultValueChanged()),
new PropertyBased\SkipPropertyBasedErrors(new PropertyBased\PropertyVisibilityReduced()),
new PropertyBased\SkipPropertyBasedErrors(new PropertyBased\PropertyScopeChanged()),
),
)),
))),
)),
new ClassBased\SkipClassBasedErrors(new ClassBased\MethodChanged(
new MethodBased\SkipMethodBasedErrors(new MethodBased\OnlyPublicMethodChanged(new MethodBased\ExcludeInternalMethod(
Expand Down
14 changes: 13 additions & 1 deletion test/e2e/Command/AssertBackwardsCompatibleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ final class TheClass
{
public const UNCHANGED_CONSTANT = __DIR__;

/** @internal */
public array $internalProperty = [];

public function method(A $a)
{
}
Expand All @@ -74,6 +77,9 @@ final class TheClass
{
public const UNCHANGED_CONSTANT = __DIR__;

/** @internal */
public array $internalProperty = ['a'];

public function method(B $a)
{
}
Expand All @@ -94,14 +100,17 @@ final class TheClass
{
public const UNCHANGED_CONSTANT = __DIR__;

/** @internal */
public array $internalProperty = ['b'];

public function method(C $a)
{
}
}

PHP
,
// The last version resets the class to its initial state
// The last version resets the class to its initial state (except internal property)
<<<'PHP'
<?php

Expand All @@ -115,6 +124,9 @@ final class TheClass
{
public const UNCHANGED_CONSTANT = __DIR__;

/** @internal */
public array $internalProperty = ['c'];

public function method(A $a)
{
}
Expand Down