Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7b561a6

Browse filesBrowse files
committed
minor #8180 Added a caution note about UploadedFile and insulated tests (javiereguiluz)
This PR was merged into the 2.7 branch. Discussion ---------- Added a caution note about UploadedFile and insulated tests This will help avoid issues like symfony/symfony#19572. Commits ------- eacd844 Added a caution note about UploadedFile and insulated tests
2 parents a965d4c + eacd844 commit 7b561a6
Copy full SHA for 7b561a6

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed

‎testing/insulating_clients.rst

Copy file name to clipboardExpand all lines: testing/insulating_clients.rst
+8Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.