Skip to content

Commit b9eca45

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Server version should be specified as a string Event form modifications improvements Add createdAt property + setter and getter
2 parents 9579a3d + 1a90234 commit b9eca45

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

components/serializer.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ exists in your project::
7373
private $age;
7474
private $name;
7575
private $sportsman;
76+
private $createdAt;
7677

7778
// Getters
7879
public function getName()
@@ -85,6 +86,11 @@ exists in your project::
8586
return $this->age;
8687
}
8788

89+
public function getCreatedAt()
90+
{
91+
return $this->createdAt;
92+
}
93+
8894
// Issers
8995
public function isSportsman()
9096
{
@@ -106,6 +112,11 @@ exists in your project::
106112
{
107113
$this->sportsman = $sportsman;
108114
}
115+
116+
public function setCreatedAt($createdAt)
117+
{
118+
$this->createdAt = $createdAt;
119+
}
109120
}
110121

111122
Now, if you want to serialize this object into JSON, you only need to

form/dynamic_form_modification.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,11 @@ callbacks only because in two different scenarios, the data that you can use is
544544
available in different events. Other than that, the listeners always perform
545545
exactly the same things on a given form.
546546

547+
.. tip::
548+
549+
The ``FormEvents::POST_SUBMIT`` event does not allow to modify the form
550+
the listener is bound to, but it allows to modify its parent.
551+
547552
One piece that is still missing is the client-side updating of your form after
548553
the sport is selected. This should be handled by making an AJAX call back to
549554
your application. Assume that you have a sport meetup creation controller::

form/events.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ View data Normalized data transformed using a view transformer
219219

220220
.. caution::
221221

222-
At this point, you cannot add or remove fields to the form.
222+
At this point, you cannot add or remove fields to the current form and its
223+
children.
223224

224225
.. sidebar:: ``FormEvents::POST_SUBMIT`` in the Form component
225226

reference/configuration/doctrine.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ The following block shows all possible configuration keys:
312312
charset: UTF8
313313
logging: '%kernel.debug%'
314314
platform_service: MyOwnDatabasePlatformService
315-
server_version: 5.6
315+
server_version: '5.6'
316316
mapping_types:
317317
enum: string
318318
types:
@@ -362,6 +362,11 @@ The following block shows all possible configuration keys:
362362
your database server version (use ``postgres -V`` or ``psql -V`` command
363363
to find your PostgreSQL version and ``mysql -V`` to get your MySQL
364364
version).
365+
366+
Always wrap the server version number with quotes to parse it as a string
367+
instead of a float number. Otherwise, the floating-point representation
368+
issues can make your version be considered a different number (e.g. ``5.6``
369+
will be rounded as ``5.5999999999999996447286321199499070644378662109375``).
365370

366371
If you don't define this option and you haven't created your database
367372
yet, you may get ``PDOException`` errors because Doctrine will try to

0 commit comments

Comments
 (0)