Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved all entities to mapped-superclasses for better extensibility #130

Merged
merged 3 commits into from
Jun 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"php": "^7.2",
"knplabs/knp-snappy-bundle": "^1.5",
"myclabs/php-enum": "^1.7",
"sylius/resource-bundle": "^1.6.0-RC.2",
"sylius/sylius": "^1.4",
"symfony/messenger": "~4.3.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Feature: Preselecting refund payment method based on order's payment
@ui
Scenario: When refunding, the selected payment should be the first one of the corresponding order
When I want to refund some units of order "#00000022"
Then the selected refund payment method should be "Space money"
Then the selected refund payment method should be "Space money"
4 changes: 2 additions & 2 deletions src/Resources/config/doctrine/CreditMemo.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"
>

<entity name="Sylius\RefundPlugin\Entity\CreditMemo" table="sylius_refund_credit_memo">
<mapped-superclass name="Sylius\RefundPlugin\Entity\CreditMemo" table="sylius_refund_credit_memo">
<id name="id" column="id" type="string" />

<field name="number" />
Expand All @@ -26,5 +26,5 @@
<indexes>
<index columns="orderNumber" />
</indexes>
</entity>
</mapped-superclass>
</doctrine-mapping>
4 changes: 2 additions & 2 deletions src/Resources/config/doctrine/Refund.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"
>

<entity name="Sylius\RefundPlugin\Entity\Refund" table="sylius_refund_refund">
<mapped-superclass name="Sylius\RefundPlugin\Entity\Refund" table="sylius_refund_refund">
<id name="id" column="id" type="integer">
<generator strategy="AUTO" />
</id>
Expand All @@ -16,6 +16,6 @@
<field name="amount" type="integer" />
<field name="refundedUnitId" type="integer" nullable="true" column="refunded_unit_id"/>
<field name="type" type="sylius_refund_refund_type" />
</entity>
</mapped-superclass>

</doctrine-mapping>
4 changes: 2 additions & 2 deletions src/Resources/config/doctrine/RefundPayment.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"
>

<entity name="Sylius\RefundPlugin\Entity\RefundPayment" table="sylius_refund_payment">
<mapped-superclass name="Sylius\RefundPlugin\Entity\RefundPayment" table="sylius_refund_payment">
<id name="id" column="id" type="integer">
<generator strategy="AUTO" />
</id>
Expand All @@ -20,6 +20,6 @@
<many-to-one field="paymentMethod" target-entity="Sylius\Component\Payment\Model\PaymentMethodInterface">
<join-column name="payment_method_id" referenced-column-name="id" nullable="true" />
</many-to-one>
</entity>
</mapped-superclass>

</doctrine-mapping>