Skip to content

Commit

Permalink
Install and config OS plugins (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoResponseMate authored Jan 2, 2025
2 parents 4502d41 + 3c748e1 commit ed80808
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN=doctrine://defau
###> symfony/mailer ###
MAILER_DSN=null://null
###< symfony/mailer ###

###> knplabs/knp-snappy-bundle ###
WKHTMLTOPDF_PATH=/usr/local/bin/wkhtmltopdf
WKHTMLTOIMAGE_PATH=/usr/local/bin/wkhtmltoimage
###< knplabs/knp-snappy-bundle ###
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
symfony: ["^6.4"]
node: ["20.x"]
mysql: ["8.0"]
wkhtmltopdf: ["0.12.6.1-2"]

env:
APP_ENV: test
Expand Down Expand Up @@ -63,8 +64,8 @@ jobs:
name: Install wkthtmltopdf
run: |
sudo apt-get install -y xfonts-base xfonts-75dpi
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb
wget https://github.com/wkhtmltopdf/packaging/releases/download/${{ matrix.wkhtmltopdf }}/wkhtmltox_${{ matrix.wkhtmltopdf }}.jammy_amd64.deb
sudo dpkg -i wkhtmltox_${{ matrix.wkhtmltopdf }}.jammy_amd64.deb
-
name: Output PHP version for Symfony CLI
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
],
"require": {
"php": "^8.1",
"sylius/invoicing-plugin": "^1.0@RC",
"sylius/paypal-plugin": "1.7.x-dev",
"sylius/refund-plugin": "^1.6",
"sylius/sylius": "1.14.0",
"symfony/flex": "^2.4",
"bugsnag/bugsnag-symfony": "^1.7"
Expand Down
3 changes: 3 additions & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true],
Sylius\PayPalPlugin\SyliusPayPalPlugin::class => ['all' => true],
Knp\Bundle\SnappyBundle\KnpSnappyBundle::class => ['all' => true],
Sylius\RefundPlugin\SyliusRefundPlugin::class => ['all' => true],
Sylius\InvoicingPlugin\SyliusInvoicingPlugin::class => ['all' => true],
];
9 changes: 9 additions & 0 deletions config/packages/knp_snappy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
knp_snappy:
pdf:
enabled: true
binary: '%env(WKHTMLTOPDF_PATH)%'
options: []
image:
enabled: true
binary: '%env(WKHTMLTOIMAGE_PATH)%'
options: []
2 changes: 2 additions & 0 deletions config/packages/sylius_invoicing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imports:
- { resource: "@SyliusInvoicingPlugin/config/config.yaml" }
2 changes: 2 additions & 0 deletions config/packages/sylius_refund.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imports:
- { resource: "@SyliusRefundPlugin/Resources/config/app/config.yml" }
4 changes: 4 additions & 0 deletions config/routes/sylius_admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ sylius_admin:
sylius_paypal_admin:
resource: "@SyliusPayPalPlugin/Resources/config/admin_routing.yml"
prefix: /admin

sylius_invoicing_admin:
resource: "@SyliusInvoicingPlugin/config/admin_routes.yaml"
prefix: /admin
2 changes: 2 additions & 0 deletions config/routes/sylius_refund.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sylius_refund:
resource: "@SyliusRefundPlugin/Resources/config/routing.yml"
3 changes: 3 additions & 0 deletions config/routes/sylius_shop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ sylius_paypal:
prefix: /{_locale}
requirements:
_locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$

sylius_invoicing:
resource: "@SyliusInvoicingPlugin/config/shop_routes.yaml"
1 change: 1 addition & 0 deletions config/services_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ imports:
- { resource: "../tests/Behat/Resources/config/services.xml" }
- { resource: "../vendor/sylius/calendar/tests/Behat/Resources/services.yaml" }
- { resource: "../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" }
- { resource: "../vendor/sylius/invoicing-plugin/tests/Behat/Resources/services.xml" }

# workaround needed for strange "test.client.history" problem
# see https://github.com/FriendsOfBehat/SymfonyExtension/issues/88
Expand Down
35 changes: 27 additions & 8 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,18 @@
"knplabs/knp-menu-bundle": {
"version": "v2.2.1"
},
"knplabs/knp-snappy-bundle": {
"version": "1.10",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "main",
"version": "1.5",
"ref": "c81bdcf4a9d4e7b1959071457f9608631865d381"
},
"files": [
"config/packages/knp_snappy.yaml"
]
},
"lakion/mink-debug-extension": {
"version": "v1.2.3"
},
Expand Down Expand Up @@ -293,9 +305,6 @@
"myclabs/deep-copy": {
"version": "1.8.1"
},
"myclabs/php-enum": {
"version": "1.7.4"
},
"namshi/jose": {
"version": "7.2.3"
},
Expand Down Expand Up @@ -326,9 +335,6 @@
"pagerfanta/pagerfanta": {
"version": "v2.0.1"
},
"paragonie/random_compat": {
"version": "v2.0.17"
},
"payum/iso4217": {
"version": "1.0.1"
},
Expand Down Expand Up @@ -554,17 +560,30 @@
"sylius/grid-bundle": {
"version": "v1.4.4"
},
"sylius/invoicing-plugin": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "main",
"version": "1.0",
"ref": "d5c2fd325a1c407a6647a2cfe4be4589a3c791c4"
},
"files": [
"config/packages/sylius_invoicing.yaml",
"config/routes/sylius_invoicing.yaml"
]
},
"sylius/mailer-bundle": {
"version": "v1.7.1"
},
"sylius/paypal-plugin": {
"version": "v1.0.0-rc.1"
},
"sylius/refund-plugin": {
"version": "0.4",
"version": "1.6",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"branch": "main",
"version": "0.4",
"ref": "a3f813f608c6f04bd7d0b4cefd73a96bf378c390"
},
Expand Down
1 change: 1 addition & 0 deletions tests/Behat/Resources/config/suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ default:
- sylius.behat.context.hook.doctrine_orm
- sylius.behat.context.hook.mailer
- Sylius\Calendar\Tests\Behat\Context\Hook\CalendarContext
- Tests\Sylius\InvoicingPlugin\Behat\Context\Hook\InvoicesContext

- sylius.behat.context.setup.admin_security
- sylius.behat.context.setup.admin_user
Expand Down

0 comments on commit ed80808

Please sign in to comment.