Skip to content

Commit e41bbe8

Browse files
committed
doc: add warning about complex global state performance
1 parent 81eb3b8 commit e41bbe8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/index.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,9 @@ Global State
14841484
~~~~~~~~~~~~
14851485

14861486
If you have an initial database state you want for all tests, you can set this in the config of the bundle. Accepted
1487-
values are: stories as service, "global" stories and invokable services.
1487+
values are: stories as service, "global" stories and invokable services. Global state is loaded before each using
1488+
the ``ResetDatabase`` trait. If you are using `DamaDoctrineTestBundle`_, it is only loaded once for the entire
1489+
test suite.
14881490

14891491
.. configuration-block::
14901492

@@ -1508,6 +1510,10 @@ values are: stories as service, "global" stories and invokable services.
15081510

15091511
The :ref:`ResetDatabase <enable-foundry-in-your-testcase>` trait is required when using global state.
15101512

1513+
.. warning::
1514+
1515+
Be aware that a complex global state could slow down your test suite.
1516+
15111517
PHPUnit Data Providers
15121518
~~~~~~~~~~~~~~~~~~~~~~
15131519

0 commit comments

Comments
 (0)