Skip to content

Commit

Permalink
Merge pull request #332 from GSadee/SYL-4117-adjust-twig-hooks
Browse files Browse the repository at this point in the history
Bump to stable Sylius 2.0 + minor clean up
  • Loading branch information
Rafikooo authored Nov 18, 2024
2 parents b8fc7e5 + 7d10e15 commit 38d02c2
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 262 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/build.yml → .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,21 @@ jobs:
matrix:
php: ["8.2", "8.3"]
symfony: ["^6.4", "^7.1"]
sylius: ["2.0.x-dev"]
sylius: ["~2.0.0"]
node: ["20.x"]
mysql: ["8.4"]
wkhtmltopdf: ["0.12.6-1", false]
state_machine_adapter: [ "symfony_workflow" ]
state_machine_adapter: ["symfony_workflow"]

include:
-
php: "8.3"
symfony: "^7.1"
sylius: "2.0.x-dev"
sylius: "~2.0.0"
node: "20.x"
mysql: "8.4"
wkhtmltopdf: "0.12.6-1"
state_machine_adapter: "winzou_state_machine"
-
php: "8.3"
symfony: "^7.1"
sylius: "2.0.x-dev"
node: "20.x"
mysql: "8.4"
wkhtmltopdf: false
state_machine_adapter: "winzou_state_machine"

env:
APP_ENV: test
Expand Down
180 changes: 0 additions & 180 deletions CHANGELOG.md

This file was deleted.

4 changes: 2 additions & 2 deletions UPGRADE-2.0.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
### UPGRADE FROM 1.X TO 2.0
# UPGRADE FROM 1.X TO 2.0

1. Support for Sylius 2.0 has been added, it is now the recommended Sylius version to use with InvoicingPlugin.

