Skip to content

Commit

Permalink
OP-550 - Change structures of the directories to current Symfony reco…
Browse files Browse the repository at this point in the history
…mmendations
  • Loading branch information
JanPalen committed Jan 10, 2025
1 parent 66d1b38 commit b9b368c
Show file tree
Hide file tree
Showing 73 changed files with 41 additions and 32 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,22 @@ jobs:
run: vendor/bin/phpunit --colors=always

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

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

-
name: Upload Behat logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: Behat logs
path: etc/build/
if-no-files-found: ignore
overwrite: true

-
name: Failed build Slack notification
Expand Down
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.
9 changes: 9 additions & 0 deletions config/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
imports:
- { resource: resources.yml }
- { resource: services.xml }
- { resource: "@BitBagSyliusProductBundlePlugin/config/twig_hooks/twig_hooks.yaml" }

framework:
messenger:
buses:
bitbag_sylius_product_bundle.command_bus: ~
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions config/resources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
imports:
- { resource: resources/product_bundle.yml }
- { resource: resources/product_bundle_item.yml }
- { resource: resources/product_bundle_order_item.yml }
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions config/routes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
bitbag_sylius_product_bundle_admin:
resource: routes/admin.yml
prefix: '/%sylius_admin.path_name%'

bitbag_sylius_product_bundle_shop:
resource: routes/shop.yml
prefix: /{_locale}
requirements:
_locale: ^[a-z]{2}(?:_[A-Z]{2})?$

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.
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.
3 changes: 3 additions & 0 deletions config/twig_hooks/twig_hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
imports:
- { resource: "@BitBagSyliusProductBundlePlugin/config/twig_hooks/product/**/*.yaml" }
- { resource: "@BitBagSyliusProductBundlePlugin/config/twig_hooks/order/*.yaml" }
File renamed without changes.
File renamed without changes.
Empty file removed etc/build/.gitignore
Empty file.
5 changes: 5 additions & 0 deletions src/BitBagSyliusProductBundlePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ final class BitBagSyliusProductBundlePlugin extends Bundle
{
use SyliusPluginTrait;

public function getPath(): string
{
return \dirname(__DIR__);
}

public function build(ContainerBuilder $container): void
{
$container->addCompilerPass(new AuthenticationManagerPolyfillPass());
Expand Down
9 changes: 0 additions & 9 deletions src/Resources/config/config.yml

This file was deleted.

4 changes: 0 additions & 4 deletions src/Resources/config/resources.yml

This file was deleted.

7 changes: 0 additions & 7 deletions src/Resources/config/routing.yml

This file was deleted.

3 changes: 0 additions & 3 deletions src/Resources/config/twig_hooks/twig_hooks.yaml

This file was deleted.

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

{% if product.isBundle %}
{% set product_bundle_items = form.productBundleItems %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
imports:
- { resource: "@BitBagSyliusProductBundlePlugin/Resources/config/config.yml" }
- { resource: "@BitBagSyliusProductBundlePlugin/config/config.yml" }
2 changes: 1 addition & 1 deletion tests/Application/config/routes.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bitbag_sylius_product_bundle_plugin:
resource: "@BitBagSyliusProductBundlePlugin/Resources/config/routing.yml"
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.
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const getConfig = (pluginName, type) => {
Encore
.setOutputPath(`public/build/bitbag/${pluginName}/${type}/`)
.setPublicPath(`/build/bitbag/${pluginName}/${type}/`)
.addEntry(`bitbag-${pluginName}-${type}`, path.resolve(__dirname, `./src/Resources/assets/${type}/entry.js`))
.addEntry(`bitbag-${pluginName}-${type}`, path.resolve(__dirname, `./assets/${type}/entry.js`))
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
Expand All @@ -23,8 +23,8 @@ const getConfig = (pluginName, type) => {
Encore
.setOutputPath(`src/Resources/public/`)
.setPublicPath(`/public/`)
.addEntry(`bitbag-${pluginName}-shop`, path.resolve(__dirname, `./src/Resources/assets/shop/entry.js`))
.addEntry(`bitbag-${pluginName}-admin`, path.resolve(__dirname, `./src/Resources/assets/admin/entry.js`))
.addEntry(`bitbag-${pluginName}-shop`, path.resolve(__dirname, `./assets/shop/entry.js`))
.addEntry(`bitbag-${pluginName}-admin`, path.resolve(__dirname, `./assets/admin/entry.js`))
.cleanupOutputBeforeBuild()
.disableSingleRuntimeChunk()
.enableSassLoader();
Expand Down

0 comments on commit b9b368c

Please sign in to comment.