Skip to content

Commit 88dc3ec

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: Server version should be specified as a string Event form modifications improvements Add createdAt property + setter and getter
2 parents 48b260e + b9eca45 commit 88dc3ec

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
@@ -70,6 +70,7 @@ exists in your project::
7070
private $age;
7171
private $name;
7272
private $sportsman;
73+
private $createdAt;
7374

7475
// Getters
7576
public function getName()
@@ -82,6 +83,11 @@ exists in your project::
8283
return $this->age;
8384
}
8485

86+
public function getCreatedAt()
87+
{
88+
return $this->createdAt;
89+
}
90+
8591
// Issers
8692
public function isSportsman()
8793
{
@@ -103,6 +109,11 @@ exists in your project::
103109
{
104110
$this->sportsman = $sportsman;
105111
}
112+
113+
public function setCreatedAt($createdAt)
114+
{
115+
$this->createdAt = $createdAt;
116+
}
106117
}
107118

108119
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
@@ -502,6 +502,11 @@ callbacks only because in two different scenarios, the data that you can use is
502502
available in different events. Other than that, the listeners always perform
503503
exactly the same things on a given form.
504504

505+
.. tip::
506+
507+
The ``FormEvents::POST_SUBMIT`` event does not allow to modify the form
508+
the listener is bound to, but it allows to modify its parent.
509+
505510
One piece that is still missing is the client-side updating of your form after
506511
the sport is selected. This should be handled by making an AJAX call back to
507512
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
@@ -321,7 +321,7 @@ The following block shows all possible configuration keys:
321321
charset: UTF8
322322
logging: '%kernel.debug%'
323323
platform_service: MyOwnDatabasePlatformService
324-
server_version: 5.6
324+
server_version: '5.6'
325325
mapping_types:
326326
enum: string
327327
types:
@@ -371,6 +371,11 @@ The following block shows all possible configuration keys:
371371
your database server version (use ``postgres -V`` or ``psql -V`` command
372372
to find your PostgreSQL version and ``mysql -V`` to get your MySQL
373373
version).
374+
375+
Always wrap the server version number with quotes to parse it as a string
376+
instead of a float number. Otherwise, the floating-point representation
377+
issues can make your version be considered a different number (e.g. ``5.6``
378+
will be rounded as ``5.5999999999999996447286321199499070644378662109375``).
374379

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

0 commit comments

Comments
 (0)