@@ -105,10 +105,8 @@ The `#[Builder]` attribute provides fine-grained control over individual builder
105105 className: 'CustomUserBuilder',
106106 namespace: 'App\\Builders',
107107 fluent: true,
108- generateFactory: false,
109108 exclude: ['password'],
110109 include: ['name', 'email'],
111- immutable: false,
112110 builderMethod: 'create'
113111)]
114112class User { ... }
@@ -121,10 +119,8 @@ class User { ... }
121119| ` className ` | ` ?string ` | ` null ` | Custom name for the generated builder class |
122120| ` namespace ` | ` ?string ` | ` null ` | Custom namespace for the generated builder |
123121| ` fluent ` | ` bool ` | ` true ` | Whether setter methods should return ` self ` for chaining |
124- | ` generateFactory ` | ` bool ` | ` false ` | Generate an additional factory class |
125122| ` exclude ` | ` array ` | ` [] ` | Property names to exclude from the builder |
126123| ` include ` | ` array ` | ` [] ` | Only include these properties (if set, overrides exclude) |
127- | ` immutable ` | ` bool ` | ` false ` | Whether to treat the target class as immutable |
128124| ` builderMethod ` | ` string ` | ` 'builder' ` | Name of the static factory method |
129125
130126## Advanced Configuration Examples
@@ -203,19 +199,6 @@ $user = UserBuilder::create() // Instead of ::builder()
203199 ->build();
204200```
205201
206- ### Immutable Objects
207-
208- ``` php
209- #[Builder(immutable: true)]
210- class Money
211- {
212- public function __construct(
213- public readonly int $amount,
214- public readonly string $currency
215- ) {}
216- }
217- ```
218-
219202## Generator-Specific Configuration
220203
221204The ` generator-config ` section allows for future extensibility:
0 commit comments