php-cooper-config

CheckCommand extends ProjectCommand
in package

FinalYes

`cooper:check [--root=DIR] [--path=FILE]`: loads the configuration as `Config::load()` would and reports it -- the document, its top-level keys; exit status 1 and the error on failure.

Writes no compiled file, whatever the load options say: a deploy step usually runs as another user than the web server, which could then neither read nor replace a file it wrote.

The load options are injected, so a framework integration checks the document the way it loads it -- its own path, env, resolvers, tags, modules. root and compiledCache among them are ignored: the root is the command's own (see ProjectCommand) and the compiled cache is always off. --path outranks an injected path.

Table of Contents

Properties

$loadOptions  : array<string|int, mixed>

Methods

__construct()  : mixed
configure()  : void
execute()  : int

Properties

$loadOptions read-only

private array<string|int, mixed> $loadOptions = []

Methods

__construct()

public __construct([string|null $projectRoot = null ][, array<string, mixed> $loadOptions = [] ]) : mixed
Parameters
$projectRoot : string|null = null

the project root unless --root says otherwise; null for the Composer root package's directory

$loadOptions : array<string, mixed> = []

Config::load()'s options, checked when the command runs

execute()

protected execute(InputInterface $input, OutputInterface $output) : int
Parameters
$input : InputInterface
$output : OutputInterface
Return values
int
On this page

Search results