diff --git a/README.md b/README.md
index 21545107..cb2c2a4a 100644
--- a/README.md
+++ b/README.md
@@ -3039,47 +3039,6 @@ final class SomeTest extends TestCase
-### ExplicitExpectsMockMethodRule
-
-PHPUnit mock method is missing explicit `expects()`, e.g. `$this->mock->expects($this->once())->...`. This is required since PHPUnit 12 to avoid silent stubs.
-
-```php
-use PHPUnit\Framework\TestCase;
-
-final class SomeTest extends TestCase
-{
- public function test(): void
- {
- $mock = $this->createMock(\stdClass::class);
- $mock->method('someMethod')->willReturn('value');
- }
-}
-```
-
-:x:
-
-
-
-```php
-use PHPUnit\Framework\TestCase;
-
-final class SomeTest extends TestCase
-{
- public function test(): void
- {
- $mock = $this->createMock(\stdClass::class);
-
- $mock->expects($this->atLeastOnce())
- ->method('someMethod')
- ->willReturn('value');
- }
-}
-```
-
-:+1:
-
-
-
### AvoidAnyExpectsRule
Disallow usage of `any()` expectation in mocks to ensure that all mock interactions are explicitly defined and verified.
diff --git a/config/mock-rules.neon b/config/mock-rules.neon
index dee4253c..5c07af1b 100644
--- a/config/mock-rules.neon
+++ b/config/mock-rules.neon
@@ -8,8 +8,6 @@ conditionalTags:
phpstan.rules.rule: %symplify.mocks%
# explicit expects()
- Symplify\PHPStanRules\Rules\PHPUnit\ExplicitExpectsMockMethodRule:
- phpstan.rules.rule: %symplify.mocks%
Symplify\PHPStanRules\Rules\PHPUnit\AvoidAnyExpectsRule:
phpstan.rules.rule: %symplify.mocks%
Symplify\PHPStanRules\Rules\PHPUnit\NoWithOnStubRule:
@@ -30,7 +28,6 @@ conditionalTags:
services:
- Symplify\PHPStanRules\Rules\PHPUnit\NoMockObjectAndRealObjectPropertyRule
- Symplify\PHPStanRules\Rules\PHPUnit\NoDoubleConsecutiveTestMockRule
- - Symplify\PHPStanRules\Rules\PHPUnit\ExplicitExpectsMockMethodRule
- Symplify\PHPStanRules\Rules\PHPUnit\AvoidAnyExpectsRule
- Symplify\PHPStanRules\Rules\PHPUnit\NoWithOnStubRule
- Symplify\PHPStanRules\Rules\PHPUnit\RequireAtLeastOneRule
diff --git a/phpunit.xml b/phpunit.xml
index 10abff92..3cc80302 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -13,8 +13,6 @@
tests/Rules/PHPUnit/PublicStaticDataProviderRule
tests/Rules/PHPUnit/NoAssertFuncCallInTestsRule/Fixture
tests/Rules/PHPUnit/NoMockOnlyTestRule/Fixture/SkipConstraintValidatorTest.php
- tests/Rules/PHPUnit/ExplicitExpectsMockMethodRule/Fixture/SkipMockWithExpectsTest.php
- tests/Rules/PHPUnit/ExplicitExpectsMockMethodRule/Fixture/MockWithoutExpectsTest.php
tests/Rules/PHPUnit/AvoidAnyExpectsRule/Fixture/SomeAnyTest.php
tests/Rules/PHPUnit/NoWithOnStubRule/Fixture/StubWithWithTest.php
tests/Rules/PHPUnit/NoWithOnStubRule/Fixture/SkipMockWithExpectsAndWithTest.php
diff --git a/src/Rules/PHPUnit/ExplicitExpectsMockMethodRule.php b/src/Rules/PHPUnit/ExplicitExpectsMockMethodRule.php
deleted file mode 100644
index 2acf77db..00000000
--- a/src/Rules/PHPUnit/ExplicitExpectsMockMethodRule.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
- *
- * @see \Symplify\PHPStanRules\Tests\Rules\PHPUnit\ExplicitExpectsMockMethodRule\ExplicitExpectsMockMethodRuleTest
- */
-final class ExplicitExpectsMockMethodRule implements Rule
-{
- /**
- * @var string
- */
- public const ERROR_MESSAGE = 'PHPUnit mock method is missing explicit expects(), e.g. $this->mock->expects($this->once())->...';
-
- public function getNodeType(): string
- {
- return MethodCall::class;
- }
-
- /**
- * @param MethodCall $node
- * @return IdentifierRuleError[]
- */
- public function processNode(Node $node, Scope $scope): array
- {
- if (! NamingHelper::isName($node->name, 'method')) {
- return [];
- }
-
- if (! TestClassDetector::isTestClass($scope)) {
- return [];
- }
-
- if (! $node->var instanceof Variable && ! $node->var instanceof PropertyFetch) {
- return [];
- }
-
- $callerType = $scope->getType($node->var);
- if (! $callerType->hasMethod('expects')->yes()) {
- return [];
- }
-
- $identifierRuleError = RuleErrorBuilder::message(self::ERROR_MESSAGE)
- ->identifier('phpunit.explicitExpectsMockMethod')
- ->build();
-
- return [$identifierRuleError];
- }
-}
diff --git a/tests/Rules/PHPUnit/ExplicitExpectsMockMethodRule/ExplicitExpectsMockMethodRuleTest.php b/tests/Rules/PHPUnit/ExplicitExpectsMockMethodRule/ExplicitExpectsMockMethodRuleTest.php
deleted file mode 100644
index 35f59ee1..00000000
--- a/tests/Rules/PHPUnit/ExplicitExpectsMockMethodRule/ExplicitExpectsMockMethodRuleTest.php
+++ /dev/null
@@ -1,38 +0,0 @@
-> $expectedErrorsWithLines
- */
- #[DataProvider('provideData')]
- public function testRule(string $filePath, array $expectedErrorsWithLines): void
- {
- $this->analyse([$filePath], $expectedErrorsWithLines);
- }
-
- /**
- * @return Iterator, mixed>>
- */
- public static function provideData(): Iterator
- {
- yield [__DIR__ . '/Fixture/MockWithoutExpectsTest.php', [[ExplicitExpectsMockMethodRule::ERROR_MESSAGE, 12]]];
-
- yield [__DIR__ . '/Fixture/SkipMockWithExpectsTest.php', []];
- }
-
- protected function getRule(): Rule
- {
- return new ExplicitExpectsMockMethodRule();
- }
-}
diff --git a/tests/Rules/PHPUnit/ExplicitExpectsMockMethodRule/Fixture/MockWithoutExpectsTest.php b/tests/Rules/PHPUnit/ExplicitExpectsMockMethodRule/Fixture/MockWithoutExpectsTest.php
deleted file mode 100644
index 9cdbc7db..00000000
--- a/tests/Rules/PHPUnit/ExplicitExpectsMockMethodRule/Fixture/MockWithoutExpectsTest.php
+++ /dev/null
@@ -1,14 +0,0 @@
-createMock(\stdClass::class);
- $mock->method('someMethod')->willReturn('value');
- }
-}
diff --git a/tests/Rules/PHPUnit/ExplicitExpectsMockMethodRule/Fixture/SkipMockWithExpectsTest.php b/tests/Rules/PHPUnit/ExplicitExpectsMockMethodRule/Fixture/SkipMockWithExpectsTest.php
deleted file mode 100644
index 3cf634f2..00000000
--- a/tests/Rules/PHPUnit/ExplicitExpectsMockMethodRule/Fixture/SkipMockWithExpectsTest.php
+++ /dev/null
@@ -1,17 +0,0 @@
-createMock(\stdClass::class);
-
- $mock->expects($this->atLeastOnce())
- ->method('someMethod')
- ->willReturn('value');
- }
-}