Open konrad-czernecki-esky opened 1 month ago
maybe some interfaces available in the messenger-monitor-bundle library that can be implemented and will allow us to use other ORM than doctrine/orm
Here it is https://github.com/zenstruck/messenger-monitor-bundle/blob/v0.4.0/src/History/Storage.php
I did not know about it, thanks!
I've tried it, but I've noticed a few problems:
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mongo-mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping"
xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
<mapped-superclass name="Zenstruck\Messenger\Monitor\History\Model\ProcessedMessage">
<field name="runId" type="int"/>
<field name="attempt" type="int"/>
<field name="type" type="string"/>
<field name="description" type="string" nullable="true"/>
<field name="dispatchedAt" type="date_immutable"/>
<field name="receivedAt" type="date_immutable"/>
<field name="finishedAt" type="date_immutable"/>
<field name="memoryUsage" type="int"/>
<field name="transport" type="string"/>
<field name="tags" type="string" nullable="true"/>
<field name="failureType" type="string" nullable="true"/>
<field name="failureMessage" type="string" nullable="true"/>
<embed-one field="results" target-document="Zenstruck\Messenger\Monitor\History\Model\Results" />
</mapped-superclass>
</doctrine-mongo-mapping>
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mongo-mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping"
xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
<embedded-document name="Zenstruck\Messenger\Monitor\History\Model\Results">
<field name="data" type="hash" />
</embedded-document>
</doctrine-mongo-mapping>
Hi, currently we can't use this library with the doctrine/mongodb-odm, even though MongoDB is quite a popular database in the PHP world.
It would be nice to have native support in the library or at least the possibility to do the integration on your own (maybe some interfaces available in the messenger-monitor-bundle library that can be implemented and will allow us to use other ORM than doctrine/orm)