-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
[Maintenance] Bump plugin to Sylius 2.0 #437
Conversation
mpysiak
commented
Nov 18, 2024
Q | A |
---|---|
Branch? | 2.0 |
Bug fix? | no |
New feature? | no |
Related tickets | n/a |
b85699d
to
b347b9d
Compare
f34b9c1
to
fd5d520
Compare
private RefundFactoryInterface $refundFactory, | ||
private RemainingTotalProviderInterface $remainingTotalProvider, | ||
private OrderRepositoryInterface $orderRepository, | ||
private ObjectManager $refundManager, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to replace every ObjectManager
with EntityManagerInterface
since odm support is dropped. (There are 12 instances of ObjectManager
in the codebase.)
private ObjectManager $refundManager, | |
private EntityManagerInterface $refundManager, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/templates/order/admin/content/header/title_block/actions/refunds.html.twig
Outdated
Show resolved
Hide resolved
src/templates/order/admin/content/sections/payments/item/name.html.twig
Outdated
Show resolved
Hide resolved
src/templates/order/admin/refund/content/header/title_block/actions.html.twig
Outdated
Show resolved
Hide resolved
src/templates/order/admin/refund/content/header/title_block/actions/refund_all.html.twig
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you plan to rename all templates to snake_case? This one still at camelCase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file still exists, but now empty. But I'm not sure if GH shows this right.
If true, then this file as well tests/Application/assets/shop/entry.js
"symfony/messenger": "^5.4.21 || ^6.4" | ||
"php": "^8.2", | ||
"knplabs/knp-snappy-bundle": "^1.10", | ||
"myclabs/php-enum": "^1.8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say it's high time to drop pseudo enum support and use sylius/sylius style consts (or php enums)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would like to do that. There is another task for that. This will be done in another PR
Thanks @diimpp for your code review! However, this PR is still very much a work in progress, and I didn't mark it as a draft :) |
f5fe65a
to
9dddf97
Compare
@mpysiak You're welcome. Please ping me when it's done. :) Do you plan to refactor how refund items entities are structured or it's more of the maintenance PR? There is this issue from 2020 #193, which I think still actual. Described problem is more about letting people develop based of this plugin, rather then solving immediate bug. tldr: Add "root" entity |
eb2fe2d
to
51cc2ca
Compare
51cc2ca
to
92bd78c
Compare
@diimpp This PR is mainly Maintenance - just to bump to Sylius 2.0. I've removed deprecations, add some small refactors. But PR is getting huge, so it will be probably merged (after CR from the team). Comments and fixes will be done in other commits, to make it small and more transparent 🖖 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the separate PRs:
- add an UPGRADE file with all these changes
- change the structure to the new recommended one by moving directories from
src/Resources
to main directory
<tr> | ||
{% hook 'table.header' %} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% hook 'table.body' %} | ||
</tbody> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be confusing not to have a table
hook, I don't know if it wouldn't be better to add an additional template with it and trigger these two there 🤔
src/templates/order/admin/refund/content/sections/form/table/body/item/refund_button.html.twig
Show resolved
Hide resolved
src/templates/order/admin/refund/content/sections/form/table/shipment.html.twig
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one should be refactored