Skip to content

Commit

Permalink
Merge pull request #885 from ergebnis/fix/remove
Browse files Browse the repository at this point in the history
Fix: Remove `Config\ExplicitRuleSet` interface
  • Loading branch information
localheinz committed Sep 18, 2023
2 parents c6e242c + b260ebc commit ff8f868
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 61 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Expand Up @@ -19,7 +19,6 @@ For a full diff see [`5.16.0...main`][5.16.0...main].

- Allow implementations of `Config\RuleSet` to declare and configure custom fixers ([#872]), by [@localheinz]
- Renamed `Config\RuleSet::targetPhpVersion()` to `Config\RuleSet::phpVersion()` ([#878]), by [@localheinz]
- Renamed `Config\RuleSet\ExplicitRuleSet` to `Config\ExplicitRuleSet` ([#882]), by [@localheinz]

### Fixed

Expand All @@ -34,6 +33,7 @@ For a full diff see [`5.16.0...main`][5.16.0...main].
- Removed `DOCTRINE_IGNORED_TAGS` constant from `Config\Ruleset\AbstractRuleSet` ([#875]), by [@localheinz]
- Removed constructor from `Config\Ruleset\AbstractRuleSet` ([#876]), by [@localheinz]
- Removed `Config\Ruleset\AbstractRuleSet` ([#877]), by [@localheinz]
- Removed `Config\RuleSet\ExplicitRuleSet` ([#885]), by [@localheinz]

## [`5.16.0`][5.16.0]

Expand Down Expand Up @@ -1194,8 +1194,8 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#877]: https://github.com/ergebnis/php-cs-fixer-config/pull/877
[#880]: https://github.com/ergebnis/php-cs-fixer-config/pull/880
[#881]: https://github.com/ergebnis/php-cs-fixer-config/pull/881
[#882]: https://github.com/ergebnis/php-cs-fixer-config/pull/882
[#883]: https://github.com/ergebnis/php-cs-fixer-config/pull/883
[#885]: https://github.com/ergebnis/php-cs-fixer-config/pull/885

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
27 changes: 0 additions & 27 deletions src/ExplicitRuleSet.php

This file was deleted.

3 changes: 1 addition & 2 deletions src/RuleSet/Php53.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php53 implements ExplicitRuleSet, RuleSet
final class Php53 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
3 changes: 1 addition & 2 deletions src/RuleSet/Php54.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php54 implements ExplicitRuleSet, RuleSet
final class Php54 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
3 changes: 1 addition & 2 deletions src/RuleSet/Php55.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php55 implements ExplicitRuleSet, RuleSet
final class Php55 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
3 changes: 1 addition & 2 deletions src/RuleSet/Php56.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php56 implements ExplicitRuleSet, RuleSet
final class Php56 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
3 changes: 1 addition & 2 deletions src/RuleSet/Php70.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php70 implements ExplicitRuleSet, RuleSet
final class Php70 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
3 changes: 1 addition & 2 deletions src/RuleSet/Php71.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php71 implements ExplicitRuleSet, RuleSet
final class Php71 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
3 changes: 1 addition & 2 deletions src/RuleSet/Php72.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php72 implements ExplicitRuleSet, RuleSet
final class Php72 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
3 changes: 1 addition & 2 deletions src/RuleSet/Php73.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php73 implements ExplicitRuleSet, RuleSet
final class Php73 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
3 changes: 1 addition & 2 deletions src/RuleSet/Php74.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php74 implements ExplicitRuleSet, RuleSet
final class Php74 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
3 changes: 1 addition & 2 deletions src/RuleSet/Php80.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php80 implements ExplicitRuleSet, RuleSet
final class Php80 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
3 changes: 1 addition & 2 deletions src/RuleSet/Php81.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php81 implements ExplicitRuleSet, RuleSet
final class Php81 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
3 changes: 1 addition & 2 deletions src/RuleSet/Php82.php
Expand Up @@ -13,14 +13,13 @@

namespace Ergebnis\PhpCsFixer\Config\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php82 implements ExplicitRuleSet, RuleSet
final class Php82 implements RuleSet
{
/**
* @var array<string, array<string, mixed>|bool>
Expand Down
8 changes: 0 additions & 8 deletions test/Unit/RuleSet/ExplicitRuleSetTestCase.php
Expand Up @@ -13,19 +13,11 @@

namespace Ergebnis\PhpCsFixer\Config\Test\Unit\RuleSet;

use Ergebnis\PhpCsFixer\Config\ExplicitRuleSet;
use PhpCsFixer\Fixer;
use PhpCsFixer\FixerConfiguration;

abstract class ExplicitRuleSetTestCase extends AbstractRuleSetTestCase
{
final public function testIsExplicitRuleSet(): void
{
$ruleSet = static::createRuleSet();

self::assertInstanceOf(ExplicitRuleSet::class, $ruleSet);
}

final public function testRuleSetDoesNotConfigureRuleSets(): void
{
$ruleSet = static::createRuleSet();
Expand Down

0 comments on commit ff8f868

Please sign in to comment.