Skip to content

Commit 5786cdb

Browse files
committed
Added a comment to explain why we need to proxy the DateTime class after PR-3 got merged, so we know a bit why this is in the code base.
1 parent 25898fc commit 5786cdb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

etc/di.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@
2020
</argument>
2121
</arguments>
2222
</type>
23+
<!--
24+
We need to proxy the creating of a DateTime object,
25+
because it tries to talk to the database and we don't want that to happen already when injecting this argument in a constructor,
26+
it breaks running integration tests for example
27+
See: https://github.com/baldwin-agency/magento2-module-url-data-integrity-checker/issues/2
28+
-->
2329
<type name="Baldwin\UrlDataIntegrityChecker\Storage\Meta">
2430
<arguments>
25-
<argument name="dateTime" xsi:type="object">
26-
\Magento\Framework\Stdlib\DateTime\DateTime\Proxy
27-
</argument>
31+
<argument name="dateTime" xsi:type="object">\Magento\Framework\Stdlib\DateTime\DateTime\Proxy</argument>
2832
</arguments>
2933
</type>
3034
</config>

0 commit comments

Comments
 (0)