-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #312 Sylius 1.13 update (BartoszWojdalowicz)
This PR was merged into the main branch. Discussion ---------- Update plugin to sylius 1.13-dev. Drop support for sylius 1.11 Commits ------- Sylius 1.13 - Update composer.json Sylius 1.13 - Update test application config Sylius 1.13 - add workflow event Sylius 1.13 - update github actions config Sylius 1.13 - remove config for sylius 1.11 Sylius 1.13 - Fix problem with wrong mink selenium version, fix bundles.php Sylius 1.13 - Fix bundles.php Sylius 1.13 - Change minimal sylius 1.12 version in gh actions Sylius 1.13 - Fix problem with workflow event Sylius 1.13 - Ignore 2 phpstan errors, add return type Sylius 1.13 - Fix ecs Sylius 1.13 - Fix behat scenarios Sylius 1.13 - Remove empty line Rename OrderPaymentPaidListener to ProduceOrderPaymentPaidListener Remove unnecessary config Add checking version of SyliusCoreBundle Update upgrade file Update readme file Add sylius state machin default adapter [Maintenance] Slight fixes of 1.13 support [Maintenance] Update builds [Maintenance] Update upgrade file [Maintenance] Update upgrade file [Maintenance] Remove default autoconfigure and autowire
- Loading branch information
Showing
30 changed files
with
159 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,37 +14,53 @@ jobs: | |
tests: | ||
runs-on: ubuntu-latest | ||
|
||
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, wkhtmltopdf: ${{ matrix.wkhtmltopdf }}" | ||
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, wkhtmltopdf: ${{ matrix.wkhtmltopdf }}, State Machine Adapter ${{ matrix.state_machine_adapter }}" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ["8.0", "8.1"] | ||
symfony: ["^5.4", "^6.0"] | ||
sylius: ["~1.11.10", "~1.12.0"] | ||
node: ["16.x"] | ||
mysql: ["5.7", "8.0"] | ||
php: ["8.1", "8.2"] | ||
symfony: ["^5.4.21", "^6.4"] | ||
sylius: ["~1.12.0", "~1.13.x-dev",] | ||
node: ["20.x"] | ||
mysql: ["8.0"] | ||
wkhtmltopdf: ["0.12.6-1"] | ||
state_machine_adapter: [ "winzou_state_machine", "symfony_workflow" ] | ||
|
||
include: | ||
- | ||
php: "8.1" | ||
symfony: "^6.0" | ||
php: "8.3" | ||
symfony: "^6.4" | ||
sylius: "~1.13.x-dev" | ||
node: "20.x" | ||
mysql: "8.0" | ||
wkhtmltopdf: "0.12.6-1" | ||
state_machine_adapter: "symfony_workflow" | ||
- | ||
php: "8.2" | ||
symfony: "^6.4" | ||
sylius: "~1.12.0" | ||
node: "16.x" | ||
node: "20.x" | ||
mysql: "8.0" | ||
wkhtmltopdf: false | ||
state_machine_adapter: "winzou_state_machine" | ||
- | ||
php: "8.2" | ||
symfony: "^6.4" | ||
sylius: "~1.13.x-dev" | ||
node: "20.x" | ||
mysql: "8.0" | ||
wkhtmltopdf: false | ||
state_machine_adapter: "symfony_workflow" | ||
|
||
exclude: | ||
- php: "8.0" | ||
symfony: "^6.0" | ||
|
||
- symfony: "^6.0" | ||
sylius: "~1.11.10" | ||
- sylius: "~1.12.0" | ||
state_machine_adapter: "symfony_workflow" | ||
|
||
env: | ||
APP_ENV: test | ||
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}" | ||
TEST_SYLIUS_STATE_MACHINE_ADAPTER: "${{ matrix.state_machine_adapter }}" | ||
|
||
steps: | ||
- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ Feature: Filtering invoices | |
And the store has a zone "Germany + France" with code "DE + FR" | ||
And this zone has the "Germany" country member | ||
And this zone has the "France" country member | ||
And the store has a product "PHP T-Shirt" priced at "€10" available in channel "WEB-DE" and channel "WEB-FR" | ||
And the store has a product "PHP T-Shirt" priced at "€10.00" available in channel "WEB-DE" and channel "WEB-FR" | ||
And the store ships everywhere for free for all channels | ||
And the store allows paying offline for all channels | ||
And there is a customer "[email protected]" that placed an order "#00000022" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ Feature: Seeing an invoice with items having promotion applied | |
And there is a promotion "50% shipping discount" | ||
And it gives "50%" discount on shipping to every order | ||
And there is a promotion "Anatomy Park Promotion" | ||
And this promotion gives "$1" off on every product with minimum price at "$5.00" | ||
And this promotion gives "$1.00" off on every product with minimum price at "$5.00" | ||
And there is a customer "[email protected]" that placed an order "#00000666" | ||
And the customer "Lucifer Morningstar" addressed it to "Seaside Fwy", "90802" "Los Angeles" in the "United States" | ||
And for the billing address of "Mazikeen Lilim" in the "Pacific Coast Hwy", "90806" "Los Angeles", "United States" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Feature: Seeing an invoice with items and shipment having promotion applied | |
And the store has "Galaxy Post" shipping method with "$20.00" fee | ||
And the store allows paying with "Space money" | ||
And there is a promotion "Anatomy Park Promotion" | ||
And this promotion gives "$10" discount to every order with items total at least "$15.00" | ||
And this promotion gives "$10.00" discount to every order with items total at least "$15.00" | ||
And there is a customer "[email protected]" that placed an order "#00000666" | ||
And the customer "Lucifer Morningstar" addressed it to "Seaside Fwy", "90802" "Los Angeles" in the "United States" | ||
And for the billing address of "Mazikeen Lilim" in the "Pacific Coast Hwy", "90806" "Los Angeles", "United States" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ Feature: Seeing included in price taxes and promotions applied on an invoice | |
And the store has "UPS" shipping method with "$10.00" fee | ||
And the store allows paying with "Cash on Delivery" | ||
And there is a promotion "Anatomy Park Promotion" | ||
And this promotion gives "$10" off on every product with minimum price at "$5.00" | ||
And this promotion gives "$10.00" off on every product with minimum price at "$5.00" | ||
And there is a customer "[email protected]" that placed an order "#00000666" | ||
And the customer bought 2 "PHP T-Shirt" products | ||
And the customer "Lucifer Morningstar" addressed it to "Seaside Fwy", "90802" "Los Angeles" in the "United States" | ||
|
37 changes: 37 additions & 0 deletions
37
src/EventListener/Workflow/Payment/ProduceOrderPaymentPaidListener.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Sylius Sp. z o.o. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Sylius\InvoicingPlugin\EventListener\Workflow\Payment; | ||
|
||
use Sylius\Component\Core\Model\PaymentInterface; | ||
use Sylius\InvoicingPlugin\EventProducer\OrderPaymentPaidProducer; | ||
use Symfony\Component\Workflow\Event\CompletedEvent; | ||
use Webmozart\Assert\Assert; | ||
|
||
final class ProduceOrderPaymentPaidListener | ||
{ | ||
public function __construct( | ||
private readonly OrderPaymentPaidProducer $orderPaymentPaidProducer, | ||
) { | ||
} | ||
|
||
/** @phpstan-ignore-next-line */ | ||
public function __invoke(CompletedEvent $event): void | ||
{ | ||
/** @phpstan-ignore-next-line */ | ||
$payment = $event->getSubject(); | ||
Assert::isInstanceOf($payment, PaymentInterface::class); | ||
|
||
$this->orderPaymentPaidProducer->__invoke($payment); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<services> | ||
<defaults public="true" /> | ||
|
||
<service id="sylius_invoicing_plugin.event_listener.workflow.payment.produce_order_payment_paid" | ||
class="Sylius\InvoicingPlugin\EventListener\Workflow\Payment\ProduceOrderPaymentPaidListener"> | ||
<argument type="service" id="sylius_invoicing_plugin.event_producer.order_payment_paid" /> | ||
|
||
<tag name="kernel.event_listener" event="workflow.sylius_payment.completed.complete" priority="100" /> | ||
</service> | ||
</services> | ||
</container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
tests/Application/config/sylius/1.11/packages/dev/swiftmailer.yaml
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
tests/Application/config/sylius/1.11/packages/staging/swiftmailer.yaml
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
tests/Application/config/sylius/1.11/packages/swiftmailer.yaml
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
tests/Application/config/sylius/1.11/packages/test/swiftmailer.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.