1. Support for Sylius 1.X has been dropped, upgrade your application to [Sylius 2.0](https://github.com/Sylius/Sylius/blob/2.0/UPGRADE-2.0.md).

1. Support for PHP has been increased to 8.2
1. The minimum supported version of PHP has been increased to 8.2.

1. The `sylius_invoicing_plugin_admin_order_invoices_partial` and `sylius_invoicing_plugin_shop_order_invoices_partial` partials
have been replaced by `Sylius\InvoicingPlugin\Twig\Component\Invoice\ListComponent` twig component.
43 changes: 21 additions & 22 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"license": "MIT",
"require": {
"php": "^8.2",
"knplabs/knp-snappy-bundle": "^1.8",
"ramsey/uuid": "^3.9 || ^4.0",
"sylius/grid-bundle": "^1.9",
"sylius/resource-bundle": "^1.9",
"sylius/sylius": "2.0.x-dev",
"knplabs/knp-snappy-bundle": "^1.10",
"ramsey/uuid": "^4.7",
"sylius/grid-bundle": "^1.13",
"sylius/resource-bundle": "^1.12",
"sylius/sylius": "~2.0.0",
"sylius/twig-hooks": "^0.5",
"symfony/clock": "^6.4 || ^7.1",
"symfony/config": "^6.4 || ^7.1",
Expand All @@ -25,34 +25,33 @@
"symfony/routing": "^6.4 || ^7.1"
},
"require-dev": {
"behat/behat": "^3.6.1",
"behat/behat": "^3.14",
"dmore/behat-chrome-extension": "^1.4",
"dmore/chrome-mink-driver": "^2.9",
"friends-of-behat/exclude-specifications-extension": "^0.2 || ^0.3",
"friends-of-behat/mink": "^1.8",
"friends-of-behat/mink-browserkit-driver": "^1.4",
"friends-of-behat/mink-debug-extension": "^2.0",
"friends-of-behat/mink-extension": "^2.4",
"friends-of-behat/mink": "^1.11",
"friends-of-behat/mink-browserkit-driver": "^1.6",
"friends-of-behat/mink-debug-extension": "^2.1",
"friends-of-behat/mink-extension": "^2.7",
"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",
"friends-of-behat/suite-settings-extension": "^1.1",
"friends-of-behat/symfony-extension": "^2.6",
"friends-of-behat/variadic-extension": "^1.6",
"matthiasnoback/symfony-config-test": "^5.1",
"matthiasnoback/symfony-dependency-injection-test": "^5.0",
"phpspec/phpspec": "^7.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-doctrine": "^1.3",
"phpstan/phpstan-symfony": "^1.2",
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
"phpspec/phpspec": "^7.5",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-doctrine": "^1.5",
"phpstan/phpstan-symfony": "^1.4",
"phpstan/phpstan-webmozart-assert": "^1.2",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"sylius-labs/coding-standard": "^4.2",
"sylius-labs/coding-standard": "^4.4",
"symfony/browser-kit": "^6.4 || ^7.1",
"symfony/debug-bundle": "^6.4 || ^7.1",
"symfony/dotenv": "^6.4 || ^7.1",
"symfony/intl": "^6.4 || ^7.1",
"symfony/webpack-encore-bundle": "^2.1",
"symfony/webpack-encore-bundle": "^2.2",
"symfony/web-profiler-bundle": "^6.4 || ^7.1"
},
"autoload": {
Expand Down
31 changes: 0 additions & 31 deletions src/DependencyInjection/Compiler/SymfonyClockCompilerPass.php

This file was deleted.

14 changes: 7 additions & 7 deletions src/Resources/config/app/twig_hooks/shop/order/summary.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
sylius_twig_hooks:
hooks:
'sylius_shop.account.order.show.content.summary':
'sylius_shop.account.order.show.content.main.summary':
invoices:
component: 'sylius_invoicing:invoice:list'
props:
order: '@=_context.order'
priority: 350

'sylius_shop.account.order.show.content.summary.invoices':
'sylius_shop.account.order.show.content.main.summary.invoices':
card:
template: '@SyliusInvoicingPlugin/shop/order/show/content/summary/invoices/card.html.twig'
priority: 0

'sylius_shop.account.order.show.content.summary.invoices.card':
'sylius_shop.account.order.show.content.main.summary.invoices.card':
head:
template: '@SyliusInvoicingPlugin/shop/order/show/content/summary/invoices/card/head.html.twig'
priority: 100
body:
template: '@SyliusInvoicingPlugin/shop/order/show/content/summary/invoices/card/body.html.twig'
priority: 0

'sylius_shop.account.order.show.content.summary.invoices.card.body':
'sylius_shop.account.order.show.content.main.summary.invoices.card.body':
table:
template: '@SyliusInvoicingPlugin/shop/order/show/content/summary/invoices/card/body/table.html.twig'
priority: 0

'sylius_shop.account.order.show.content.summary.invoices.card.body.table':
'sylius_shop.account.order.show.content.main.summary.invoices.card.body.table':
head:
template: '@SyliusInvoicingPlugin/shop/order/show/content/summary/invoices/card/body/table/head.html.twig'
priority: 100
body:
template: '@SyliusInvoicingPlugin/shop/order/show/content/summary/invoices/card/body/table/body.html.twig'
priority: 0

'sylius_shop.account.order.show.content.summary.invoices.card.body.table.head':
'sylius_shop.account.order.show.content.main.summary.invoices.card.body.table.head':
number:
template: '@SyliusInvoicingPlugin/shop/order/show/content/summary/invoices/card/body/table/head/number.html.twig'
priority: 200
Expand All @@ -44,7 +44,7 @@ sylius_twig_hooks:
template: '@SyliusInvoicingPlugin/shop/order/show/content/summary/invoices/card/body/table/head/actions.html.twig'
priority: 0

'sylius_shop.account.order.show.content.summary.invoices.card.body.table.body':
'sylius_shop.account.order.show.content.main.summary.invoices.card.body.table.body':
number:
template: '@SyliusInvoicingPlugin/shop/order/show/content/summary/invoices/card/body/table/body/number.html.twig'
priority: 200
Expand Down
9 changes: 0 additions & 9 deletions src/SyliusInvoicingPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,10 @@
namespace Sylius\InvoicingPlugin;

use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait;
use Sylius\InvoicingPlugin\DependencyInjection\Compiler\SymfonyClockCompilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

/** @internal */
final class SyliusInvoicingPlugin extends Bundle
{
use SyliusPluginTrait;

public function build(ContainerBuilder $container): void
{
parent::build($container);

$container->addCompilerPass(new SymfonyClockCompilerPass());
}
}

0 comments on commit 38d02c2

Please sign in to comment.