Skip to content

Commit 1a86e7d

Browse files
authored
Replace annotations with attributes in migrating-schemas.rst (#2908)
1 parent 7f9b835 commit 1a86e7d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/en/reference/migrating-schemas.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ before normal hydration.
137137
}
138138
}
139139
140-
The annotation is defined with one or a list of field names. During hydration,
140+
The attribute is defined with one or a list of field names. During hydration,
141141
these fields will be checked in order and, for each field present, the annotated
142142
method will be invoked with its value as a single argument. Since the
143143
``firstName`` and ``lastName`` fields are mapped, they would then be updated
@@ -152,10 +152,10 @@ Moving Fields
152152
Migrating your schema can be a difficult task, but Doctrine provides a few
153153
different methods for dealing with it:
154154

155-
- **@AlsoLoad** - load values from old fields or transform data through methods
156-
- **@Field(notSaved=true)** - load values into fields without saving them again
157-
- **@PostLoad** - execute code after all fields have been loaded
158-
- **@PrePersist** - execute code before your document gets saved
155+
- ``#[AlsoLoad]`` - load values from old fields or transform data through methods
156+
- ``#[Field(notSaved: true)]`` - load values into fields without saving them again
157+
- ``#[PostLoad]`` - execute code after all fields have been loaded
158+
- ``#[PrePersist]`` - execute code before your document gets saved
159159

160160
Imagine you have some address-related fields on a Person document:
161161

0 commit comments

Comments
 (0)