Skip to content

Commit

Permalink
Merge pull request #52 from tomkalon/feature/OP-364_Upgrade_to_Sylius…
Browse files Browse the repository at this point in the history
…_1.13

Feature/op 364 upgrade to sylius 1.13
  • Loading branch information
senghe authored Jul 22, 2024
2 parents 1f168f3 + 38088ca commit d875656
Show file tree
Hide file tree
Showing 29 changed files with 242 additions and 240 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,30 @@ on:

jobs:
tests:
runs-on: ubuntu-22.04

runs-on: ubuntu-latest
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"

strategy:
fail-fast: false
matrix:
php: [8.0]
php: [8.0, 8.1, 8.2, 8.3]
symfony: [^5.4, ^6.0]
sylius: [~1.11.0, ~1.12.0]
node: [14.19]
sylius: [~1.12.0, ~1.13.0]
node: [18.x, 20.x]
mysql: [5.7, 8.0]

exclude:
-
sylius: ~1.11.0
symfony: ^6.0
- sylius: "~1.13.0"
php: "8.0"

env:
APP_ENV: test
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}"

steps:
-
uses: actions/checkout@v2
uses: actions/checkout@v3

-
name: Setup PHP
Expand All @@ -51,7 +50,7 @@ jobs:

-
name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: "${{ matrix.node }}"

Expand Down Expand Up @@ -135,7 +134,7 @@ jobs:
name: Prepare test application database
run: |
(cd tests/Application && bin/console doctrine:database:create -vvv)
(cd tests/Application && bin/console doctrine:schema:create -vvv)
(cd tests/Application && bin/console doctrine:schema:create -vvv)
-
name: Prepare test application assets
Expand All @@ -161,7 +160,7 @@ jobs:

-
name: Run PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon -l max src/
run: vendor/bin/phpstan analyse -c phpstan.neon -l 8 src/

# TODO: Temporary disabled!
# -
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"require": {
"php": "^8.0",
"doctrine/dbal": "^2.7 || ^3.0",
"sylius/sylius": "~1.11.0 || ~1.12.0"
"sylius/sylius": "~1.12.0 || ~1.13.0"
},
"require-dev": {
"behat/behat": "^3.6.1",
"behat/behat": "^3.7",
"behat/mink-selenium2-driver": "~1.6.0",
"symfony/webpack-encore-bundle": "^1.15",
"bitbag/coding-standard": "^1.0.1 || ^2.0.0",
"behat/mink-selenium2-driver": "^1.4",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"friends-of-behat/mink": "^1.8",
Expand All @@ -25,10 +25,10 @@
"friends-of-behat/variadic-extension": "^1.3",
"phpspec/phpspec": "^7.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "0.12.85 || ^1.4",
"phpstan/phpstan-doctrine": "0.12.33",
"phpstan/phpstan-strict-rules": "^0.12.0 || ^1.0",
"phpstan/phpstan-webmozart-assert": "0.12.12 || ^1.0",
"phpstan/phpstan": "^1.8.1",
"phpstan/phpstan-doctrine": "1.3.69",
"phpstan/phpstan-strict-rules": "^1.3.0",
"phpstan/phpstan-webmozart-assert": "^1.2.0",
"phpunit/phpunit": "^9.5",
"sylius-labs/coding-standard": "^4.0",
"symfony/browser-kit": "^5.4 || ^6.0",
Expand All @@ -40,7 +40,7 @@
"polishsymfonycommunity/symfony-mocker-container": "^1.0"
},
"conflict": {
"behat/mink-selenium2-driver": ">=1.7.0"
"doctrine/persistence": "<3.0"
},
"config": {
"sort-packages": true,
Expand Down
2 changes: 1 addition & 1 deletion features/exporting_shipping_data_to_api.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: Managing shipping gateway
And there is a registered "frank_martin_shipping_gateway" shipping gateway for this shipping method named "Transporter Gateway"
And it has "IBAN" field set to "GB29 RBOS 6016 1331 9268 19"
And it has "Address" field set to "Nick King, Main Square 27, Opole 45015, Poland"
And the store has a product "Chicken" priced at "$2" in "Web-US" channel
And the store has a product "Chicken" priced at "$2.00" in "Web-US" channel
And customer "[email protected]" has placed 5 orders on the "Web-US" channel in each buying 5 "Chicken" products
And those orders were placed with "Frank Martin Parcels" shipping method

Expand Down
2 changes: 1 addition & 1 deletion features/placing_an_order_for_shipping_gateway.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: Preparing shipping export after processing order with shipping gateway

Background:
Given the store operates on a single channel in "United States"
And the store has a product "Ferrari Testarossa" priced at "$250000.00"
And the store has a product "Ferrari Testarossa" priced at "$250,000.00"
And the store has "Frank Martin Parcels" shipping method with "$10.00" fee
And there is a registered "frank_martin_shipping_gateway" shipping gateway for this shipping method named "Transporter Gateway"
And the store allows paying "Cash on Delivery"
Expand Down
14 changes: 7 additions & 7 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
parameters:
reportUnmatchedIgnoredErrors: false
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
level: 8

excludes_analyse:
paths:
- src

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

Expand All @@ -12,6 +13,5 @@ parameters:
- 'tests/Application/src/**.php'

ignoreErrors:
- '/Parameter #1 \$configuration of method Symfony\\Component\\DependencyInjection\\Extension\\Extension::processConfiguration\(\) expects Symfony\\Component\\Config\\Definition\\ConfigurationInterface, Symfony\\Component\\Config\\Definition\\ConfigurationInterface\|null given\./'
- '/Cannot call method [a-z]+Node\(\) on Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface\|null\./'

- identifier: missingType.iterableValue
- identifier: missingType.generics
1 change: 0 additions & 1 deletion src/Repository/ShippingGatewayRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

use BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface;
use Doctrine\ORM\QueryBuilder;
use Doctrine\Persistence\ObjectRepository;
use Sylius\Component\Resource\Model\ResourceInterface;
use Sylius\Component\Resource\Repository\RepositoryInterface;
use Sylius\Component\Shipping\Model\ShippingMethodInterface;
Expand Down
2 changes: 0 additions & 2 deletions tests/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
use Symfony\Component\Routing\RouteCollectionBuilder;

final class Kernel extends BaseKernel
{
Expand Down Expand Up @@ -104,7 +103,6 @@ private function registerBundlesFromFile(string $bundlesFile): iterable
foreach ($contents as $class => $envs) {
if (isset($envs['all']) || isset($envs[$this->environment])) {
yield new $class();

}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Dotenv\Dotenv;

require dirname(__DIR__).'../../../vendor/autoload.php';
require dirname(__DIR__) . '../../../vendor/autoload.php';

// Load cached env vars if the .env.local.php file exists
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
Expand Down
4 changes: 3 additions & 1 deletion tests/Application/config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career
*/

declare(strict_types=1);

return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Expand Down Expand Up @@ -59,5 +61,5 @@
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true],
SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all'=> true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
];

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

148 changes: 0 additions & 148 deletions tests/Application/config/sylius/1.11/packages/security.yaml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit d875656

Please sign in to comment.