Skip to content

Commit

Permalink
Merge branch '1.6' into 2.0
Browse files Browse the repository at this point in the history
* 1.6: (35 commits)
  Add conflict to behat/mink-selenium2-driver to fix the builds
  Update PR template
  Update supported branches in README file
  Generate changelog for v1.5.0
  Bump Sylius 1.13 to stable v1.13.0 version
  Update README.md
  [Maintenance] Update builds
  [Maintenance] Slight fixes of 1.13 support
  Sylius 1.13 - Fix duplicated configuration key
  Sylius 1.13 - Add missing info about symfony workflow in readme
  Sylius 1.13 - Add info about state machine adapter in gh actions
  Sylius 1.13 - fix behats scenarios
  Sylius 1.13 - unlock sylius 13 version in gh actions
  Sylius 1.13 - try to fix problem with not existing service
  Sylius 1.13 - fix composer.json problem
  Sylius 1.13 - adapt state machine configuration per version
  Sylius 1.13 - add mailer configuration in the global config of test app
  Sylius 1.13 - add mailer configuration to the 1.13 version
  Sylius 1.13 - add workflow configuration only in 1.13, add workflow to the gh actions
  Sylius 1.13 - Update bundles.php in test application
  ...
  • Loading branch information
GSadee committed Apr 26, 2024
2 parents 505b305 + e3c7b23 commit 87775c9
Show file tree
Hide file tree
Showing 322 changed files with 897 additions and 499 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| Q | A
| --------------- | -----
| Branch? | 1.3 (security fixes), 1.4 (bug fixes, improvements), 1.5 (new features)
| Branch? | 1.4 (security fixes), 1.5 (bug fixes, improvements), 1.6 (new features)
| Bug fix? | no/yes
| New feature? | no/yes
| Related tickets | fixes #X, partially #Y, mentioned in #Z
43 changes: 28 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,54 @@ 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.4", "~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.0",]
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.0"
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.1"
symfony: "^5.4"
sylius: "~1.11.2"
node: "14.x"
php: "8.2"
symfony: "^6.4"
sylius: "~1.13.0"
node: "20.x"
mysql: "8.0"
wkhtmltopdf: false
state_machine_adapter: "symfony_workflow"

exclude:
- symfony: "^6.0"
sylius: "~1.11.4"
-
sylius: "~1.12.0"
state_machine_adapter: "symfony_workflow"

env:
APP_ENV: test
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
TEST_SYLIUS_STATE_MACHINE_ADAPTER: "${{ matrix.state_machine_adapter }}"

steps:
-
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG-1.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# CHANGELOG

### v1.5.0 (2024-04-26)

