Skip to content

Commit c9634fc

Browse files
committed
OP-550 - Change structures of the directories to current Symfony recommendations
1 parent 66d1b38 commit c9634fc

File tree

74 files changed

+43
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+43
-34
lines changed

.github/workflows/build.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575

7676
-
7777
name: Run webserver
78-
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
78+
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon && symfony -V)
7979

8080
-
8181
name: Get Composer cache directory
@@ -160,21 +160,22 @@ jobs:
160160
run: vendor/bin/phpunit --colors=always
161161

162162
-
163-
name: Cache clear
164-
run: (cd tests/Application && rm -rf var/cache)
163+
name: Create behat logs directory
164+
run: (mkdir -p etc/build && chmod a+rw etc/build )
165165

166166
-
167167
name: Run Behat
168168
run: vendor/bin/behat --colors --strict -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun
169169

170170
-
171171
name: Upload Behat logs
172-
uses: actions/upload-artifact@v3
172+
uses: actions/upload-artifact@v4
173173
if: failure()
174174
with:
175175
name: Behat logs
176176
path: etc/build/
177177
if-no-files-found: ignore
178+
overwrite: true
178179

179180
-
180181
name: Failed build Slack notification
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": "MIT",
77
"require": {
88
"php": "~8.2.0 || ~8.3.0",
9-
"sylius/sylius": "~2.0.0",
9+
"sylius/sylius": "^2.0.0",
1010
"dompdf/dompdf": "^2.0",
1111
"sylius/twig-hooks": "^0.5",
1212
"sylius/twig-extra": "^0.5",

config/config.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
imports:
2+
- { resource: resources.yml }
3+
- { resource: services.xml }
4+
- { resource: "@BitBagSyliusProductBundlePlugin/config/twig_hooks/twig_hooks.yaml" }
5+
6+
framework:
7+
messenger:
8+
buses:
9+
bitbag_sylius_product_bundle.command_bus: ~

config/resources.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
imports:
2+
- { resource: resources/product_bundle.yml }
3+
- { resource: resources/product_bundle_item.yml }
4+
- { resource: resources/product_bundle_order_item.yml }

config/routes.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
bitbag_sylius_product_bundle_admin:
2+
resource: routes/admin.yml
3+
prefix: '/%sylius_admin.path_name%'
4+
5+
bitbag_sylius_product_bundle_shop:
6+
resource: routes/shop.yml
7+
prefix: /{_locale}
8+
requirements:
9+
_locale: ^[a-z]{2}(?:_[A-Z]{2})?$
10+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

config/twig_hooks/twig_hooks.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
imports:
2+
- { resource: "@BitBagSyliusProductBundlePlugin/config/twig_hooks/product/**/*.yaml" }
3+
- { resource: "@BitBagSyliusProductBundlePlugin/config/twig_hooks/order/*.yaml" }

etc/build/.gitignore

Whitespace-only changes.

src/BitBagSyliusProductBundlePlugin.php

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ final class BitBagSyliusProductBundlePlugin extends Bundle
2020
{
2121
use SyliusPluginTrait;
2222

23+
public function getPath(): string
24+
{
25+
return \dirname(__DIR__);
26+
}
27+
2328
public function build(ContainerBuilder $container): void
2429
{
2530
$container->addCompilerPass(new AuthenticationManagerPolyfillPass());

src/Resources/config/config.yml

-9
This file was deleted.

src/Resources/config/resources.yml

-4
This file was deleted.

src/Resources/config/routing.yml

-7
This file was deleted.

src/Resources/config/twig_hooks/twig_hooks.yaml

-3
This file was deleted.

src/Resources/views/Shop/Product/show/page/info/summary/add_to_cart/addProductBundleToCart.html.twig templates/Shop/product/show/page/info/summary/add_to_cart/addProductBundleToCart.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% form_theme form '@SyliusShop/Form/theme.html.twig' %}
1+
{% form_theme form '@SyliusShop/form/theme.html.twig' %}
22

33
{% if product.isBundle %}
44
{% set product_bundle_items = form.productBundleItems %}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
imports:
2-
- { resource: "@BitBagSyliusProductBundlePlugin/Resources/config/config.yml" }
2+
- { resource: "@BitBagSyliusProductBundlePlugin/config/config.yml" }

tests/Application/config/routes.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
bitbag_sylius_product_bundle_plugin:
2-
resource: "@BitBagSyliusProductBundlePlugin/Resources/config/routing.yml"
2+
resource: "@BitBagSyliusProductBundlePlugin/config/routes.yml"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

webpack.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const getConfig = (pluginName, type) => {
88
Encore
99
.setOutputPath(`public/build/bitbag/${pluginName}/${type}/`)
1010
.setPublicPath(`/build/bitbag/${pluginName}/${type}/`)
11-
.addEntry(`bitbag-${pluginName}-${type}`, path.resolve(__dirname, `./src/Resources/assets/${type}/entry.js`))
11+
.addEntry(`bitbag-${pluginName}-${type}`, path.resolve(__dirname, `./assets/${type}/entry.js`))
1212
.disableSingleRuntimeChunk()
1313
.cleanupOutputBeforeBuild()
1414
.enableSourceMaps(!Encore.isProduction())
@@ -23,8 +23,8 @@ const getConfig = (pluginName, type) => {
2323
Encore
2424
.setOutputPath(`src/Resources/public/`)
2525
.setPublicPath(`/public/`)
26-
.addEntry(`bitbag-${pluginName}-shop`, path.resolve(__dirname, `./src/Resources/assets/shop/entry.js`))
27-
.addEntry(`bitbag-${pluginName}-admin`, path.resolve(__dirname, `./src/Resources/assets/admin/entry.js`))
26+
.addEntry(`bitbag-${pluginName}-shop`, path.resolve(__dirname, `./assets/shop/entry.js`))
27+
.addEntry(`bitbag-${pluginName}-admin`, path.resolve(__dirname, `./assets/admin/entry.js`))
2828
.cleanupOutputBeforeBuild()
2929
.disableSingleRuntimeChunk()
3030
.enableSassLoader();

0 commit comments

Comments
 (0)