Skip to content

Commit ef5a7d7

Browse files
authored
Merge pull request #435 from Rafikooo/1.6-update-ci-amend
Drop `Sylius ~1.12.0`, Update CI Definition & Fix Build
2 parents 1aad843 + b7dfd00 commit ef5a7d7

83 files changed

Lines changed: 345 additions & 411 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
cron: "0 1 * * 6" # Run at 1am every Saturday
1515
workflow_dispatch: ~
1616

17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
1721
jobs:
1822
tests:
1923
runs-on: ubuntu-latest
@@ -25,7 +29,7 @@ jobs:
2529
matrix:
2630
php: ["8.1", "8.2"]
2731
symfony: ["^5.4.21", "^6.4"]
28-
sylius: ["~1.12.0", "~1.13.0",]
32+
sylius: ["~1.13.0"]
2933
node: ["20.x"]
3034
mysql: ["8.0"]
3135
wkhtmltopdf: ["0.12.6-1"]
@@ -40,14 +44,6 @@ jobs:
4044
mysql: "8.0"
4145
wkhtmltopdf: "0.12.6-1"
4246
state_machine_adapter: "symfony_workflow"
43-
-
44-
php: "8.2"
45-
symfony: "^6.4"
46-
sylius: "~1.12.0"
47-
node: "20.x"
48-
mysql: "8.0"
49-
wkhtmltopdf: false
50-
state_machine_adapter: "winzou_state_machine"
5147
-
5248
php: "8.2"
5349
symfony: "^6.4"
@@ -57,10 +53,6 @@ jobs:
5753
wkhtmltopdf: false
5854
state_machine_adapter: "symfony_workflow"
5955

60-
exclude:
61-
-
62-
sylius: "~1.12.0"
63-
state_machine_adapter: "symfony_workflow"
6456

6557
env:
6658
APP_ENV: test
@@ -140,11 +132,11 @@ jobs:
140132
-
141133
name: Get Composer cache directory
142134
id: composer-cache
143-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
135+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
144136

145137
-
146138
name: Cache Composer
147-
uses: actions/cache@v2
139+
uses: actions/cache@v4
148140
with:
149141
path: ${{ steps.composer-cache.outputs.dir }}
150142
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
@@ -171,11 +163,11 @@ jobs:
171163
-
172164
name: Get Yarn cache directory
173165
id: yarn-cache
174-
run: echo "::set-output name=dir::$(yarn cache dir)"
166+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
175167

176168
-
177169
name: Cache Yarn
178-
uses: actions/cache@v2
170+
uses: actions/cache@v4
179171
with:
180172
path: ${{ steps.yarn-cache.outputs.dir }}
181173
key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
@@ -247,9 +239,11 @@ jobs:
247239

248240
-
249241
name: Upload Behat logs
250-
uses: actions/upload-artifact@v2
251-
if: failure()
242+
uses: actions/upload-artifact@v4
252243
with:
253-
name: Behat logs
244+
name: "Behat logs - ${{ matrix.sylius }}-${{ github.run_id }}-${{ github.run_number }}"
254245
path: etc/build/
255246
if-no-files-found: ignore
247+
compression-level: 6
248+
overwrite: true
249+
include-hidden-files: false

