Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CheckNotTestsNamespaceOutsideTestsDirectoryRule as overly specific and strict #94

Merged
merged 1 commit into from
Oct 18, 2023
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
1 change: 0 additions & 1 deletion config/test-rules.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
rules:
- Symplify\PHPStanRules\Rules\NoConstructorInTestRule
- Symplify\PHPStanRules\Rules\CheckNotTestsNamespaceOutsideTestsDirectoryRule
52 changes: 3 additions & 49 deletions docs/rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 56 Rules Overview
# 55 Rules Overview

## AnnotateRegexClassConstWithRegexLinkRule

Expand Down Expand Up @@ -97,52 +97,6 @@ class Baz

<br>

## CheckNotTestsNamespaceOutsideTestsDirectoryRule

"*Test.php" file cannot be located outside "Tests" namespace

- class: [`Symplify\PHPStanRules\Rules\CheckNotTestsNamespaceOutsideTestsDirectoryRule`](../src/Rules/CheckNotTestsNamespaceOutsideTestsDirectoryRule.php)

```php
// file: "SomeTest.php
namespace App;

class SomeTest
{
}
```

:x:

<br>

```php
// file: "SomeTest.php
namespace App\Tests;

class SomeTest
{
}

// file: "AnotherTest.php
namespace App\Tests\Features;

class AnotherTest
{
}

// file: "SomeOtherTest.php
namespace Tests\Features;

class SomeOtherTest
{
}
```

:+1:

<br>

## CheckRequiredInterfaceInContractNamespaceRule

Interface must be located in "Contract" or "Contracts" namespace
Expand Down Expand Up @@ -1458,7 +1412,7 @@ Do not name "%s", shorter than %d chars

:wrench: **configure it!**

- class: [`Symplify\PHPStanRules\ObjectCalisthenics\Rules\NoShortNameRule`](../packages/ObjectCalisthenics/Rules/NoShortNameRule.php)
- class: [`Symplify\PHPStanRules\ObjectCalisthenics\Rules\NoShortNameRule`](../src/ObjectCalisthenics/Rules/NoShortNameRule.php)

```yaml
services:
Expand Down Expand Up @@ -1947,7 +1901,7 @@ final class SomeException extends Exception

Use invokable controller with `__invoke()` method instead of named action method

- class: [`Symplify\PHPStanRules\Symfony\Rules\RequireInvokableControllerRule`](../packages/Symfony/Rules/RequireInvokableControllerRule.php)
- class: [`Symplify\PHPStanRules\Symfony\Rules\RequireInvokableControllerRule`](../src/Symfony/Rules/RequireInvokableControllerRule.php)

```php
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
<directory>tests</directory>
<exclude>tests/Rules/NoConstructorInTestRule/Fixture</exclude>
<exclude>tests/Rules/ClassNameRespectsParentSuffixRule/Fixture/</exclude>
<exclude>tests/Rules/CheckNotTestsNamespaceOutsideTestsDirectoryRule/Fixture</exclude>
</testsuite>
</phpunit>
96 changes: 0 additions & 96 deletions src/Rules/CheckNotTestsNamespaceOutsideTestsDirectoryRule.php

This file was deleted.

16 changes: 0 additions & 16 deletions src/ValueObject/Regex.php

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.