- [#413](https://github.com/Sylius/RefundPlugin/issues/413) Adjust supported versions in README file ([@GSadee](https://github.com/GSadee))
- [#414](https://github.com/Sylius/RefundPlugin/issues/414) [RefundUnitsConverter] Change interface method signature ([@Rafikooo](https://github.com/Rafikooo))
- [#419](https://github.com/Sylius/RefundPlugin/issues/419) [Maintenance][CI] Disable php 8.0 with symfony 6 pipes ([@NoResponseMate](https://github.com/NoResponseMate))
- [#420](https://github.com/Sylius/RefundPlugin/issues/420) [Maintenance] Add missing deprecations to CreditMemoEmailSender ([@NoResponseMate](https://github.com/NoResponseMate))
- [#421](https://github.com/Sylius/RefundPlugin/issues/421) [Maintenance] Update License ([@NoResponseMate](https://github.com/NoResponseMate))
- [#423](https://github.com/Sylius/RefundPlugin/issues/423) Add missing factory for line items ([@NoResponseMate](https://github.com/NoResponseMate))
- [#424](https://github.com/Sylius/RefundPlugin/issues/424) Update plugin to sylius 1.13. ([@BartoszWojdalowicz](https://github.com/BartoszWojdalowicz))
- [#427](https://github.com/Sylius/RefundPlugin/issues/427) Bump Sylius 1.13 to stable v1.13.0 version ([@GSadee](https://github.com/GSadee))
9 changes: 9 additions & 0 deletions CONFLICTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# CONFLICTS

This document explains why certain conflicts were added to `composer.json` and
references related issues.

- `behat/mink-selenium2-driver:>=1.7.0`:

This version adds strict type to the `Behat\Mink\Driver\Selenium2Driver::visit($url)` method
which causes a fatal error because the method signature is no longer compatible with the parent class.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011-2018 Paweł Jędrzejewski
Copyright (c) 2018-present Sylius Sp. z o.o.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<p align="center">
<a href="https://sylius.com" target="_blank">
<img src="https://demo.sylius.com/assets/shop/img/logo.png" />
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://media.sylius.com/sylius-logo-800-dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://media.sylius.com/sylius-logo-800.png">
<img alt="Sylius Logo." src="https://media.sylius.com/sylius-logo-800.png">
</picture>
</a>
</p>

Expand Down Expand Up @@ -130,9 +134,9 @@ Tagged services would be executed according to their priority (descending).
## Supported branches
* `1.3` (v1.3.*) - security fixes
* `1.4` (v1.4.*) - bug fixes, improvements
* `1.5` (v1.5.*) - new features
* `1.4` (v1.4.*) - security fixes
* `1.5` (v1.5.*) - bug fixes, improvements
* `1.6` (v1.6.*) - new features
* `2.0` (v2.0.*) - new features, removing deprecations, BC breaks
## Security issues
Expand Down
25 changes: 25 additions & 0 deletions UPGRADE-1.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### UPGRADE FROM 1.4.X TO 1.5.0

1. Passing `$creditMemoPdfFileGenerator` and `$fileManager` to the constructor of
`Sylius\RefundPlugin\Sender\CreditMemoEmailSender` as the first and third
arguments respectively has been deprecated and will be prohibited in 2.0.

2. The `Sylius\RefundPlugin\File\FileManagerInterface` interface,
`Sylius\RefundPlugin\File\TemporaryFileManager` class and
service with id `Sylius\RefundPlugin\File\TemporaryFileManager`
have all been deprecated and will be removed in 2.0. There is no replacement.

3. A factory for the `Sylius\RefundPlugin\Entity\LineItem` has been added with service id `Sylius\RefundPlugin\Factory\LineItemFactoryInterface`.
It is recommended to use it instead of instantiating the `LineItem` directly.

4. Not passing an instance of `Sylius\RefundPlugin\Factory\LineItemFactoryInterface` to the
constructors of `Sylius\RefundPlugin\Converter\LineItem\OrderItemUnitLineItemsConverter` and
`Sylius\RefundPlugin\Converter\LineItem\ShipmentLineItemsConverter`
has been deprecated and will be prohibited in 2.0.

5. Support for Sylius 1.13 has been added, it is now the recommended Sylius version to use with RefundPlugin.

6. Support for Sylius 1.11 has been dropped, upgrade your application to [Sylius 1.12](https://github.com/Sylius/Sylius/blob/1.12/UPGRADE-1.12.md).
or to [Sylius 1.13](https://github.com/Sylius/Sylius/blob/1.13/UPGRADE-1.13.md).

7. Support for PHP 8.0 has been dropped.
40 changes: 21 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,46 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"knplabs/knp-snappy-bundle": "^1.7",
"myclabs/php-enum": "^1.7",
"php-http/message-factory": "^1.1",
"sylius/resource-bundle": "^1.6",
"sylius/sylius": "~1.11.4 || ~1.12.0",
"symfony/messenger": "^5.4 || ^6.0"
"sylius/resource-bundle": "^1.9",
"sylius/sylius": "~1.12.0 || ~1.13.0",
"symfony/messenger": "^5.4.21 || ^6.4"
},
"require-dev": {
"behat/behat": "^3.6",
"behat/behat": "^3.6.1",
"behat/mink-selenium2-driver": "^1.4",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"friends-of-behat/exclude-specifications-extension": "^0.2 || ^0.3",
"friends-of-behat/mink": "^1.8",
"friends-of-behat/mink-browserkit-driver": "^1.3",
"friends-of-behat/mink-browserkit-driver": "^1.4",
"friends-of-behat/mink-debug-extension": "^2.0",
"friends-of-behat/mink-extension": "^2.3",
"friends-of-behat/mink-extension": "^2.4",
"friends-of-behat/page-object-extension": "^0.3",
"friends-of-behat/suite-settings-extension": "^1.0",
"friends-of-behat/symfony-extension": "^2.1",
"friends-of-behat/variadic-extension": "^1.3",
"matthiasnoback/symfony-config-test": "^4.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"phpspec/phpspec": "^7.0",
"phpstan/phpstan": "1.5.4",
"phpstan/phpstan-webmozart-assert": "1.1.2",
"matthiasnoback/symfony-config-test": "^4.2",
"matthiasnoback/symfony-dependency-injection-test": "^4.2",
"phpspec/phpspec": "^7.2",
"phpstan/phpstan": "^1.6",
"phpstan/phpstan-webmozart-assert": "^1.1",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"sylius-labs/coding-standard": "~4.3.0",
"symfony/browser-kit": "^5.4 || ^6.0",
"symfony/debug-bundle": "^5.4 || ^6.0",
"symfony/dotenv": "^5.4 || ^6.0",
"sylius-labs/coding-standard": "^4.2",
"symfony/browser-kit": "^5.4.21 || ^6.4",
"symfony/debug-bundle": "^5.4.21 || ^6.4",
"symfony/dotenv": "^5.4.21 || ^6.4",
"symfony/intl": "^5.4 || ^6.0",
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
"symfony/web-profiler-bundle": "^5.4.21 || ^6.4",
"symfony/webpack-encore-bundle": "^1.15"
},
"conflict": {
"behat/mink-selenium2-driver": ">=1.7.0"
},
"autoload": {
"psr-4": {
"Sylius\\RefundPlugin\\": "src/",
Expand Down Expand Up @@ -92,6 +95,5 @@
"require": "^5.4 || ^6.0"
}
},
"prefer-stable": true,
"minimum-stability": "dev"
"prefer-stable": true
}
32 changes: 22 additions & 10 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,32 @@
{
$containerConfigurator->import('vendor/sylius-labs/coding-standard/ecs.php');

$containerConfigurator->services()->set(HeaderCommentFixer::class)->call('configure', [[
'location' => 'after_open',
'header' =>
'This file is part of the Sylius package.
(c) Paweł Jędrzejewski
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.',
]]);
$containerConfigurator->parallel();
$containerConfigurator->paths([
'src/',
'spec/',
]);

$containerConfigurator->skip([
VisibilityRequiredFixer::class => ['*Spec.php'],
InlineDocCommentDeclarationSniff::class . '.MissingVariable',
'src/Resources/config/**',
'**/var/*',
]);

$containerConfigurator->ruleWithConfiguration(
HeaderCommentFixer::class,
[
'location' => 'after_open',
'comment_type' => HeaderCommentFixer::HEADER_COMMENT,
'header' => <<<TEXT
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.
TEXT
]
);
};
2 changes: 1 addition & 1 deletion features/filtering_credit_memos.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: Filtering credit memos
And the store has a zone "United States + United Kingdom" with code "US + UK"
And this zone has the "United States" country member
And this zone has the "United Kingdom" country member
And the store has a product "Mr. Meeseeks T-Shirt" priced at "$10" available in channel "Web-US" and channel "Web-UK"
And the store has a product "Mr. Meeseeks T-Shirt" priced at "$10.00" available in channel "Web-US" and channel "Web-UK"
And the store ships everywhere for free for all channels
And the store allows paying offline for all channels
And there is a customer "rick.sanchez@wubba-lubba-dub-dub.com" that placed an order "#00000001"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Refunding a single order unit with promotion applied
And the store allows shipping with "Galaxy Post"
And the store allows paying with "Space money"
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 "rick.sanchez@wubba-lubba-dub-dub.com" that placed an order "#00000022"
And the customer bought 2 "Mr. Meeseeks T-Shirt" products
And the customer chose "Galaxy Post" shipping method to "United States" with "Space money" payment
Expand Down
5 changes: 4 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ includes:
parameters:
level: 8

paths:
- src

checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false

excludes_analyse:
excludePaths:
# Makes PHPStan crash
- 'src/DependencyInjection/Configuration.php'

Expand Down
2 changes: 1 addition & 1 deletion spec/Calculator/UnitRefundTotalCalculatorSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* (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.
Expand Down
2 changes: 1 addition & 1 deletion spec/Checker/CreditMemoCustomerRelationCheckerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* (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.
Expand Down
2 changes: 1 addition & 1 deletion spec/Checker/OrderFullyRefundedTotalCheckerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* (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.
Expand Down
2 changes: 1 addition & 1 deletion spec/Checker/OrderRefundingAvailabilityCheckerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* (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.
Expand Down
2 changes: 1 addition & 1 deletion spec/Checker/OrderRefundsListAvailabilityCheckerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* (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.
Expand Down
2 changes: 1 addition & 1 deletion spec/Checker/UnitRefundingAvailabilityCheckerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* (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.
Expand Down
2 changes: 1 addition & 1 deletion spec/Command/GenerateCreditMemoSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* (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.
Expand Down
2 changes: 1 addition & 1 deletion spec/Command/RefundUnitsSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* (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.
Expand Down
2 changes: 1 addition & 1 deletion spec/CommandHandler/GenerateCreditMemoHandlerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* (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.
Expand Down
2 changes: 1 addition & 1 deletion spec/CommandHandler/RefundUnitsHandlerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* (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.
Expand Down
Loading

0 comments on commit 87775c9

Please sign in to comment.