diff --git a/.github/workflows/analysis.yaml b/.github/workflows/analysis.yaml index 4ca1616..6d4a938 100644 --- a/.github/workflows/analysis.yaml +++ b/.github/workflows/analysis.yaml @@ -19,7 +19,7 @@ jobs: - 8.2 - 8.3 symfony: - - '6.4.*' + - '7.1.*' env: APP_ENV: test steps: diff --git a/.github/workflows/sylius.yaml b/.github/workflows/sylius.yaml index 33dc57f..476b6a1 100644 --- a/.github/workflows/sylius.yaml +++ b/.github/workflows/sylius.yaml @@ -19,13 +19,11 @@ jobs: - 8.2 - 8.3 sylius: - - 1.12.0 - - 1.13.0 - - 1.14.0 + - 2.0.0 symfony: - - 6.4 + - 7.1 node: - - 14.x + - 20.x env: APP_ENV: test package-name: synolia/sylius-maintenance-plugin diff --git a/Makefile b/Makefile index 52e22ea..69339c6 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,9 @@ CONSOLE=cd ${TEST_DIRECTORY} && php bin/console -e test COMPOSER=cd ${TEST_DIRECTORY} && composer YARN=cd ${TEST_DIRECTORY} && yarn -SYLIUS_VERSION=1.14.0 -SYMFONY_VERSION=6.4 -PHP_VERSION=8.2 +SYLIUS_VERSION=2.0 +SYMFONY_VERSION=7.1 +PHP_VERSION=8.3 PLUGIN_NAME=synolia/sylius-maintenance-plugin ### diff --git a/README.md b/README.md index 2c7a7e8..5a91833 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ | | Version | |:-------|:--------| | PHP | ^8.2 | -| Sylius | ^1.12 | +| Sylius | ~2.0 | ## Installation diff --git a/composer.json b/composer.json index 14aadc5..e8eab61 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "require": { "php": "^8.2", "jaybizzle/crawler-detect": "^1.2", - "sylius/sylius": "^1.12", + "sylius/sylius": "~2.0.0", "webmozart/assert": "^1.11" }, "require-dev": { diff --git a/config/twig_hooks/admin/maintenance/update.yaml b/config/twig_hooks/admin/maintenance/update.yaml new file mode 100644 index 0000000..d2d46fc --- /dev/null +++ b/config/twig_hooks/admin/maintenance/update.yaml @@ -0,0 +1,52 @@ +sylius_twig_hooks: + hooks: + 'synolia.sylius_admin.maintenance': + sidebar: + template: '@SyliusAdmin/shared/crud/common/sidebar.html.twig' + priority: 200 + navbar: + template: '@SyliusAdmin/shared/crud/common/navbar.html.twig' + priority: 100 + content: + template: '@SyliusAdmin/shared/crud/common/content.html.twig' + priority: 0 + + 'synolia.sylius_admin.maintenance.content': + flashes: + template: '@SyliusAdmin/shared/crud/common/content/flashes.html.twig' + priority: 400 + header: + template: '@SyliusAdmin/shared/crud/common/content/header.html.twig' + priority: 300 + form: + template: '@SynoliaSyliusMaintenancePlugin/admin/maintenance/content/form.html.twig' + priority: 200 + footer: + template: '@SyliusAdmin/shared/crud/common/content/footer.html.twig' + priority: 100 + + 'synolia.sylius_admin.maintenance.content.header': + breadcrumbs: + template: '@SynoliaSyliusMaintenancePlugin/admin/maintenance/content/header/breadcrumbs.html.twig' + priority: 100 + title_block: + template: '@SyliusAdmin/shared/crud/common/content/header/title_block.html.twig' + priority: 0 + + 'synolia.sylius_admin.maintenance.content.header.title_block': + title: + template: '@SyliusAdmin/shared/crud/common/content/header/title_block/title.html.twig' + configuration: + title: 'maintenance.ui.title' + priority: 100 + actions: + template: '@SyliusAdmin/shared/crud/update/content/header/title_block/actions.html.twig' + priority: 0 + + 'synolia.sylius_admin.maintenance.content.header.title_block.actions': + cancel: + template: '@SynoliaSyliusMaintenancePlugin/admin/maintenance/content/header/title_block/actions/cancel.html.twig' + priority: 100 + update: + template: '@SyliusAdmin/shared/crud/common/content/header/title_block/actions/update.html.twig' + priority: 0 \ No newline at end of file diff --git a/images/maintenance.png b/images/maintenance.png index a9ae8c2..92a11c9 100644 Binary files a/images/maintenance.png and b/images/maintenance.png differ diff --git a/templates/admin/maintenance/content/form.html.twig b/templates/admin/maintenance/content/form.html.twig new file mode 100644 index 0000000..f6bd10f --- /dev/null +++ b/templates/admin/maintenance/content/form.html.twig @@ -0,0 +1,57 @@ +{% from '@SyliusAdmin/shared/helper/button.html.twig' import default as btn %} + +{% if form is not defined %} + {% set form = hookable_metadata.context.form %} +{% endif %} + +{% form_theme form '@SyliusAdmin/shared/form_theme.html.twig' %} + +