Skip to content

Commit

Permalink
Revert "Upgraded to sylius 1.12"
Browse files Browse the repository at this point in the history
This reverts commit 25a2498.
  • Loading branch information
Rafal Malenta committed Mar 24, 2023
1 parent 25a2498 commit 2967bcf
Show file tree
Hide file tree
Showing 37 changed files with 59 additions and 269 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,21 @@ on:

jobs:
tests:
runs-on: ubuntu-22.04
runs-on: ubuntu-18.04

name: "PHP ${{ matrix.php }}, MySQL ${{ matrix.mysql }}, Sylius ${{ matrix.sylius }}"

strategy:
fail-fast: false
matrix:
php: [ "8.0" ]
symfony: [ "^5.4", "^6.0" ]
sylius: [ "~1.11.0", "~1.12.0" ]
node: [ "^14.17.x" ]
mysql: [ "8.0" ]
php: [7.4, 8.0]
node: [14.18]
mysql: [5.7, 8.0]
sylius: ["~1.10.0", "~1.11.0"]

exclude:
- sylius: ~1.11.0
symfony: "^6.0"
- sylius: "~1.11.0"
php: 7.4

env:
APP_ENV: test
Expand Down
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@
],
"license": "MIT",
"require": {
"php": "^8.0",
"php": "^7.4 || ^8.0",
"adyen/php-api-library": "^11.0",
"composer/package-versions-deprecated": "^1.11",
"nyholm/psr7": "^1.4",
"sylius-labs/doctrine-migrations-extra-bundle": "^0.1.4",
"sylius/refund-plugin": "~1.0.0 || ^1.1",

"sylius/sylius": "~1.11.0 || ~1.12.0",
"symfony/messenger": "^5.4 || ^6.0",
"symfony/serializer": "^5.4 || ^6.0",
"symfony/webpack-encore-bundle": "^1.14"
"sylius/resource-bundle": "^1.8",
"sylius/sylius": "^1.10.0 || ^1.11.0",
"symfony/messenger": "^4.4 || ^5.0",
"symfony/serializer": "^4.4 || ^5.0"
},
"require-dev": {
"behat/behat": "^3.6.1",
Expand All @@ -45,11 +44,12 @@
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"psalm/plugin-symfony": "^2.3",
"sensiolabs/security-checker": "^6.0",
"symfony/browser-kit": "^5.4 || 6.0",
"symfony/debug-bundle": "^5.4 || ^6.0",
"symfony/dotenv": "^5.4 || ^6.0",
"symfony/intl": "^5.4 || ^6.0",
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
"symfony/browser-kit": "^4.4",
"symfony/debug-bundle": "^4.4 || ^5.0",
"symfony/dotenv": "^4.4 || ^5.0",
"symfony/intl": "^4.4 || ^5.0",
"symfony/web-profiler-bundle": "^4.4 || ^5.0",
"symfony/web-server-bundle": "^4.4 || ^5.0",
"symplify/easy-coding-standard": "^9.3, !=9.3.27",
"vimeo/psalm": "^4.4.1"
},
Expand Down
4 changes: 2 additions & 2 deletions src/Bus/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ final class Dispatcher implements DispatcherInterface
{
use HandleTrait;

// /** @var MessageBusInterface */
// private $messageBus;
/** @var MessageBusInterface */
private $messageBus;

/** @var PaymentCommandFactoryInterface */
private $commandFactory;
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/BitBagSyliusAdyenExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getConfiguration(array $config, ContainerBuilder $container): Co
return new Configuration();
}