UPGRADE-1.6.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
### UPGRADE FROM 1.5.X TO 1.6.0
2+
3+
1. Support for Sylius 1.12 has been dropped, upgrade your application to [Sylius 1.13](https://github.com/Sylius/Sylius/blob/1.13/UPGRADE-1.13.md).
4+
or to [Sylius 1.14](https://github.com/Sylius/Sylius/blob/1.14/UPGRADE-1.14.md).
5+

behat.yml.dist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This file is part of the Sylius package.
2+
# (c) Sylius Sp. z o.o.
3+
14
imports:
25
- vendor/sylius/sylius/src/Sylius/Behat/Resources/config/suites.yml
36
- tests/Behat/Resources/suites.yml
@@ -61,3 +64,5 @@ default:
6164
FriendsOfBehat\ExcludeSpecificationsExtension:
6265
features:
6366
- features/pdf_generation_disabled
67+
68+
SyliusLabs\SuiteTagsExtension: ~

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"myclabs/php-enum": "^1.7",
2525
"php-http/message-factory": "^1.1",
2626
"sylius/resource-bundle": "^1.9",
27-
"sylius/sylius": "~1.12.0 || ~1.13.0",
27+
"sylius/sylius": "~1.13.0",
2828
"symfony/messenger": "^5.4.21 || ^6.4"
2929
},
3030
"require-dev": {
@@ -49,6 +49,7 @@
4949
"phpunit/phpunit": "^9.5",
5050
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
5151
"sylius-labs/coding-standard": "^4.2",
52+
"sylius-labs/suite-tags-extension": "~0.1",
5253
"symfony/browser-kit": "^5.4.21 || ^6.4",
5354
"symfony/debug-bundle": "^5.4.21 || ^6.4",
5455
"symfony/dotenv": "^5.4.21 || ^6.4",

phpstan.neon

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,25 @@ parameters:
77
paths:
88
- src
99

10-
checkMissingIterableValueType: false
11-
checkGenericClassInNonGenericObjectType: false
12-
1310
excludePaths:
1411
# Makes PHPStan crash
1512
- 'src/DependencyInjection/Configuration.php'
1613

1714
# Test dependencies
1815
- 'tests/Application/app/**.php'
1916
- 'tests/Application/src/**.php'
20-
2117
# BC compatibility
2218
- 'src/Converter/OrderItemUnitLineItemsConverter.php'
2319
- 'src/Converter/RequestToOrderItemUnitRefundConverter.php'
2420
- 'src/Converter/RequestToShipmentRefundConverter.php'
2521
- 'src/Converter/ShipmentLineItemsConverter.php'
22+
- 'src/Provider/RemainingTotalProvider.php'
2623

2724
ignoreErrors:
28-
- '/Method Sylius\\RefundPlugin\\Entity\\CustomerBillingData::id\(\) has no return type specified./'
25+
- '/Call to an undefined method [a-zA-Z\\]+::createQueryBuilder\(\)./'
26+
- '/Method Sylius\\RefundPlugin\\[a-zA-Z\\]+::getFlashBag\(\) should return Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface but returns Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface\./'
2927
- '/Method Sylius\\RefundPlugin\\Entity\\CustomerBillingData::getId\(\) has no return type specified./'
28+
- '/Method Sylius\\RefundPlugin\\Entity\\CustomerBillingData::id\(\) has no return type specified./'
3029
- '/Method Sylius\\RefundPlugin\\Entity\\CustomerBillingData::setId\(\) has parameter \$id with no type specified./'
3130
- '/Method Sylius\\RefundPlugin\\Entity\\CustomerBillingDataInterface::id\(\) has no return type specified./'
3231
- '/Method Sylius\\RefundPlugin\\Entity\\CustomerBillingDataInterface::setId\(\) has parameter \$id with no type specified./'
33-
- '/Method Sylius\\RefundPlugin\\[a-zA-Z\\]+::getFlashBag\(\) should return Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface but returns Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface\./'
34-
- '/Call to an undefined method [a-zA-Z\\]+::createQueryBuilder\(\)./'

src/Action/Admin/DownloadCreditMemoAction.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
final class DownloadCreditMemoAction
2222
{
2323
public function __construct(
24-
private CreditMemoFileResolverInterface $creditMemoFileResolver,
25-
private CreditMemoFileResponseBuilderInterface $creditMemoFileResponseBuilder,
26-
private bool $hasEnabledPdfFileGenerator,
24+
private readonly CreditMemoFileResolverInterface $creditMemoFileResolver,
25+
private readonly CreditMemoFileResponseBuilderInterface $creditMemoFileResponseBuilder,
26+
private readonly bool $hasEnabledPdfFileGenerator,
2727
) {
2828
}
2929

src/Action/Admin/OrderRefundsListAction.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828

2929
final class OrderRefundsListAction
3030
{
31+
/** @param OrderRepositoryInterface<OrderInterface> $orderRepository */
3132
public function __construct(
32-
private OrderRepositoryInterface $orderRepository,
33-
private OrderRefundingAvailabilityCheckerInterface $orderRefundsListAvailabilityChecker,
34-
private RefundPaymentMethodsProviderInterface $refundPaymentMethodsProvider,
35-
private Environment $twig,
36-
private SessionInterface | RequestStack $requestStackOrSession,
37-
private UrlGeneratorInterface $router,
33+
private readonly OrderRepositoryInterface $orderRepository,
34+
private readonly OrderRefundingAvailabilityCheckerInterface $orderRefundsListAvailabilityChecker,
35+
private readonly RefundPaymentMethodsProviderInterface $refundPaymentMethodsProvider,
36+
private readonly Environment $twig,
37+
private readonly SessionInterface | RequestStack $requestStackOrSession,
38+
private readonly UrlGeneratorInterface $router,
3839
) {
3940
if ($this->requestStackOrSession instanceof SessionInterface) {
4041
trigger_deprecation('sylius/refund-plugin', '1.3', sprintf('Passing an instance of %s as constructor argument for %s is deprecated as of Sylius Refund Plugin 1.3 and will be removed in 2.0. Pass an instance of %s instead.', SessionInterface::class, self::class, RequestStack::class));

src/Action/Admin/RefundUnitsAction.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333
final class RefundUnitsAction
3434
{
3535
public function __construct(
36-
private MessageBusInterface $commandBus,
37-
private SessionInterface|RequestStack $requestStackOrSession,
38-
private UrlGeneratorInterface $router,
39-
private RequestCommandCreatorInterface|RefundUnitsCommandCreatorInterface $commandCreator,
40-
private LoggerInterface $logger,
41-
private CsrfTokenManagerInterface $csrfTokenManager,
36+
private readonly MessageBusInterface $commandBus,
37+
private readonly SessionInterface|RequestStack $requestStackOrSession,
38+
private readonly UrlGeneratorInterface $router,
39+
private readonly RequestCommandCreatorInterface|RefundUnitsCommandCreatorInterface $commandCreator,
40+
private readonly LoggerInterface $logger,
41+
private readonly CsrfTokenManagerInterface $csrfTokenManager,
4242
) {
4343
if ($this->requestStackOrSession instanceof SessionInterface) {
4444
trigger_deprecation('sylius/refund-plugin', '1.3', sprintf('Passing an instance of %s as constructor argument for %s is deprecated as of Sylius Refund Plugin 1.3 and will be removed in 2.0. Pass an instance of %s instead.', SessionInterface::class, self::class, RequestStack::class));

src/Action/Admin/SendCreditMemoAction.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
final class SendCreditMemoAction
3030
{
3131
public function __construct(
32-
private MessageBusInterface $commandBus,
33-
private RepositoryInterface $creditMemoRepository,
34-
private SessionInterface | RequestStack $requestStackOrSession,
35-
private UrlGeneratorInterface $router,
32+
private readonly MessageBusInterface $commandBus,
33+
private readonly RepositoryInterface $creditMemoRepository,
34+
private readonly SessionInterface | RequestStack $requestStackOrSession,
35+
private readonly UrlGeneratorInterface $router,
3636
) {
3737
if ($this->requestStackOrSession instanceof SessionInterface) {
3838
trigger_deprecation('sylius/refund-plugin', '1.3', sprintf('Passing an instance of %s as constructor argument for %s is deprecated as of Sylius Refund Plugin 1.3 and will be removed in 2.0. Pass an instance of %s instead.', SessionInterface::class, self::class, RequestStack::class));

src/Action/CompleteRefundPaymentAction.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@
2828

2929
final class CompleteRefundPaymentAction
3030
{
31+
/**
32+
* @param ObjectRepository<RefundPaymentInterface> $refundPaymentRepository
33+
* @param OrderRepositoryInterface<OrderInterface> $orderRepository
34+
*/
3135
public function __construct(
32-
private SessionInterface | RequestStack $requestStackOrSession,
33-
private ObjectRepository $refundPaymentRepository,
34-
private OrderRepositoryInterface $orderRepository,
35-
private RefundPaymentCompletedStateApplierInterface $refundPaymentCompletedStateApplier,
36-
private RouterInterface $router,
36+
private readonly SessionInterface | RequestStack $requestStackOrSession,
37+
private readonly ObjectRepository $refundPaymentRepository,
38+
private readonly OrderRepositoryInterface $orderRepository,
39+
private readonly RefundPaymentCompletedStateApplierInterface $refundPaymentCompletedStateApplier,
40+
private readonly RouterInterface $router,
3741
) {
3842
if ($this->requestStackOrSession instanceof SessionInterface) {
3943
trigger_deprecation('sylius/refund-plugin', '1.3', sprintf('Passing an instance of %s as constructor argument for %s is deprecated as of Sylius Refund Plugin 1.3 and will be removed in 2.0. Pass an instance of %s instead.', SessionInterface::class, self::class, RequestStack::class));

0 commit comments

Comments
 (0)