diff --git a/ChangeLog-8.0.md b/ChangeLog-8.0.md index c149cc8211f..2e8230370cf 100644 --- a/ChangeLog-8.0.md +++ b/ChangeLog-8.0.md @@ -7,6 +7,7 @@ All notable changes of the PHPUnit 8.0 release series are documented in this fil ### Changed * Implemented [#3133](https://github.com/sebastianbergmann/phpunit/issues/3133): Enable dependency resolution by default +* Implemented [#3236](https://github.com/sebastianbergmann/phpunit/issues/3236): Define which parts of PHPUnit are covered by the backward compatibility promise * Implemented [#3244](https://github.com/sebastianbergmann/phpunit/issues/3244): Enable result cache by default * Implemented [#3288](https://github.com/sebastianbergmann/phpunit/issues/3288): The `void_return` fixer of php-cs-fixer is now in effect * Implemented [#3332](https://github.com/sebastianbergmann/phpunit/issues/3332): Deprecate annotation(s) for expecting exceptions diff --git a/src/Exception.php b/src/Exception.php index d5d34417ec1..833b49a8763 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -10,7 +10,7 @@ namespace PHPUnit; /** - * Marker interface for PHPUnit exceptions. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface Exception { diff --git a/src/Framework/AssertionFailedError.php b/src/Framework/AssertionFailedError.php index 1dcff604a7f..0ba25286f6c 100644 --- a/src/Framework/AssertionFailedError.php +++ b/src/Framework/AssertionFailedError.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework; /** - * Thrown when an assertion failed. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class AssertionFailedError extends Exception implements SelfDescribing { diff --git a/src/Framework/CodeCoverageException.php b/src/Framework/CodeCoverageException.php index 084e6bcbf93..36b07231301 100644 --- a/src/Framework/CodeCoverageException.php +++ b/src/Framework/CodeCoverageException.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ class CodeCoverageException extends Exception { } diff --git a/src/Framework/CoveredCodeNotExecutedException.php b/src/Framework/CoveredCodeNotExecutedException.php index d01f4db44f7..78f89bc39ee 100644 --- a/src/Framework/CoveredCodeNotExecutedException.php +++ b/src/Framework/CoveredCodeNotExecutedException.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class CoveredCodeNotExecutedException extends RiskyTestError { } diff --git a/src/Framework/DataProviderTestSuite.php b/src/Framework/DataProviderTestSuite.php index 5f04cfbceff..0a465e680f9 100644 --- a/src/Framework/DataProviderTestSuite.php +++ b/src/Framework/DataProviderTestSuite.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class DataProviderTestSuite extends TestSuite { /** diff --git a/src/Framework/Error/Deprecated.php b/src/Framework/Error/Deprecated.php index 5db12061842..566865f1fe1 100644 --- a/src/Framework/Error/Deprecated.php +++ b/src/Framework/Error/Deprecated.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework\Error; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Deprecated extends Error { public static $enabled = true; diff --git a/src/Framework/Error/Error.php b/src/Framework/Error/Error.php index 608a065071e..895f92248fe 100644 --- a/src/Framework/Error/Error.php +++ b/src/Framework/Error/Error.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\Exception; /** - * Wrapper for PHP errors. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class Error extends Exception { diff --git a/src/Framework/Error/Notice.php b/src/Framework/Error/Notice.php index 91c3b8691d2..309af987d0b 100644 --- a/src/Framework/Error/Notice.php +++ b/src/Framework/Error/Notice.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework\Error; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Notice extends Error { public static $enabled = true; diff --git a/src/Framework/Error/Warning.php b/src/Framework/Error/Warning.php index c364a1389a1..b53493dfadf 100644 --- a/src/Framework/Error/Warning.php +++ b/src/Framework/Error/Warning.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework\Error; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Warning extends Error { public static $enabled = true; diff --git a/src/Framework/Exception.php b/src/Framework/Exception.php index d28041a90d7..d7c50e73a08 100644 --- a/src/Framework/Exception.php +++ b/src/Framework/Exception.php @@ -30,6 +30,7 @@ * the parent would break the intended encapsulation of process isolation. * * @see http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class Exception extends \RuntimeException implements \PHPUnit\Exception { diff --git a/src/Framework/ExceptionWrapper.php b/src/Framework/ExceptionWrapper.php index 0c1ea5f1be7..913bcb5b319 100644 --- a/src/Framework/ExceptionWrapper.php +++ b/src/Framework/ExceptionWrapper.php @@ -20,6 +20,8 @@ * * Unlike PHPUnit\Framework_\Exception, the complete stack of previous Exceptions * is processed. + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ExceptionWrapper extends Exception { diff --git a/src/Framework/ExpectationFailedException.php b/src/Framework/ExpectationFailedException.php index 6246db7aded..f7d7a9c7453 100644 --- a/src/Framework/ExpectationFailedException.php +++ b/src/Framework/ExpectationFailedException.php @@ -17,6 +17,8 @@ * The exception contains the error message and optionally a * SebastianBergmann\Comparator\ComparisonFailure which is used to * generate diff output of the failed expectations. + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ExpectationFailedException extends AssertionFailedError { diff --git a/src/Framework/IncompleteTest.php b/src/Framework/IncompleteTest.php index 502fe828d3e..268957c03d7 100644 --- a/src/Framework/IncompleteTest.php +++ b/src/Framework/IncompleteTest.php @@ -10,8 +10,7 @@ namespace PHPUnit\Framework; /** - * A marker interface for marking any exception/error as result of an unit - * test as incomplete implementation or currently not implemented. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface IncompleteTest { diff --git a/src/Framework/IncompleteTestCase.php b/src/Framework/IncompleteTestCase.php index 6b51e4d704f..6cb3066d032 100644 --- a/src/Framework/IncompleteTestCase.php +++ b/src/Framework/IncompleteTestCase.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework; /** - * An incomplete test case + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class IncompleteTestCase extends TestCase { diff --git a/src/Framework/IncompleteTestError.php b/src/Framework/IncompleteTestError.php index a53814daa40..65f9c8bc343 100644 --- a/src/Framework/IncompleteTestError.php +++ b/src/Framework/IncompleteTestError.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class IncompleteTestError extends AssertionFailedError implements IncompleteTest { } diff --git a/src/Framework/InvalidCoversTargetException.php b/src/Framework/InvalidCoversTargetException.php index 865f7cc354c..ebf2994a94e 100644 --- a/src/Framework/InvalidCoversTargetException.php +++ b/src/Framework/InvalidCoversTargetException.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class InvalidCoversTargetException extends CodeCoverageException { } diff --git a/src/Framework/InvalidDataProviderException.php b/src/Framework/InvalidDataProviderException.php index 0827d7e1fd5..7e2ef24c637 100644 --- a/src/Framework/InvalidDataProviderException.php +++ b/src/Framework/InvalidDataProviderException.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class InvalidDataProviderException extends Exception { } diff --git a/src/Framework/MissingCoversAnnotationException.php b/src/Framework/MissingCoversAnnotationException.php index 0b2a5763916..567a6c4c581 100644 --- a/src/Framework/MissingCoversAnnotationException.php +++ b/src/Framework/MissingCoversAnnotationException.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class MissingCoversAnnotationException extends RiskyTestError { } diff --git a/src/Framework/MockObject/Builder/Identity.php b/src/Framework/MockObject/Builder/Identity.php index 4958ee21ce1..a68bfadf9dc 100644 --- a/src/Framework/MockObject/Builder/Identity.php +++ b/src/Framework/MockObject/Builder/Identity.php @@ -10,12 +10,7 @@ namespace PHPUnit\Framework\MockObject\Builder; /** - * Builder interface for unique identifiers. - * - * Defines the interface for recording unique identifiers. The identifiers - * can be used to define the invocation order of expectations. The expectation - * is recorded using id() and then defined in order using - * PHPUnit\Framework\MockObject\Builder\Match::after(). + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface Identity { diff --git a/src/Framework/MockObject/Builder/InvocationMocker.php b/src/Framework/MockObject/Builder/InvocationMocker.php index e88ea0507f5..bca4a5a983d 100644 --- a/src/Framework/MockObject/Builder/InvocationMocker.php +++ b/src/Framework/MockObject/Builder/InvocationMocker.php @@ -17,12 +17,7 @@ use PHPUnit\Framework\MockObject\Stub\MatcherCollection; /** - * Builder for mocked or stubbed invocations. - * - * Provides methods for building expectations without having to resort to - * instantiating the various matchers manually. These methods also form a - * more natural way of reading the expectation. This class should be together - * with the test case PHPUnit\Framework\MockObject\TestCase. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class InvocationMocker implements MethodNameMatch { diff --git a/src/Framework/MockObject/Builder/Match.php b/src/Framework/MockObject/Builder/Match.php index 91e7916fcc0..d343eacfb80 100644 --- a/src/Framework/MockObject/Builder/Match.php +++ b/src/Framework/MockObject/Builder/Match.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework\MockObject\Builder; /** - * Builder interface for invocation order matches. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface Match extends Stub { diff --git a/src/Framework/MockObject/Builder/MethodNameMatch.php b/src/Framework/MockObject/Builder/MethodNameMatch.php index dcd0e31ef45..f4b1150b5ad 100644 --- a/src/Framework/MockObject/Builder/MethodNameMatch.php +++ b/src/Framework/MockObject/Builder/MethodNameMatch.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework\MockObject\Builder; /** - * Builder interface for matcher of method names. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface MethodNameMatch extends ParametersMatch { diff --git a/src/Framework/MockObject/Builder/NamespaceMatch.php b/src/Framework/MockObject/Builder/NamespaceMatch.php index 0d406a8f059..e4651cce323 100644 --- a/src/Framework/MockObject/Builder/NamespaceMatch.php +++ b/src/Framework/MockObject/Builder/NamespaceMatch.php @@ -10,9 +10,7 @@ namespace PHPUnit\Framework\MockObject\Builder; /** - * Interface for builders which can register builders with a given identification. - * - * This interface relates to Identity. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface NamespaceMatch { diff --git a/src/Framework/MockObject/Builder/ParametersMatch.php b/src/Framework/MockObject/Builder/ParametersMatch.php index 8919f965eb0..42bd14679b7 100644 --- a/src/Framework/MockObject/Builder/ParametersMatch.php +++ b/src/Framework/MockObject/Builder/ParametersMatch.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\MockObject\Matcher\AnyParameters; /** - * Builder interface for parameter matchers. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface ParametersMatch extends Match { diff --git a/src/Framework/MockObject/Builder/Stub.php b/src/Framework/MockObject/Builder/Stub.php index 53ff3fea51b..f4f3d4077a3 100644 --- a/src/Framework/MockObject/Builder/Stub.php +++ b/src/Framework/MockObject/Builder/Stub.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\MockObject\Stub as BaseStub; /** - * Builder interface for stubs which are actions replacing an invocation. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface Stub extends Identity { diff --git a/src/Framework/MockObject/Exception/BadMethodCallException.php b/src/Framework/MockObject/Exception/BadMethodCallException.php index 5178b7b2577..7e655e235a9 100644 --- a/src/Framework/MockObject/Exception/BadMethodCallException.php +++ b/src/Framework/MockObject/Exception/BadMethodCallException.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework\MockObject; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class BadMethodCallException extends \BadMethodCallException implements Exception { } diff --git a/src/Framework/MockObject/Exception/Exception.php b/src/Framework/MockObject/Exception/Exception.php index e30bbf32e54..53cbed2aaa1 100644 --- a/src/Framework/MockObject/Exception/Exception.php +++ b/src/Framework/MockObject/Exception/Exception.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework\MockObject; /** - * Interface for exceptions used by PHPUnit_MockObject. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface Exception { diff --git a/src/Framework/MockObject/Exception/RuntimeException.php b/src/Framework/MockObject/Exception/RuntimeException.php index cac3a40b4d5..33b6a5be32f 100644 --- a/src/Framework/MockObject/Exception/RuntimeException.php +++ b/src/Framework/MockObject/Exception/RuntimeException.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework\MockObject; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class RuntimeException extends \RuntimeException implements Exception { } diff --git a/src/Framework/MockObject/Generator.php b/src/Framework/MockObject/Generator.php index 22171c03200..4e1a1052f90 100644 --- a/src/Framework/MockObject/Generator.php +++ b/src/Framework/MockObject/Generator.php @@ -22,7 +22,7 @@ use Traversable; /** - * Mock Object Code Generator + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Generator { diff --git a/src/Framework/MockObject/Invocation/Invocation.php b/src/Framework/MockObject/Invocation/Invocation.php index d0367ac07e6..27556926925 100644 --- a/src/Framework/MockObject/Invocation/Invocation.php +++ b/src/Framework/MockObject/Invocation/Invocation.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework\MockObject; /** - * Interface for invocations. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface Invocation { diff --git a/src/Framework/MockObject/Invocation/ObjectInvocation.php b/src/Framework/MockObject/Invocation/ObjectInvocation.php index 5046a178727..20eb8a69dde 100644 --- a/src/Framework/MockObject/Invocation/ObjectInvocation.php +++ b/src/Framework/MockObject/Invocation/ObjectInvocation.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework\MockObject\Invocation; /** - * Represents a non-static invocation. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ObjectInvocation extends StaticInvocation { diff --git a/src/Framework/MockObject/Invocation/StaticInvocation.php b/src/Framework/MockObject/Invocation/StaticInvocation.php index fd9caf4177e..184181a6611 100644 --- a/src/Framework/MockObject/Invocation/StaticInvocation.php +++ b/src/Framework/MockObject/Invocation/StaticInvocation.php @@ -16,7 +16,7 @@ use SebastianBergmann\Exporter\Exporter; /** - * Represents a static invocation. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class StaticInvocation implements Invocation, SelfDescribing { diff --git a/src/Framework/MockObject/InvocationMocker.php b/src/Framework/MockObject/InvocationMocker.php index e1163b63688..3a65c4b6657 100644 --- a/src/Framework/MockObject/InvocationMocker.php +++ b/src/Framework/MockObject/InvocationMocker.php @@ -19,11 +19,7 @@ use PHPUnit\Framework\MockObject\Stub\MatcherCollection; /** - * Mocker for invocations which are sent from - * MockObject objects. - * - * Keeps track of all expectations and stubs as well as registering - * identifications for builders. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class InvocationMocker implements MatcherCollection, Invokable, NamespaceMatch { diff --git a/src/Framework/MockObject/Invokable.php b/src/Framework/MockObject/Invokable.php index 6ffa2b4d5a4..903880cae41 100644 --- a/src/Framework/MockObject/Invokable.php +++ b/src/Framework/MockObject/Invokable.php @@ -10,10 +10,7 @@ namespace PHPUnit\Framework\MockObject; /** - * Interface for classes which can be invoked. - * - * The invocation will be taken from a mock object and passed to an object - * of this class. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface Invokable extends Verifiable { diff --git a/src/Framework/MockObject/Matcher.php b/src/Framework/MockObject/Matcher.php index 41925371a5f..583d035985a 100644 --- a/src/Framework/MockObject/Matcher.php +++ b/src/Framework/MockObject/Matcher.php @@ -19,13 +19,7 @@ use PHPUnit\Framework\TestFailure; /** - * Main matcher which defines a full expectation using method, parameter and - * invocation matchers. - * This matcher encapsulates all the other matchers and allows the builder to - * set the specific matchers when the appropriate methods are called (once(), - * where() etc.). - * - * All properties are public so that they can easily be accessed by the builder. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Matcher implements MatcherInvocation { diff --git a/src/Framework/MockObject/Matcher/AnyInvokedCount.php b/src/Framework/MockObject/Matcher/AnyInvokedCount.php index 2094280a48e..15504ac9a37 100644 --- a/src/Framework/MockObject/Matcher/AnyInvokedCount.php +++ b/src/Framework/MockObject/Matcher/AnyInvokedCount.php @@ -10,8 +10,7 @@ namespace PHPUnit\Framework\MockObject\Matcher; /** - * Invocation matcher which checks if a method has been invoked zero or more - * times. This matcher will always match. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class AnyInvokedCount extends InvokedRecorder { diff --git a/src/Framework/MockObject/Matcher/AnyParameters.php b/src/Framework/MockObject/Matcher/AnyParameters.php index 2b2b764ab9e..24386951624 100644 --- a/src/Framework/MockObject/Matcher/AnyParameters.php +++ b/src/Framework/MockObject/Matcher/AnyParameters.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; /** - * Invocation matcher which allows any parameters to a method. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class AnyParameters extends StatelessInvocation { diff --git a/src/Framework/MockObject/Matcher/ConsecutiveParameters.php b/src/Framework/MockObject/Matcher/ConsecutiveParameters.php index 4114b2907f3..bd44091a6c4 100644 --- a/src/Framework/MockObject/Matcher/ConsecutiveParameters.php +++ b/src/Framework/MockObject/Matcher/ConsecutiveParameters.php @@ -15,14 +15,7 @@ use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; /** - * Invocation matcher which looks for sets of specific parameters in the invocations. - * - * Checks the parameters of the incoming invocations, the parameter list is - * checked against the defined constraints in $parameters. If the constraint - * is met it will return true in matches(). - * - * It takes a list of match groups and and increases a call index after each invocation. - * So the first invocation uses the first group of constraints, the second the next and so on. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ConsecutiveParameters extends StatelessInvocation { diff --git a/src/Framework/MockObject/Matcher/DeferredError.php b/src/Framework/MockObject/Matcher/DeferredError.php index 4c1296acb07..160aac497bc 100644 --- a/src/Framework/MockObject/Matcher/DeferredError.php +++ b/src/Framework/MockObject/Matcher/DeferredError.php @@ -11,6 +11,9 @@ use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class DeferredError extends StatelessInvocation { /** diff --git a/src/Framework/MockObject/Matcher/Invocation.php b/src/Framework/MockObject/Matcher/Invocation.php index 99e47617684..bb4f959eff3 100644 --- a/src/Framework/MockObject/Matcher/Invocation.php +++ b/src/Framework/MockObject/Matcher/Invocation.php @@ -14,8 +14,7 @@ use PHPUnit\Framework\SelfDescribing; /** - * Interface for classes which matches an invocation based on its - * method name, argument, order or call count. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface Invocation extends SelfDescribing, Verifiable { diff --git a/src/Framework/MockObject/Matcher/InvokedAtIndex.php b/src/Framework/MockObject/Matcher/InvokedAtIndex.php index e437f0decaf..796b04ec4b2 100644 --- a/src/Framework/MockObject/Matcher/InvokedAtIndex.php +++ b/src/Framework/MockObject/Matcher/InvokedAtIndex.php @@ -13,14 +13,7 @@ use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; /** - * Invocation matcher which checks if a method was invoked at a certain index. - * - * If the expected index number does not match the current invocation index it - * will not match which means it skips all method and parameter matching. Only - * once the index is reached will the method and parameter start matching and - * verifying. - * - * If the index is never reached it will throw an exception in index. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class InvokedAtIndex implements Invocation { diff --git a/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php b/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php index 3f882d787eb..5af382efe07 100644 --- a/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php +++ b/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php @@ -12,8 +12,7 @@ use PHPUnit\Framework\ExpectationFailedException; /** - * Invocation matcher which checks if a method has been invoked at least - * N times. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class InvokedAtLeastCount extends InvokedRecorder { diff --git a/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php b/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php index f5ecaf32cc6..cb0d4fde379 100644 --- a/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php +++ b/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php @@ -12,10 +12,7 @@ use PHPUnit\Framework\ExpectationFailedException; /** - * Invocation matcher which checks if a method has been invoked at least one - * time. - * - * If the number of invocations is 0 it will throw an exception in verify. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class InvokedAtLeastOnce extends InvokedRecorder { diff --git a/src/Framework/MockObject/Matcher/InvokedAtMostCount.php b/src/Framework/MockObject/Matcher/InvokedAtMostCount.php index bb3d31a7d63..40fec094017 100644 --- a/src/Framework/MockObject/Matcher/InvokedAtMostCount.php +++ b/src/Framework/MockObject/Matcher/InvokedAtMostCount.php @@ -12,8 +12,7 @@ use PHPUnit\Framework\ExpectationFailedException; /** - * Invocation matcher which checks if a method has been invoked at least - * N times. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class InvokedAtMostCount extends InvokedRecorder { diff --git a/src/Framework/MockObject/Matcher/InvokedCount.php b/src/Framework/MockObject/Matcher/InvokedCount.php index 9c959d37108..0106542e4e9 100644 --- a/src/Framework/MockObject/Matcher/InvokedCount.php +++ b/src/Framework/MockObject/Matcher/InvokedCount.php @@ -13,12 +13,7 @@ use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; /** - * Invocation matcher which checks if a method has been invoked a certain amount - * of times. - * If the number of invocations exceeds the value it will immediately throw an - * exception, - * If the number is less it will later be checked in verify() and also throw an - * exception. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class InvokedCount extends InvokedRecorder { diff --git a/src/Framework/MockObject/Matcher/InvokedRecorder.php b/src/Framework/MockObject/Matcher/InvokedRecorder.php index 07a84f63bf5..3de42afa474 100644 --- a/src/Framework/MockObject/Matcher/InvokedRecorder.php +++ b/src/Framework/MockObject/Matcher/InvokedRecorder.php @@ -12,10 +12,7 @@ use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; /** - * Records invocations and provides convenience methods for checking them later - * on. - * This abstract class can be implemented by matchers which needs to check the - * number of times an invocation has occurred. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ abstract class InvokedRecorder implements Invocation { diff --git a/src/Framework/MockObject/Matcher/MethodName.php b/src/Framework/MockObject/Matcher/MethodName.php index 3cb9ba1099d..5eda98d139d 100644 --- a/src/Framework/MockObject/Matcher/MethodName.php +++ b/src/Framework/MockObject/Matcher/MethodName.php @@ -15,11 +15,7 @@ use PHPUnit\Util\InvalidArgumentHelper; /** - * Invocation matcher which looks for a specific method name in the invocations. - * - * Checks the method name all incoming invocations, the name is checked against - * the defined constraint $constraint. If the constraint is met it will return - * true in matches(). + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class MethodName extends StatelessInvocation { diff --git a/src/Framework/MockObject/Matcher/Parameters.php b/src/Framework/MockObject/Matcher/Parameters.php index 14802089fcb..143f7857c81 100644 --- a/src/Framework/MockObject/Matcher/Parameters.php +++ b/src/Framework/MockObject/Matcher/Parameters.php @@ -16,11 +16,7 @@ use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; /** - * Invocation matcher which looks for specific parameters in the invocations. - * - * Checks the parameters of all incoming invocations, the parameter list is - * checked against the defined constraints in $parameters. If the constraint - * is met it will return true in matches(). + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Parameters extends StatelessInvocation { diff --git a/src/Framework/MockObject/Matcher/StatelessInvocation.php b/src/Framework/MockObject/Matcher/StatelessInvocation.php index e2ef4ad4830..9100b135179 100644 --- a/src/Framework/MockObject/Matcher/StatelessInvocation.php +++ b/src/Framework/MockObject/Matcher/StatelessInvocation.php @@ -12,11 +12,7 @@ use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; /** - * Invocation matcher which does not care about previous state from earlier - * invocations. - * - * This abstract class can be implemented by matchers which does not care about - * state but only the current run-time value of the invocation itself. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ abstract class StatelessInvocation implements Invocation { diff --git a/src/Framework/MockObject/MockBuilder.php b/src/Framework/MockObject/MockBuilder.php index dd221f1cf19..cfe6e7f1424 100644 --- a/src/Framework/MockObject/MockBuilder.php +++ b/src/Framework/MockObject/MockBuilder.php @@ -11,9 +11,6 @@ use PHPUnit\Framework\TestCase; -/** - * Implementation of the Builder pattern for Mock objects. - */ final class MockBuilder { /** diff --git a/src/Framework/MockObject/MockMethod.php b/src/Framework/MockObject/MockMethod.php index 213e2cc9b90..c380a6ea5c0 100644 --- a/src/Framework/MockObject/MockMethod.php +++ b/src/Framework/MockObject/MockMethod.php @@ -14,6 +14,9 @@ use ReflectionMethod; use Text_Template; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class MockMethod { /** diff --git a/src/Framework/MockObject/MockMethodSet.php b/src/Framework/MockObject/MockMethodSet.php index b81536a73c1..422019f79e7 100644 --- a/src/Framework/MockObject/MockMethodSet.php +++ b/src/Framework/MockObject/MockMethodSet.php @@ -10,6 +10,9 @@ */ namespace PHPUnit\Framework\MockObject; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class MockMethodSet { /** diff --git a/src/Framework/MockObject/MockObject.php b/src/Framework/MockObject/MockObject.php index cbb13676413..0a94beee9ae 100644 --- a/src/Framework/MockObject/MockObject.php +++ b/src/Framework/MockObject/MockObject.php @@ -14,9 +14,6 @@ use PHPUnit\Framework\MockObject\Matcher\Invocation; /** - * Interface for all mock objects which are generated by - * MockBuilder. - * * @method InvocationMocker method($constraint) */ interface MockObject /*extends Verifiable*/ diff --git a/src/Framework/MockObject/Stub.php b/src/Framework/MockObject/Stub.php index b542f58b3ea..f14d4014a0c 100644 --- a/src/Framework/MockObject/Stub.php +++ b/src/Framework/MockObject/Stub.php @@ -12,10 +12,7 @@ use PHPUnit\Framework\SelfDescribing; /** - * An object that stubs the process of a normal method for a mock object. - * - * The stub object will replace the code for the stubbed method and return a - * specific value instead of the original value. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface Stub extends SelfDescribing { diff --git a/src/Framework/MockObject/Stub/ConsecutiveCalls.php b/src/Framework/MockObject/Stub/ConsecutiveCalls.php index 5253dfe6ebe..8806a4700e2 100644 --- a/src/Framework/MockObject/Stub/ConsecutiveCalls.php +++ b/src/Framework/MockObject/Stub/ConsecutiveCalls.php @@ -14,7 +14,7 @@ use SebastianBergmann\Exporter\Exporter; /** - * Stubs a method by returning a user-defined stack of values. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ConsecutiveCalls implements Stub { diff --git a/src/Framework/MockObject/Stub/Exception.php b/src/Framework/MockObject/Stub/Exception.php index 4651012069f..a8f0eb2a119 100644 --- a/src/Framework/MockObject/Stub/Exception.php +++ b/src/Framework/MockObject/Stub/Exception.php @@ -14,7 +14,7 @@ use SebastianBergmann\Exporter\Exporter; /** - * Stubs a method by raising a user-defined exception. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Exception implements Stub { diff --git a/src/Framework/MockObject/Stub/MatcherCollection.php b/src/Framework/MockObject/Stub/MatcherCollection.php index eb0aef4b610..94438989c08 100644 --- a/src/Framework/MockObject/Stub/MatcherCollection.php +++ b/src/Framework/MockObject/Stub/MatcherCollection.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\MockObject\Matcher\Invocation; /** - * Stubs a method by returning a user-defined value. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface MatcherCollection { diff --git a/src/Framework/MockObject/Stub/ReturnArgument.php b/src/Framework/MockObject/Stub/ReturnArgument.php index bc309bfe228..8f0aba48535 100644 --- a/src/Framework/MockObject/Stub/ReturnArgument.php +++ b/src/Framework/MockObject/Stub/ReturnArgument.php @@ -13,7 +13,7 @@ use PHPUnit\Framework\MockObject\Stub; /** - * Stubs a method by returning an argument that was passed to the mocked method. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ReturnArgument implements Stub { diff --git a/src/Framework/MockObject/Stub/ReturnCallback.php b/src/Framework/MockObject/Stub/ReturnCallback.php index 0adf252535d..cfa96c5f03f 100644 --- a/src/Framework/MockObject/Stub/ReturnCallback.php +++ b/src/Framework/MockObject/Stub/ReturnCallback.php @@ -12,6 +12,9 @@ use PHPUnit\Framework\MockObject\Invocation; use PHPUnit\Framework\MockObject\Stub; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class ReturnCallback implements Stub { private $callback; diff --git a/src/Framework/MockObject/Stub/ReturnReference.php b/src/Framework/MockObject/Stub/ReturnReference.php index fa8ab6550c0..2ae692575eb 100644 --- a/src/Framework/MockObject/Stub/ReturnReference.php +++ b/src/Framework/MockObject/Stub/ReturnReference.php @@ -14,7 +14,7 @@ use SebastianBergmann\Exporter\Exporter; /** - * Stubs a method by returning a user-defined reference to a value. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ReturnReference implements Stub { diff --git a/src/Framework/MockObject/Stub/ReturnSelf.php b/src/Framework/MockObject/Stub/ReturnSelf.php index 165c5025f2f..2842fd54cde 100644 --- a/src/Framework/MockObject/Stub/ReturnSelf.php +++ b/src/Framework/MockObject/Stub/ReturnSelf.php @@ -15,7 +15,7 @@ use PHPUnit\Framework\MockObject\Stub; /** - * Stubs a method by returning the current object. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ReturnSelf implements Stub { diff --git a/src/Framework/MockObject/Stub/ReturnStub.php b/src/Framework/MockObject/Stub/ReturnStub.php index e4f1acabac3..81af06425b0 100644 --- a/src/Framework/MockObject/Stub/ReturnStub.php +++ b/src/Framework/MockObject/Stub/ReturnStub.php @@ -14,7 +14,7 @@ use SebastianBergmann\Exporter\Exporter; /** - * Stubs a method by returning a user-defined value. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ReturnStub implements Stub { diff --git a/src/Framework/MockObject/Stub/ReturnValueMap.php b/src/Framework/MockObject/Stub/ReturnValueMap.php index f61ef44953b..9df2995a54e 100644 --- a/src/Framework/MockObject/Stub/ReturnValueMap.php +++ b/src/Framework/MockObject/Stub/ReturnValueMap.php @@ -13,7 +13,7 @@ use PHPUnit\Framework\MockObject\Stub; /** - * Stubs a method by returning a value from a map. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ReturnValueMap implements Stub { diff --git a/src/Framework/MockObject/Verifiable.php b/src/Framework/MockObject/Verifiable.php index f9b9d51ad13..76aa2209e3a 100644 --- a/src/Framework/MockObject/Verifiable.php +++ b/src/Framework/MockObject/Verifiable.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\ExpectationFailedException; /** - * Interface for classes which must verify a given expectation. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface Verifiable { diff --git a/src/Framework/OutputError.php b/src/Framework/OutputError.php index 880d01a1905..1c8b37e5617 100644 --- a/src/Framework/OutputError.php +++ b/src/Framework/OutputError.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class OutputError extends AssertionFailedError { } diff --git a/src/Framework/PHPTAssertionFailedError.php b/src/Framework/PHPTAssertionFailedError.php index 6a3fb18489b..b9dd13f655b 100644 --- a/src/Framework/PHPTAssertionFailedError.php +++ b/src/Framework/PHPTAssertionFailedError.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class PHPTAssertionFailedError extends SyntheticError { } diff --git a/src/Framework/RiskyTest.php b/src/Framework/RiskyTest.php index 8ed64fb5878..c8be3aa987f 100644 --- a/src/Framework/RiskyTest.php +++ b/src/Framework/RiskyTest.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ interface RiskyTest { } diff --git a/src/Framework/RiskyTestError.php b/src/Framework/RiskyTestError.php index 0f31f04281a..aa77b162e3b 100644 --- a/src/Framework/RiskyTestError.php +++ b/src/Framework/RiskyTestError.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ class RiskyTestError extends AssertionFailedError implements RiskyTest { } diff --git a/src/Framework/SelfDescribing.php b/src/Framework/SelfDescribing.php index 218ea68e8be..73034f650ab 100644 --- a/src/Framework/SelfDescribing.php +++ b/src/Framework/SelfDescribing.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework; /** - * Interface for classes that can return a description of itself. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ interface SelfDescribing { diff --git a/src/Framework/SkippedTest.php b/src/Framework/SkippedTest.php index 533a7439419..c5ac84e6790 100644 --- a/src/Framework/SkippedTest.php +++ b/src/Framework/SkippedTest.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ interface SkippedTest { } diff --git a/src/Framework/SkippedTestCase.php b/src/Framework/SkippedTestCase.php index 4c0a8004e07..3595ea387e0 100644 --- a/src/Framework/SkippedTestCase.php +++ b/src/Framework/SkippedTestCase.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework; /** - * A skipped test case + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class SkippedTestCase extends TestCase { diff --git a/src/Framework/SkippedTestError.php b/src/Framework/SkippedTestError.php index 3d57a82a298..7d553dcf3f1 100644 --- a/src/Framework/SkippedTestError.php +++ b/src/Framework/SkippedTestError.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class SkippedTestError extends AssertionFailedError implements SkippedTest { } diff --git a/src/Framework/SkippedTestSuiteError.php b/src/Framework/SkippedTestSuiteError.php index 00bdfaea0ec..5448508a1ea 100644 --- a/src/Framework/SkippedTestSuiteError.php +++ b/src/Framework/SkippedTestSuiteError.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class SkippedTestSuiteError extends AssertionFailedError implements SkippedTest { } diff --git a/src/Framework/SyntheticError.php b/src/Framework/SyntheticError.php index 648743db88c..c3124ba0c74 100644 --- a/src/Framework/SyntheticError.php +++ b/src/Framework/SyntheticError.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework; /** - * Creates a synthetic failed assertion. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class SyntheticError extends AssertionFailedError { diff --git a/src/Framework/SyntheticSkippedError.php b/src/Framework/SyntheticSkippedError.php index 8392d35f9e1..f6e155d7b9e 100644 --- a/src/Framework/SyntheticSkippedError.php +++ b/src/Framework/SyntheticSkippedError.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class SyntheticSkippedError extends SyntheticError implements SkippedTest { } diff --git a/src/Framework/TestFailure.php b/src/Framework/TestFailure.php index 8a18cdaa29e..1722d66603b 100644 --- a/src/Framework/TestFailure.php +++ b/src/Framework/TestFailure.php @@ -13,7 +13,7 @@ use Throwable; /** - * A TestFailure collects a failed test together with the caught exception. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class TestFailure { diff --git a/src/Framework/TestResult.php b/src/Framework/TestResult.php index 99f5d251760..943bba2882b 100644 --- a/src/Framework/TestResult.php +++ b/src/Framework/TestResult.php @@ -28,7 +28,7 @@ use Throwable; /** - * A TestResult collects the results of executing a test case. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class TestResult implements Countable { diff --git a/src/Framework/TestSuite.php b/src/Framework/TestSuite.php index 6e103a81127..9639b2a4c80 100644 --- a/src/Framework/TestSuite.php +++ b/src/Framework/TestSuite.php @@ -21,7 +21,7 @@ use Throwable; /** - * A TestSuite is a composite of Tests. It runs a collection of test cases. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class TestSuite implements Test, SelfDescribing, IteratorAggregate { diff --git a/src/Framework/TestSuiteIterator.php b/src/Framework/TestSuiteIterator.php index 6218257ef5e..4c3e7f77565 100644 --- a/src/Framework/TestSuiteIterator.php +++ b/src/Framework/TestSuiteIterator.php @@ -12,7 +12,7 @@ use RecursiveIterator; /** - * Iterator for test suites. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class TestSuiteIterator implements RecursiveIterator { diff --git a/src/Framework/UnintentionallyCoveredCodeError.php b/src/Framework/UnintentionallyCoveredCodeError.php index 351b665d8bb..fcd1d824964 100644 --- a/src/Framework/UnintentionallyCoveredCodeError.php +++ b/src/Framework/UnintentionallyCoveredCodeError.php @@ -10,8 +10,7 @@ namespace PHPUnit\Framework; /** - * Extension to PHPUnit\Framework\AssertionFailedError to mark the special - * case of a test that unintentionally covers code. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class UnintentionallyCoveredCodeError extends RiskyTestError { diff --git a/src/Framework/Warning.php b/src/Framework/Warning.php index 7795500c32e..35e94493cf0 100644 --- a/src/Framework/Warning.php +++ b/src/Framework/Warning.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework; /** - * Thrown when there is a warning. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Warning extends Exception implements SelfDescribing { diff --git a/src/Framework/WarningTestCase.php b/src/Framework/WarningTestCase.php index 7ad0bcd47b3..85017a189a2 100644 --- a/src/Framework/WarningTestCase.php +++ b/src/Framework/WarningTestCase.php @@ -10,7 +10,7 @@ namespace PHPUnit\Framework; /** - * A warning. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class WarningTestCase extends TestCase { diff --git a/src/Runner/BaseTestRunner.php b/src/Runner/BaseTestRunner.php index d7dda6c021e..258d69fd228 100644 --- a/src/Runner/BaseTestRunner.php +++ b/src/Runner/BaseTestRunner.php @@ -17,7 +17,7 @@ use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; /** - * Base class for all test runners. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ abstract class BaseTestRunner { diff --git a/src/Runner/Exception.php b/src/Runner/Exception.php index 1d6edcc8ac7..44705f5675e 100644 --- a/src/Runner/Exception.php +++ b/src/Runner/Exception.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Runner; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Exception extends \RuntimeException implements \PHPUnit\Exception { } diff --git a/src/Runner/Filter/ExcludeGroupFilterIterator.php b/src/Runner/Filter/ExcludeGroupFilterIterator.php index 8e899d43acc..d8a8643684f 100644 --- a/src/Runner/Filter/ExcludeGroupFilterIterator.php +++ b/src/Runner/Filter/ExcludeGroupFilterIterator.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Runner\Filter; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class ExcludeGroupFilterIterator extends GroupFilterIterator { protected function doAccept(string $hash): bool diff --git a/src/Runner/Filter/Factory.php b/src/Runner/Filter/Factory.php index bef61e2e400..4072ad23b06 100644 --- a/src/Runner/Filter/Factory.php +++ b/src/Runner/Filter/Factory.php @@ -15,6 +15,9 @@ use PHPUnit\Framework\TestSuite; use ReflectionClass; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Factory { /** diff --git a/src/Runner/Filter/GroupFilterIterator.php b/src/Runner/Filter/GroupFilterIterator.php index 992564fe17c..7d5ad253a2f 100644 --- a/src/Runner/Filter/GroupFilterIterator.php +++ b/src/Runner/Filter/GroupFilterIterator.php @@ -13,6 +13,9 @@ use RecursiveFilterIterator; use RecursiveIterator; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ abstract class GroupFilterIterator extends RecursiveFilterIterator { /** diff --git a/src/Runner/Filter/IncludeGroupFilterIterator.php b/src/Runner/Filter/IncludeGroupFilterIterator.php index cb67fd29dc2..5f004f9ad4e 100644 --- a/src/Runner/Filter/IncludeGroupFilterIterator.php +++ b/src/Runner/Filter/IncludeGroupFilterIterator.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Runner\Filter; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class IncludeGroupFilterIterator extends GroupFilterIterator { protected function doAccept(string $hash): bool diff --git a/src/Runner/Filter/NameFilterIterator.php b/src/Runner/Filter/NameFilterIterator.php index 2d82c918edd..1c5babc94d1 100644 --- a/src/Runner/Filter/NameFilterIterator.php +++ b/src/Runner/Filter/NameFilterIterator.php @@ -15,6 +15,9 @@ use RecursiveFilterIterator; use RecursiveIterator; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class NameFilterIterator extends RecursiveFilterIterator { /** diff --git a/src/Runner/Hook/TestListenerAdapter.php b/src/Runner/Hook/TestListenerAdapter.php index 02ed7006b44..17542cde01e 100644 --- a/src/Runner/Hook/TestListenerAdapter.php +++ b/src/Runner/Hook/TestListenerAdapter.php @@ -16,6 +16,9 @@ use PHPUnit\Framework\Warning; use PHPUnit\Util\Test as TestUtil; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class TestListenerAdapter implements TestListener { /** diff --git a/src/Runner/PhptTestCase.php b/src/Runner/PhptTestCase.php index 9737fe626af..c2a77a75ac7 100644 --- a/src/Runner/PhptTestCase.php +++ b/src/Runner/PhptTestCase.php @@ -24,7 +24,7 @@ use Throwable; /** - * Runner for PHPT test cases. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class PhptTestCase implements Test, SelfDescribing { diff --git a/src/Runner/ResultCacheExtension.php b/src/Runner/ResultCacheExtension.php index cb9b451ec4d..f1724f97dc6 100644 --- a/src/Runner/ResultCacheExtension.php +++ b/src/Runner/ResultCacheExtension.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Runner; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class ResultCacheExtension implements AfterSuccessfulTestHook, AfterSkippedTestHook, AfterRiskyTestHook, AfterIncompleteTestHook, AfterTestErrorHook, AfterTestWarningHook, AfterTestFailureHook, AfterLastTestHook { /** diff --git a/src/Runner/StandardTestSuiteLoader.php b/src/Runner/StandardTestSuiteLoader.php index 7ef09c89a16..3afa68c65ed 100644 --- a/src/Runner/StandardTestSuiteLoader.php +++ b/src/Runner/StandardTestSuiteLoader.php @@ -15,7 +15,7 @@ use ReflectionClass; /** - * The standard test suite loader. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class StandardTestSuiteLoader implements TestSuiteLoader { diff --git a/src/Runner/TestResultCache.php b/src/Runner/TestResultCache.php index b8162c093aa..836d94516fa 100644 --- a/src/Runner/TestResultCache.php +++ b/src/Runner/TestResultCache.php @@ -11,6 +11,9 @@ use PHPUnit\Util\Filesystem; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class TestResultCache implements \Serializable, TestResultCacheInterface { /** diff --git a/src/Runner/TestResultCacheInterface.php b/src/Runner/TestResultCacheInterface.php index a62e901e32b..aae9ac35dd5 100644 --- a/src/Runner/TestResultCacheInterface.php +++ b/src/Runner/TestResultCacheInterface.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Runner; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ interface TestResultCacheInterface { public function getState($testName): int; diff --git a/src/Runner/TestSuiteSorter.php b/src/Runner/TestSuiteSorter.php index 3122edd8d64..95346a1a961 100644 --- a/src/Runner/TestSuiteSorter.php +++ b/src/Runner/TestSuiteSorter.php @@ -14,6 +14,9 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestSuite; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class TestSuiteSorter { /** diff --git a/src/TextUI/ResultPrinter.php b/src/TextUI/ResultPrinter.php index e88f805f68f..0a828386ac9 100644 --- a/src/TextUI/ResultPrinter.php +++ b/src/TextUI/ResultPrinter.php @@ -26,7 +26,7 @@ use SebastianBergmann\Timer\Timer; /** - * Prints the result of a TextUI TestRunner run. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class ResultPrinter extends Printer implements TestListener { diff --git a/src/TextUI/TestRunner.php b/src/TextUI/TestRunner.php index b4047ae234d..6df0a45556d 100644 --- a/src/TextUI/TestRunner.php +++ b/src/TextUI/TestRunner.php @@ -60,8 +60,7 @@ use SebastianBergmann\Invoker\Invoker; /** - * A TestRunner for the Command Line Interface (CLI) - * PHP SAPI Module. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class TestRunner extends BaseTestRunner { diff --git a/src/Util/Blacklist.php b/src/Util/Blacklist.php index c8bbcce0111..3692d8f983b 100644 --- a/src/Util/Blacklist.php +++ b/src/Util/Blacklist.php @@ -32,7 +32,7 @@ use Text_Template; /** - * Utility class for blacklisting PHPUnit's own source code files. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Blacklist { diff --git a/src/Util/Color.php b/src/Util/Color.php index dde0f3f6990..b1905319032 100644 --- a/src/Util/Color.php +++ b/src/Util/Color.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Util; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Color { private const WHITESPACE_MAP = [ diff --git a/src/Util/Configuration.php b/src/Util/Configuration.php index e67f35e7cd9..552b8d428a1 100644 --- a/src/Util/Configuration.php +++ b/src/Util/Configuration.php @@ -18,143 +18,7 @@ use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; /** - * Wrapper for the PHPUnit XML configuration file. - * - * Example XML configuration file: - * - * - * - * - * - * - * /path/to/files - * /path/to/MyTest.php - * /path/to/files/exclude - * - * - * - * - * - * name - * - * - * name - * - * - * - * - * - * name - * - * - * name - * - * - * - * - * - * /path/to/files - * /path/to/file - * - * /path/to/files - * /path/to/file - * - * - * - * - * - * - * - * - * - * Sebastian - * - * - * 22 - * April - * 19.78 - * - * - * MyRelativeFile.php - * MyRelativeDir - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * . - * - * - * - * - * - * - * - * - * - * - * - * - * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Configuration { diff --git a/src/Util/ConfigurationGenerator.php b/src/Util/ConfigurationGenerator.php index fe54b96fd80..0414d9881fe 100644 --- a/src/Util/ConfigurationGenerator.php +++ b/src/Util/ConfigurationGenerator.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Util; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class ConfigurationGenerator { /** diff --git a/src/Util/ErrorHandler.php b/src/Util/ErrorHandler.php index f0ad8f9ba1d..7c7c6565e7d 100644 --- a/src/Util/ErrorHandler.php +++ b/src/Util/ErrorHandler.php @@ -15,7 +15,7 @@ use PHPUnit\Framework\Error\Warning; /** - * Error handler that converts PHP errors and warnings to exceptions. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ErrorHandler { diff --git a/src/Util/FileLoader.php b/src/Util/FileLoader.php index 25c48af5762..817ee70d699 100644 --- a/src/Util/FileLoader.php +++ b/src/Util/FileLoader.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\Exception; /** - * Utility methods to load PHP sourcefiles. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class FileLoader { diff --git a/src/Util/Filesystem.php b/src/Util/Filesystem.php index 8b4fcc67c6d..8207a4fffc4 100644 --- a/src/Util/Filesystem.php +++ b/src/Util/Filesystem.php @@ -10,7 +10,7 @@ namespace PHPUnit\Util; /** - * Filesystem helpers. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Filesystem { diff --git a/src/Util/Filter.php b/src/Util/Filter.php index 1c25943f791..ee66efd3726 100644 --- a/src/Util/Filter.php +++ b/src/Util/Filter.php @@ -12,6 +12,9 @@ use PHPUnit\Framework\Exception; use PHPUnit\Framework\SyntheticError; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Filter { /** diff --git a/src/Util/Getopt.php b/src/Util/Getopt.php index 21e8a9c4d1a..4a0522f4c3e 100644 --- a/src/Util/Getopt.php +++ b/src/Util/Getopt.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\Exception; /** - * Command-line options parsing class. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Getopt { diff --git a/src/Util/GlobalState.php b/src/Util/GlobalState.php index 26ca3eb3639..6168dfb057e 100644 --- a/src/Util/GlobalState.php +++ b/src/Util/GlobalState.php @@ -11,6 +11,9 @@ use Closure; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class GlobalState { /** diff --git a/src/Util/Help.php b/src/Util/Help.php index be212540f5a..7f3af5e1bed 100644 --- a/src/Util/Help.php +++ b/src/Util/Help.php @@ -12,6 +12,9 @@ use PHPUnit\Util\Color; use SebastianBergmann\Environment\Console; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Help { private const LEFT_MARGIN = ' '; diff --git a/src/Util/InvalidArgumentHelper.php b/src/Util/InvalidArgumentHelper.php index 832e6bf7135..185f649addf 100644 --- a/src/Util/InvalidArgumentHelper.php +++ b/src/Util/InvalidArgumentHelper.php @@ -12,8 +12,7 @@ use PHPUnit\Framework\Exception; /** - * Factory for PHPUnit\Framework\Exception objects that are used to describe - * invalid arguments passed to a function or method. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class InvalidArgumentHelper { diff --git a/src/Util/Json.php b/src/Util/Json.php index 6a086cd169c..458dc31403b 100644 --- a/src/Util/Json.php +++ b/src/Util/Json.php @@ -11,6 +11,9 @@ use PHPUnit\Framework\Exception; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Json { /** diff --git a/src/Util/Log/JUnit.php b/src/Util/Log/JUnit.php index 07869e0af1c..02c419ed52a 100644 --- a/src/Util/Log/JUnit.php +++ b/src/Util/Log/JUnit.php @@ -26,9 +26,7 @@ use ReflectionException; /** - * A TestListener that generates a logfile of the test execution in XML markup. - * - * The XML markup used is the same as the one that is used by the JUnit Ant task. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class JUnit extends Printer implements TestListener { diff --git a/src/Util/Log/TeamCity.php b/src/Util/Log/TeamCity.php index 6e8af3105d8..250d471f3ff 100644 --- a/src/Util/Log/TeamCity.php +++ b/src/Util/Log/TeamCity.php @@ -24,8 +24,7 @@ use SebastianBergmann\Comparator\ComparisonFailure; /** - * A TestListener that generates a logfile of the test execution using the - * TeamCity format (for use with PhpStorm, for instance). + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class TeamCity extends ResultPrinter { diff --git a/src/Util/NullTestResultCache.php b/src/Util/NullTestResultCache.php index 2076f2b3921..f5e807bbe96 100644 --- a/src/Util/NullTestResultCache.php +++ b/src/Util/NullTestResultCache.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Runner; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class NullTestResultCache implements TestResultCacheInterface { public function getState($testName): int diff --git a/src/Util/PHP/AbstractPhpProcess.php b/src/Util/PHP/AbstractPhpProcess.php index 8f42287fea5..f0c0887e581 100644 --- a/src/Util/PHP/AbstractPhpProcess.php +++ b/src/Util/PHP/AbstractPhpProcess.php @@ -20,7 +20,7 @@ use SebastianBergmann\Environment\Runtime; /** - * Utility methods for PHP sub-processes. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ abstract class AbstractPhpProcess { diff --git a/src/Util/PHP/DefaultPhpProcess.php b/src/Util/PHP/DefaultPhpProcess.php index 0fc71fb61b5..3a8797086d0 100644 --- a/src/Util/PHP/DefaultPhpProcess.php +++ b/src/Util/PHP/DefaultPhpProcess.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\Exception; /** - * Default utility for PHP sub-processes. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class DefaultPhpProcess extends AbstractPhpProcess { diff --git a/src/Util/PHP/WindowsPhpProcess.php b/src/Util/PHP/WindowsPhpProcess.php index c839a5888f9..14831fa3b9e 100644 --- a/src/Util/PHP/WindowsPhpProcess.php +++ b/src/Util/PHP/WindowsPhpProcess.php @@ -12,11 +12,7 @@ use PHPUnit\Framework\Exception; /** - * Windows utility for PHP sub-processes. - * - * Reading from STDOUT or STDERR hangs forever on Windows if the output is - * too large. - * + * @internal This class is not covered by the backward compatibility promise for PHPUnit * @see https://bugs.php.net/bug.php?id=51800 */ final class WindowsPhpProcess extends DefaultPhpProcess diff --git a/src/Util/Printer.php b/src/Util/Printer.php index d759c1d1add..57c32dce517 100644 --- a/src/Util/Printer.php +++ b/src/Util/Printer.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\Exception; /** - * Utility class that can print to STDOUT or write to a file. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class Printer { diff --git a/src/Util/RegularExpression.php b/src/Util/RegularExpression.php index 92956d8b552..303f4b287ab 100644 --- a/src/Util/RegularExpression.php +++ b/src/Util/RegularExpression.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Util; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class RegularExpression { /** diff --git a/src/Util/Test.php b/src/Util/Test.php index 36b71e15954..9286b0998f7 100644 --- a/src/Util/Test.php +++ b/src/Util/Test.php @@ -27,6 +27,9 @@ use SebastianBergmann\Environment\OperatingSystem; use Traversable; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Test { /** diff --git a/src/Util/TestDox/CliTestDoxPrinter.php b/src/Util/TestDox/CliTestDoxPrinter.php index 2fbd7b35bd0..5d3197558ae 100644 --- a/src/Util/TestDox/CliTestDoxPrinter.php +++ b/src/Util/TestDox/CliTestDoxPrinter.php @@ -18,8 +18,7 @@ use SebastianBergmann\Timer\Timer; /** - * This printer is for CLI output only. For the classes that output to file, html and xml, - * please refer to the PHPUnit\Util\TestDox namespace + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class CliTestDoxPrinter extends TestDoxPrinter { diff --git a/src/Util/TestDox/HtmlResultPrinter.php b/src/Util/TestDox/HtmlResultPrinter.php index 426c180612d..1beb8be473d 100644 --- a/src/Util/TestDox/HtmlResultPrinter.php +++ b/src/Util/TestDox/HtmlResultPrinter.php @@ -10,7 +10,7 @@ namespace PHPUnit\Util\TestDox; /** - * Prints TestDox documentation in HTML format. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class HtmlResultPrinter extends ResultPrinter { diff --git a/src/Util/TestDox/NamePrettifier.php b/src/Util/TestDox/NamePrettifier.php index 3d42eeb79d7..0c59a7d641f 100644 --- a/src/Util/TestDox/NamePrettifier.php +++ b/src/Util/TestDox/NamePrettifier.php @@ -14,7 +14,7 @@ use SebastianBergmann\Exporter\Exporter; /** - * Prettifies class and method names for use in TestDox documentation. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class NamePrettifier { diff --git a/src/Util/TestDox/ResultPrinter.php b/src/Util/TestDox/ResultPrinter.php index c1b2982e139..bb3a85fcc47 100644 --- a/src/Util/TestDox/ResultPrinter.php +++ b/src/Util/TestDox/ResultPrinter.php @@ -20,7 +20,7 @@ use PHPUnit\Util\Printer; /** - * Base class for printers of TestDox documentation. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ abstract class ResultPrinter extends Printer implements TestListener { diff --git a/src/Util/TestDox/TestDoxPrinter.php b/src/Util/TestDox/TestDoxPrinter.php index bd6b54ab334..095f3107de6 100644 --- a/src/Util/TestDox/TestDoxPrinter.php +++ b/src/Util/TestDox/TestDoxPrinter.php @@ -20,6 +20,9 @@ use PHPUnit\Runner\TestSuiteSorter; use PHPUnit\TextUI\ResultPrinter; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ class TestDoxPrinter extends ResultPrinter { /** diff --git a/src/Util/TestDox/TextResultPrinter.php b/src/Util/TestDox/TextResultPrinter.php index 60ca0a33026..ee080039a78 100644 --- a/src/Util/TestDox/TextResultPrinter.php +++ b/src/Util/TestDox/TextResultPrinter.php @@ -10,8 +10,7 @@ namespace PHPUnit\Util\TestDox; /** - * Prints TestDox documentation in text format to files. - * For the CLI testdox printer please refer to \PHPUnit\TextUI\TextDoxPrinter. + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class TextResultPrinter extends ResultPrinter { diff --git a/src/Util/TestDox/XmlResultPrinter.php b/src/Util/TestDox/XmlResultPrinter.php index 72cab8808a3..b161a11884b 100644 --- a/src/Util/TestDox/XmlResultPrinter.php +++ b/src/Util/TestDox/XmlResultPrinter.php @@ -21,6 +21,9 @@ use PHPUnit\Util\Printer; use ReflectionClass; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class XmlResultPrinter extends Printer implements TestListener { /** diff --git a/src/Util/TextTestListRenderer.php b/src/Util/TextTestListRenderer.php index 1181a2206b6..500038044f0 100644 --- a/src/Util/TextTestListRenderer.php +++ b/src/Util/TextTestListRenderer.php @@ -13,6 +13,9 @@ use PHPUnit\Framework\TestSuite; use PHPUnit\Runner\PhptTestCase; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class TextTestListRenderer { /** diff --git a/src/Util/Type.php b/src/Util/Type.php index ebe0ea0a443..ec6a1d78a4a 100644 --- a/src/Util/Type.php +++ b/src/Util/Type.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Util; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Type { public static function isType(string $type): bool diff --git a/src/Util/XdebugFilterScriptGenerator.php b/src/Util/XdebugFilterScriptGenerator.php index 270e0714aaf..d87a89774b6 100644 --- a/src/Util/XdebugFilterScriptGenerator.php +++ b/src/Util/XdebugFilterScriptGenerator.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Util; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class XdebugFilterScriptGenerator { public function generate(array $filterData): string diff --git a/src/Util/Xml.php b/src/Util/Xml.php index 74490855b8e..b74acc1e6b2 100644 --- a/src/Util/Xml.php +++ b/src/Util/Xml.php @@ -17,6 +17,9 @@ use PHPUnit\Framework\Exception; use ReflectionClass; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class Xml { public static function import(DOMElement $element): DOMElement diff --git a/src/Util/XmlTestListRenderer.php b/src/Util/XmlTestListRenderer.php index ee91af3d4e2..7d7e44a3649 100644 --- a/src/Util/XmlTestListRenderer.php +++ b/src/Util/XmlTestListRenderer.php @@ -13,6 +13,9 @@ use PHPUnit\Framework\TestSuite; use PHPUnit\Runner\PhptTestCase; +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ final class XmlTestListRenderer { /**