public function getAlias(): string
public function getAlias()
{
return 'bitbag_sylius_adyen';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public function denormalize(
}

public function supportsDenormalization(
mixed $data,
?string $type,
$data,
string $type,
string $format = null
): bool {
return
Expand Down Expand Up @@ -94,10 +94,10 @@ public function normalize(
* @param mixed $data
*/
public function supportsNormalization(
mixed $data,
?string $format = null,
$data,
string $format = null,
array $context = []
): bool {
) {
return
$data instanceof NotificationItemData
&& !isset($context[$this->getNormalizationMarking($data)])
Expand Down
2 changes: 0 additions & 2 deletions src/Resources/assets/admin/entry.js

This file was deleted.

Empty file.
2 changes: 0 additions & 2 deletions src/Resources/assets/shop/entry.js

This file was deleted.

Empty file.
Empty file.
19 changes: 6 additions & 13 deletions tests/Application/Kernel.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<?php

/*
* This file was created by developers working at BitBag
* Do you need more information about us and what we do? Visit our https://bitbag.io website!
* 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);

namespace Tests\BitBag\SyliusAdyenPlugin\Application;
Expand All @@ -18,7 +12,6 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
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 @@ -65,7 +58,7 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
}
}

protected function configureRoutes(RoutingConfigurator $routes): void
protected function configureRoutes(RouteCollectionBuilder $routes): void
{
foreach ($this->getConfigurationDirectories() as $confDir) {
$this->loadRoutesConfiguration($routes, $confDir);
Expand All @@ -74,7 +67,7 @@ protected function configureRoutes(RoutingConfigurator $routes): void

protected function getContainerBaseClass(): string
{
if ($this->isTestEnvironment() && class_exists(MockerContainer::class)) {
if ($this->isTestEnvironment()) {
return MockerContainer::class;
}

Expand All @@ -94,11 +87,11 @@ private function loadContainerConfiguration(LoaderInterface $loader, string $con
$loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob');
}

private function loadRoutesConfiguration(RoutingConfigurator $routes, string $confDir): void
private function loadRoutesConfiguration(RouteCollectionBuilder $routes, string $confDir): void
{
$routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS);
$routes->import($confDir . '/{routes}/' . $this->environment . '/**/*' . self::CONFIG_EXTS);
$routes->import($confDir . '/{routes}' . self::CONFIG_EXTS);
$routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS, '/', 'glob');
$routes->import($confDir . '/{routes}/' . $this->environment . '/**/*' . self::CONFIG_EXTS, '/', 'glob');
$routes->import($confDir . '/{routes}' . self::CONFIG_EXTS, '/', 'glob');
}

/**
Expand Down
1 change: 0 additions & 1 deletion tests/Application/assets/admin/entry.js

This file was deleted.

1 change: 0 additions & 1 deletion tests/Application/assets/shop/entry.js

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Application/config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
} else {
// load all the .env files
(new Dotenv())->loadEnv(dirname(__DIR__) . '/.env');
(new Dotenv(true))->loadEnv(dirname(__DIR__) . '/.env');
}

$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev';
Expand Down
2 changes: 2 additions & 0 deletions tests/Application/config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Sylius\Bundle\OrderBundle\SyliusOrderBundle::class => ['all' => true],
Expand Down Expand Up @@ -44,6 +45,7 @@
Sylius\Bundle\FixturesBundle\SyliusFixturesBundle::class => ['all' => true],
Sylius\Bundle\PayumBundle\SyliusPayumBundle::class => ['all' => true],
Sylius\Bundle\ThemeBundle\SyliusThemeBundle::class => ['all' => true],
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['all' => true],
Sylius\Bundle\AdminBundle\SyliusAdminBundle::class => ['all' => true],
Sylius\Bundle\ShopBundle\SyliusShopBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/config/packages/test/security.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
security:
password_hashers:
encoders:
sha512: sha512
7 changes: 0 additions & 7 deletions tests/Application/config/packages/webpack_encore.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions tests/Application/config/sylius/1.10/packages/_sylius.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sylius_api:
enabled: true
2 changes: 0 additions & 2 deletions tests/Application/config/sylius/1.11/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

return [
Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true]
];
9 changes: 0 additions & 9 deletions tests/Application/config/sylius/1.12/bundles.php

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions tests/Application/config/sylius/1.12/packages/mailer.yaml

This file was deleted.

122 changes: 0 additions & 122 deletions tests/Application/config/sylius/1.12/packages/security.yaml

This file was deleted.

This file was deleted.

File renamed without changes.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2967bcf

Please sign in to comment.