# ProvidersCommand

> Lists all scaffold providers recorded in scaffold-lock.json with their file counts.

[API reference](/docs/api/index.md) › [Scaffold](/docs/extensions/scaffold/reference/index.md) › [Console](/docs/extensions/scaffold/reference/console/index.md) › [Command](/docs/extensions/scaffold/reference/console/command/index.md) › ProvidersCommand

| final class | `PHPForge\Scaffold\Console\Command\ProvidersCommand` |
| --- | --- |
| Extends | [`AbstractScaffoldCommand`](/docs/extensions/scaffold/reference/console/command/abstractscaffoldcommand/index.md) » `Symfony\Component\Console\Command\Command` |
| Source | [`src/Console/Command/ProvidersCommand.php`](https://github.com/php-forge/scaffold/blob/main/src/Console/Command/ProvidersCommand.php#L15) |

Lists all scaffold providers recorded in `scaffold-lock.json` with their file counts.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| <span id="method-execute"></span>[`execute()`](/docs/extensions/scaffold/reference/console/command/abstractscaffoldcommand/index.md#method-execute) protected final | Validates the input, resolves the project root and runs [`AbstractScaffoldCommand::handle()`](/docs/extensions/scaffold/reference/console/command/abstractscaffoldcommand/index.md#method-handle). | [`AbstractScaffoldCommand`](/docs/extensions/scaffold/reference/console/command/abstractscaffoldcommand/index.md) |
| [`handle()`](#method-handle) protected | Prints the provider table. | `ProvidersCommand` |
| <span id="method-validate"></span>[`validate()`](/docs/extensions/scaffold/reference/console/command/abstractscaffoldcommand/index.md#method-validate) protected | Returns whether the input is valid, writing the error to the error output when it is not. | [`AbstractScaffoldCommand`](/docs/extensions/scaffold/reference/console/command/abstractscaffoldcommand/index.md) |

## Method details

### handle() <span id="method-handle"></span>

```php
protected function handle(Symfony\Component\Console\Input\InputInterface $input, PHPForge\Scaffold\Console\SymfonyOutputWriter $out, string $projectRoot): int
```

Prints the provider table.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$input` | `Symfony\Component\Console\Input\InputInterface` | Input that may carry the global `--working-dir` option. |
| `$out` | [`PHPForge\Scaffold\Console\SymfonyOutputWriter`](/docs/extensions/scaffold/reference/console/symfonyoutputwriter/index.md) | Output sink that receives the provider table and the error messages. |
| `$projectRoot` | `string` | Absolute path of the project root. |

**Returns**

`int`: Exit code of [`ProvidersService::run()`](/docs/extensions/scaffold/reference/services/providersservice/index.md#method-run).