-
Notifications
You must be signed in to change notification settings - Fork 3
Add documentation for extends configuration option #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
251b11b
31116b6
01e814f
004628f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,104 @@ | ||||||
| --- | ||||||
| title: "extends" | ||||||
| date: 2024-06-06T00:00:00+00:00 | ||||||
| anchor: "extends" | ||||||
| weight: | ||||||
| --- | ||||||
|
|
||||||
| ## Configuration | ||||||
|
|
||||||
| <div className="config-wrapper"><div className="config">__name__: extends</div> | ||||||
| <div className="config">__type__: array</div> | ||||||
| <div className="config">__default__: []</div></div> | ||||||
|
|
||||||
| ```json showLineNumbers | ||||||
| { | ||||||
| "name": "company/project", | ||||||
| "extra": { | ||||||
| "violinist": { | ||||||
| // highlight-next-line | ||||||
| "extends": [] | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| ## Explanation | ||||||
|
|
||||||
| When you have many repositories that should behave the same way, copying the full Violinist configuration to every `composer.json` quickly becomes hard to maintain. The `extends` option lets you centralise your shared settings in one or more remote JSON documents and ask Violinist to import them before applying the project specific overrides that live in the repository. | ||||||
|
|
||||||
| Each entry in the array can either reference a Composer package that exposes a Violinist configuration file or point to a relative path inside the repository. Violinist will fetch the configuration snippets in the order you list them, merge the keys they contain, and finally apply whatever options are defined directly inside the local `extra.violinist` block. Later entries, including the local configuration, always override values defined earlier in the list, allowing every project to keep its unique tweaks while inheriting the defaults that come from your shared templates. | ||||||
|
|
||||||
|
Comment on lines
+30
to
+31
|
||||||
| Because extended configuration is resolved at run time, you can update a central document and have every repository inherit the change the next time Violinist runs. When you share configuration through a Composer package, each project still needs to receive an updated version of that package—usually by running an automated dependency update such as a Violinist pull request—before the new settings take effect. This keeps large organisations aligned without requiring the same change to be repeated in dozens of composer files. | ||||||
|
||||||
| Because extended configuration is resolved at run time, you can update a central document and have every repository inherit the change the next time Violinist runs. When you share configuration through a Composer package, each project still needs to receive an updated version of that package—usually by running an automated dependency update such as a Violinist pull request—before the new settings take effect. This keeps large organisations aligned without requiring the same change to be repeated in dozens of composer files. | |
| Because extended configuration is resolved at runtime, you can update a central document and have every repository inherit the change the next time Violinist runs. When you share configuration through a Composer package, each project still needs to receive an updated version of that package—usually by running an automated dependency update such as a Violinist pull request—before the new settings take effect. This keeps large organisations aligned without requiring the same change to be repeated in dozens of composer files. |
Copilot
AI
Apr 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence says the local config “adds an extra label next to the defaults”, but earlier the doc states later entries “always override values defined earlier”. Please clarify how merging works for array values like labels (replace vs append/union), and adjust the example/explanation to match the actual behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hyphenation: “project specific” should be “project-specific” when used as a compound modifier.