-
Notifications
You must be signed in to change notification settings - Fork 3
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
Create Gmv Command PoC #1
Conversation
d7a0701
to
15a38de
Compare
15a38de
to
79e1fc1
Compare
2bd7e36
to
3b276ae
Compare
3b276ae
to
21f832a
Compare
399f47b
to
c14d738
Compare
c14d738
to
dced02b
Compare
ee28d53
to
2ab6dd6
Compare
51e438d
to
0d37ebf
Compare
28fdb46
to
59d587d
Compare
59d587d
to
8a4ebef
Compare
src/Parser/DateParser.php
Outdated
$now = new \DateTime(); | ||
|
||
return (clone $now) | ||
->modify('first day of -12 months'); |
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 would be nice to have configurable parameters for the default start date and default end date.
<argument type="service" id="sylius_gmv.validator.input_parameters" /> | ||
<argument type="service" id="sylius_gmv.parser.date" /> | ||
<argument type="service" id="sylius_gmv.provider.gmv" /> | ||
<tag name="console.command" command="sylius:gmv:calculate" /> |
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.
Is this tag needed as there is AsCommand
attribute configured?
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.
If I remove this tag. All private services are removed from container, and it creates problems in tests
src/Parser/DateParserInterface.php
Outdated
public function parseStartOfMonth(string $date): \DateTime; | ||
|
||
public function parseEndOfMonth(string $date): \DateTime; | ||
|
||
public function getDefaultStartDate(): \DateTime; | ||
|
||
public function getDefaultEndDate(): \DateTime; |
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.
public function parseStartOfMonth(string $date): \DateTime; | |
public function parseEndOfMonth(string $date): \DateTime; | |
public function getDefaultStartDate(): \DateTime; | |
public function getDefaultEndDate(): \DateTime; | |
public function parseStartOfMonth(string $date): \DateTimeInterface; | |
public function parseEndOfMonth(string $date): \DateTimeInterface; | |
public function getDefaultStartDate(): \DateTimeInterface; | |
public function getDefaultEndDate(): \DateTimeInterface; |
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.
ddc97de
to
3aec3aa
Compare
3aec3aa
to
19bc7b8
Compare
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.
Also, maybe add a .gitattributes
file so we can minimise the weight of this package
20e84a4
to
62ae1d4
Compare
62ae1d4
to
ab3141b
Compare
expensive_sw_mug_item_unit4: | ||
__construct: [ "@expensive_sw_mug_item_2" ] | ||
|
||
Sylius\Component\Core\Model\Adjustment: |
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.
To test both, excluded and included taxes, configure also some not neutral tax adjustments 🖖🏻
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.
And what about promotions? They do not affect the calculation because we sum up the total items in the order, am I correct?
No description provided.