Skip to content
github-actions edited this page Apr 11, 2026 · 1 revision

Persists normalized .gitattributes content.

This writer SHALL align attribute declarations using the longest path spec, write the provided textual content to the target path, and MUST append a final trailing line feed for deterministic formatting.


Methods

__construct

public __construct(\Symfony\Component\Filesystem\Filesystem $filesystem): mixed

Parameters:

Parameter Type Description
$filesystem \Symfony\Component\Filesystem\Filesystem the filesystem service responsible for writing the file

write

Writes the .gitattributes content to the specified filesystem path.

public write(string $gitattributesPath, string $content): void

Parameters:

Parameter Type Description
$gitattributesPath string The filesystem path to the .gitattributes file.
$content string The merged .gitattributes content to persist.

Clone this wiki locally