diff --git a/bin/roave-backward-compatibility-check.php b/bin/roave-backward-compatibility-check.php index 44ef173f..ea5c2bda 100644 --- a/bin/roave-backward-compatibility-check.php +++ b/bin/roave-backward-compatibility-check.php @@ -206,7 +206,7 @@ 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())), @@ -214,7 +214,7 @@ static function (string $installationPath) use ($composerIo): Installer { 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( diff --git a/test/e2e/Command/AssertBackwardsCompatibleTest.php b/test/e2e/Command/AssertBackwardsCompatibleTest.php index 371f649a..e818620e 100644 --- a/test/e2e/Command/AssertBackwardsCompatibleTest.php +++ b/test/e2e/Command/AssertBackwardsCompatibleTest.php @@ -54,6 +54,9 @@ final class TheClass { public const UNCHANGED_CONSTANT = __DIR__; + /** @internal */ + public array $internalProperty = []; + public function method(A $a) { } @@ -74,6 +77,9 @@ final class TheClass { public const UNCHANGED_CONSTANT = __DIR__; + /** @internal */ + public array $internalProperty = ['a']; + public function method(B $a) { } @@ -94,6 +100,9 @@ final class TheClass { public const UNCHANGED_CONSTANT = __DIR__; + /** @internal */ + public array $internalProperty = ['b']; + public function method(C $a) { } @@ -101,7 +110,7 @@ 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'