8000 Added a caution note about UploadedFile and insulated tests · symfony/symfony-docs@eacd844 · GitHub
[go: up one dir, main page]

Skip to content

Commit eacd844

Browse files
committed
Added a caution note about UploadedFile and insulated tests
1 parent 0ae6a4c commit eacd844

File tree

1 file changed

+8
-0
lines changed
8000

1 file changed

+8
-0
lines changed

testing/insulating_clients.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,11 @@ clean PHP process, thus avoiding any side-effects.
4343

4444
As an insulated client is slower, you can keep one client in the main
4545
process, and insulate the other ones.
46+
47+
.. caution::
48+
49+
Insulating tests requires some serializing and unserializing operations. If
50+
your test includes data that can't be serialized, such as file streams when
51+
using the ``UploadedFile`` class, you'll see an exception about
52+
*"serialization is not allowed"*. This is a technical limitation of PHP, so
53+
the only solution is to disable insulation for those tests.

0 commit comments

Comments
 (0)
0