Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

[Skipper] Complete docs #2624

Merged
merged 1 commit into from
Dec 10, 2020
Merged
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
34 changes: 32 additions & 2 deletions packages/skipper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,41 @@ return static function (ContainerConfigurator $containerConfigurator): void {
};
```

@todo
Or for rules and paths specific ignores:

```php
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\Skipper\ValueObject\Option;

return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();

$parameters->set(Option::SKIP, [
// specific class
SomeClass::class => [__DIR__ . '/src/OnlyHere'],

// class code in paths
SomeSniff::class . '.SomeCode' => ['*Sniff.php', '*YamlFileLoader.php'],
]);
};
```

### 2. Configure with `Option::ONLY` parameter.

@todo
This is exact invert of `SKIP`. The `SomeFixer` will run **only if** in defined paths:

```php
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\Skipper\ValueObject\Option;

return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::ONLY, [
// this should be removed in the future, with all dead comments
SomeFixer::class => [__DIR__ . '/src/Controller'],
]);
};
```

### 3. Use `Skipper` service in Your Project

Expand Down