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
40 changes: 0 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1993,46 +1993,6 @@ return static function (ContainerConfigurator $containerConfigurator): void {

<br>

### NoAbstractControllerConstructorRule

Abstract controller should not have constructor, as it can lead to tight coupling. Use @required annotation instead

```yaml
rules:
- Symplify\PHPStanRules\Rules\Symfony\NoAbstractControllerConstructorRule
```

```php
abstract class AbstractController extends Controller
{
public function __construct(
private SomeService $someService
) {
}
}
```

:x:

<br>

```php
abstract class AbstractController extends Controller
{
private $someService;

#[Required]
public function autowireAbstractController(SomeService $someService)
{
$this->someService = $someService;
}
}
```

:+1:

<br>

### AlreadyRegisteredAutodiscoveryServiceRule

Remove service, as already registered via autodiscovery ->load(), no need to set it twice.
Expand Down
1 change: 0 additions & 1 deletion config/symfony-rules.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
rules:
- Symplify\PHPStanRules\Rules\Symfony\NoAbstractControllerConstructorRule
- Symplify\PHPStanRules\Rules\Symfony\NoRequiredOutsideClassRule
- Symplify\PHPStanRules\Rules\Symfony\SingleArgEventDispatchRule
- Symplify\PHPStanRules\Rules\Symfony\NoListenerWithoutContractRule
Expand Down
2 changes: 0 additions & 2 deletions src/Enum/RuleIdentifier/SymfonyRuleIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ final class SymfonyRuleIdentifier

public const string NO_STRING_IN_GET_SUBSCRIBED_EVENTS = 'symfony.noStringInGetSubscribedEvents';

public const string SYMFONY_NO_ABSTRACT_CONTROLLER_CONSTRUCTOR = 'symfony.noAbstractControllerConstructor';

public const string SINGLE_REQUIRED_METHOD = 'symfony.singleRequiredMethod';

public const string SYMFONY_REQUIRED_ONLY_IN_ABSTRACT = 'symfony.requiredOnlyInAbstract';
Expand Down
60 changes: 0 additions & 60 deletions src/Rules/Symfony/NoAbstractControllerConstructorRule.php

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading