Download the PHP package rosalana/configure without Composer
On this page you can find all versions of the php package rosalana/configure. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package configure
Rosalana Configure is a low-level engine for programmatic, structure-safe manipulation of Laravel configuration files.
It allows you to read, modify, generate and reorganize config files while preserving formatting, order, comments, and developer intent.
This package is designed primarily for:
- Laravel package authors
- tooling and installers
- automated configuration workflows
- advanced configuration migrations
Installation
Why Configure?
Laravel configuration files are PHP code — not simple data structures.
Editing them reliably means dealing with:
- nested arrays
- comments
- formatting
- ordering
- developer edits
- partial updates
Rosalana Configure does not treat config files as arrays. It treats them as a structured document composed of nodes.
[!NOTE] Think of it more like a DOM or AST for Laravel config files.
Core Concepts
Nodes
Every configuration file is represented as a tree of nodes:
| Node Type | Description |
|---|---|
File |
Root of the configuration file |
Section |
An array block ('database' => [...]) |
Value |
A single key-value pair |
Comment |
Single-line comment (//) |
RichComment |
Laravel-style block comment (/* */) |
All operations are performed by selecting nodes, not by mutating arrays.
Selection Model
Selection works similarly to browser dev tools:
- You select a node
- Operate on it
- Scope moves automatically to make chaining intuitive
Sections vs Values
- Sections represent arrays
- Values represent scalar or expression values
You can traverse deeper:
Or jump directly using a full path:
Automatic Creation
If a section or value does not exist, it is created automatically.
New nodes are always appended to the end of their parent section.
Working with Values
Soft assignment
Sets the value only if it does not already exist.
Value typing
Always pass values as strings. The engine resolves the correct PHP representation.
Non-associative arrays can be written on multiple lines and still be recognized correctly. The engine will automatically reformat them when containing five items or more.
[!IMPORTANT] Associative arrays must be created using
section(), notset().
Renaming Nodes
Renaming changes the node path. When selecting again, use the new name.
Moving and Reordering Nodes
All nodes can be reordered within their parent scope.
Cross-scope movement
To move nodes outside their parent, specify the full target path.
Chaining & Scope Control
Selectors automatically return to the appropriate scope.
Root selection (. notation)
Using . always resets scope to the root file.
Comments Support
Comments are first-class citizens. You can add, remove, and manipulate comments in the same way as other nodes.
Single-line comments
Multi-line comments
Laravel-style comments
Node-bound comments
As you can see, comments were placed inside the section they are created in just like other nodes.
Selecting comments can be tricky, because comments do not have keys.
More proper way to create and select comments is to bound them to other nodes. Every node may have one associated comment, placed immediately above it.
[!IMPORTANT] The comment is rewritten if the node already has an associated comment. Also note that
withComment()is just for scoping convenience. It does not make any functional difference compared to creating comments normally.
This way, comments are logically tied to their nodes, and you can rewrite them without worrying about selecting them directly.
Layout, Padding & Formatting
Each node defines its own padding rules.
The engine:
- respects indentation
- preserves spacing between nodes
- recalculates layout on every structural change
- guarantees consistent formatting
You never manually manage whitespace.
Saving & Diffing
Save Changes
Preview Changes
Debugging & Inspection
Every node can be inspected:
Common Getter Methods
Common Helpers
Value Helpers
Parent Node Helpers
Comment Node Helpers
License
Rosalana Configure is open-source under the MIT license, allowing you to freely use, modify, and distribute it with minimal restrictions.
You may not be able to use our systems but you can use our code to build your own.
For details on how to contribute or how the Rosalana ecosystem is maintained, please refer to each repository’s individual guidelines.
Questions or feedback?
Feel free to open an issue or contribute with a pull request. Happy coding with Rosalana!
