PlannedFile
A file a generator intends to write: its absolute path and full contents.
PlannedFile::__construct()
public function __construct(string $path, string $contents, bool $merge = false):Parameters
| Name | Type | Description |
|---|---|---|
| $path | string | |
| $contents | string | |
| $merge | bool | Whether `$contents` is a MARKER-BASED merge of new wiring into a plugin file that already exists on disk (see {@see MarkerInserter}), as opposed to brand new content. `false` (the default) preserves this class's pre-F1 meaning — every existing caller of `new PlannedFile(...)` keeps producing a plan {@see WriteGuard::assertWritable()} still refuses to clobber without `--force`. `true` is a generator's own promise that the merge is idempotent-safe (re-running it does not duplicate the insertion) and is meant to be written even when the target already exists — {@see WriteGuard::assertWritable()} honors it by skipping the "already * exists" guard for that one file. |