Skip to content

Commit dc86c89

Browse files
authored
Merge pull request #40 from BitBagCommerce/add_support_for_sylius_1_11
add sylius 1.11 support
2 parents 91092b4 + 2e08bc6 commit dc86c89

36 files changed

Lines changed: 632 additions & 48 deletions

.github/workflows/build.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ jobs:
2222
matrix:
2323
php: [ 7.4, 8.0 ]
2424
symfony: [ ^4.4, ^5.2 ]
25-
sylius: [ ^1.9, ~1.10 ]
26-
node: [ 10.x ]
27-
mysql: [ 5.7 ]
28-
25+
sylius: [ ~1.9, ~1.10, ~1.11 ]
26+
node: [ 14.x ]
27+
mysql: [ 8.0 ]
28+
29+
exclude:
30+
- sylius: ~1.9
31+
php: 8.0
32+
- sylius: ~1.10
33+
symfony: 4.4
34+
- sylius: ~1.11
35+
php: 7.4
2936
env:
3037
APP_ENV: test
3138
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
@@ -65,7 +72,7 @@ jobs:
6572
- name: Runs Elasticsearch
6673
uses: elastic/elastic-github-actions/elasticsearch@master
6774
with:
68-
stack-version: 6.8.15
75+
stack-version: 7.16.3
6976

7077
- name: Output PHP version for Symfony CLI
7178
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version
@@ -102,7 +109,7 @@ jobs:
102109
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction
103110

104111
- name: Install PHP dependencies
105-
run: composer install --no-interaction
112+
run: composer install --no-interaction --no-scripts
106113

107114
- name: Get Yarn cache directory
108115
id: yarn-cache

composer.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
],
1616
"require": {
1717
"php": "^7.4 || ^8.0",
18-
"sylius/sylius": "^1.9 || ^1.10",
18+
"sylius/sylius": "~1.9.0 || ~1.10.0 || ~1.11.0",
1919
"openpayu/openpayu": "^2.2"
2020
},
2121
"require-dev": {
@@ -32,23 +32,19 @@
3232
"friends-of-behat/symfony-extension": "^2.1",
3333
"friends-of-behat/variadic-extension": "^1.3",
3434
"phpspec/phpspec": "^7.0",
35-
"phpstan/extension-installer": "^1.0",
36-
"phpstan/phpstan": "0.12.90",
37-
"phpstan/phpstan-doctrine": "0.12.39",
38-
"phpstan/phpstan-strict-rules": "^0.12.0",
39-
"phpstan/phpstan-webmozart-assert": "0.12.9",
4035
"sensiolabs/security-checker": "^6.0",
4136
"phpunit/phpunit": "^9.5",
42-
"sylius-labs/coding-standard": "^3.1",
37+
"sylius-labs/coding-standard": "~4.1.0",
4338
"symfony/browser-kit": "^4.4 || ^5.2",
4439
"symfony/debug-bundle": "^4.4 || ^5.2",
4540
"symfony/dotenv": "^4.4 || ^5.2",
4641
"symfony/intl": "^4.4 || ^5.2",
4742
"symfony/web-profiler-bundle": "^4.4 || ^5.2",
4843
"symfony/web-server-bundle": "^4.4|^5.2",
49-
"vimeo/psalm": "4.4.1",
50-
"slevomat/coding-standard": "~6.0",
51-
"symfony/dependency-injection": "<4.4.19 || >=5.0.0 <5.2.2"
44+
"vimeo/psalm": "4.16.1",
45+
"symfony/dependency-injection": "<4.4.19 || ^5.2",
46+
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
47+
"bitbag/coding-standard": "^2.0"
5248
},
5349
"conflict": {
5450
"symfony/symfony": "4.1.8",

easy-coding-standard.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

ecs.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
/*
4+
* This file was created by developers working at BitBag
5+
* Do you need more information about us and what we do? Visit our https://bitbag.io website!
6+
* 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
7+
*/
8+
9+
declare(strict_types=1);
10+
11+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
12+
use Symplify\EasyCodingStandard\ValueObject\Option;
13+
14+
return static function (ContainerConfigurator $containerConfigurator): void {
15+
$containerConfigurator->import('vendor/bitbag/coding-standard/ecs.php');
16+
17+
$parameters = $containerConfigurator->parameters();
18+
$parameters->set(Option::PATHS, [
19+
__DIR__ . '/src',
20+
__DIR__ . '/tests',
21+
]);
22+
};

tests/Application/.env

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,23 @@ APP_SECRET=EDITME
1515
DATABASE_URL=mysql://root@127.0.0.1/sylius_%kernel.environment%?serverVersion=5.5
1616
###< doctrine/doctrine-bundle ###
1717

18+
###> lexik/jwt-authentication-bundle ###
19+
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
20+
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
21+
JWT_PASSPHRASE=acme_plugin_development
22+
###< lexik/jwt-authentication-bundle ###
23+
1824
###> symfony/swiftmailer-bundle ###
1925
# For Gmail as a transport, use: "gmail://username:password@localhost"
2026
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
2127
# Delivery is disabled by default via "null://localhost"
2228
MAILER_URL=smtp://localhost
2329
###< symfony/swiftmailer-bundle ###
30+
31+
###> symfony/messenger ###
32+
# Choose one of the transports below
33+
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
34+
# MESSENGER_TRANSPORT_DSN=doctrine://default
35+
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
36+
MESSENGER_TRANSPORT_DSN=sync://
37+
###< symfony/messenger ###

tests/Application/Kernel.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
/*
4+
* This file was created by developers working at BitBag
5+
* Do you need more information about us and what we do? Visit our https://bitbag.io website!
6+
* 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
7+
*/
8+
39
declare(strict_types=1);
410

511
namespace Tests\BitBag\SyliusPayUPlugin\Application;
@@ -67,7 +73,7 @@ protected function configureRoutes(RouteCollectionBuilder $routes): void
6773

6874
protected function getContainerBaseClass(): string
6975
{
70-
if ($this->isTestEnvironment()) {
76+
if ($this->isTestEnvironment() && class_exists(MockerContainer::class)) {
7177
return MockerContainer::class;
7278
}
7379

tests/Application/config/api_platform/.gitkeep

Whitespace-only changes.

tests/Application/config/bootstrap.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
/*
4+
* This file was created by developers working at BitBag
5+
* Do you need more information about us and what we do? Visit our https://bitbag.io website!
6+
* 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
7+
*/
8+
39
declare(strict_types=1);
410

511
use Symfony\Component\Dotenv\Dotenv;

tests/Application/config/bundles.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<?php
22

3+
/*
4+
* This file was created by developers working at BitBag
5+
* Do you need more information about us and what we do? Visit our https://bitbag.io website!
6+
* 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
7+
*/
8+
9+
declare(strict_types=1);
10+
311
return [
412
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
513
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
@@ -54,5 +62,5 @@
5462
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
5563
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
5664
SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true],
57-
BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true]
65+
BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true],
5866
];
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/*
4+
* This file was created by developers working at BitBag
5+
* Do you need more information about us and what we do? Visit our https://bitbag.io website!
6+
* 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
7+
*/
8+
9+
declare(strict_types=1);
10+
11+
return [
12+
SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
13+
];

0 commit comments

Comments
 (0)