diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index fc0eb7c2..5011ee93 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -28,10 +28,10 @@ jobs: - { php-version: "8.3", dependencies: "highest", experimental: false } steps: - name: "Checkout code" - uses: "actions/checkout@v2" + uses: actions/checkout@v4 - name: "Install PHP" - uses: "shivammathur/setup-php@v2" + uses: shivammathur/setup-php@v2 with: coverage: "none" php-version: "${{ matrix.php-version }}" @@ -47,7 +47,7 @@ jobs: composer require --no-update pimcore/pimcore:"${PIMCORE_VERSION}" fi - name: "Install dependencies with Composer" - uses: "ramsey/composer-install@v2" + uses: ramsey/composer-install@v3 with: dependency-versions: "${{ matrix.dependencies }}" @@ -60,7 +60,7 @@ jobs: - name: "Upload baseline file" if: ${{ failure() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: phpstan-baseline.neon path: phpstan-baseline.neon diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..0a73b601 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,2 @@ +#### v1.2.1 +- Removed the package "rybakit/twig-deferred-extension". If you extend the twig layout from the E-Commerce Framework, please check if custom CSS/JS code added by `pimcore_head_script` and `pimcore_head_link` is still working. diff --git a/composer.json b/composer.json index c445ff51..9965a182 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,6 @@ "pimcore/google-marketing-bundle": "^1.0", "knplabs/knp-paginator-bundle": "^6.0.0", "symfony/webpack-encore-bundle": "^1.13.2", - "rybakit/twig-deferred-extension": "^3.0", "symfony/form": "^6.2" }, "require-dev": { @@ -33,9 +32,6 @@ "elasticsearch/elasticsearch": "^8.0", "pimcore/elasticsearch-client": "^1.0.0" }, - "conflict": { - "twig/twig": "^3.9.0" - }, "suggest": { "elasticsearch/elasticsearch": "Required for Elastic Search service", "webmozarts/console-parallelization": "Required for parallelization of console commands" diff --git a/src/Resources/config/services.yaml b/src/Resources/config/services.yaml index a20cefe7..309e2578 100644 --- a/src/Resources/config/services.yaml +++ b/src/Resources/config/services.yaml @@ -22,8 +22,3 @@ services: resource: '../../Controller' public: true tags: ['controller.service_arguments'] - - # the deferred extension is needed for placeholder helpers to work - # as otherwise the placeholder block would be rendered before any - # content was added (e.g. headTitle) - Twig\DeferredExtension\DeferredExtension: ~ diff --git a/src/Resources/views/admin_order/detail.html.twig b/src/Resources/views/admin_order/detail.html.twig index b10607ac..2ac499dc 100644 --- a/src/Resources/views/admin_order/detail.html.twig +++ b/src/Resources/views/admin_order/detail.html.twig @@ -411,7 +411,7 @@ - {% do pimcore_head_script().captureStart() %} + {% set inlineScript %} document.addEventListener("DOMContentLoaded", function(event) { // pimcore open object document.querySelectorAll('[data-action=open]').forEach(function(el){ @@ -448,5 +448,6 @@ {% endif %} }); - {% do pimcore_head_script().captureEnd() %} + {% endset %} + {% do pimcore_head_script().appendScript(inlineScript ~ "") %} {% endblock %} diff --git a/src/Resources/views/admin_order/list.html.twig b/src/Resources/views/admin_order/list.html.twig index a8c01742..8b099de8 100644 --- a/src/Resources/views/admin_order/list.html.twig +++ b/src/Resources/views/admin_order/list.html.twig @@ -105,7 +105,7 @@ {% include "@PimcoreEcommerceFramework/includes/paging.html.twig" with {'paginationVariables': paginator.getPaginationData() } %} {% endif %} - {% do pimcore_head_script().captureStart() %} + {% set inlineScript %} //datepicker flatpickr(".date", {allowInput: true}); @@ -116,7 +116,9 @@ }); }); - {% do pimcore_head_script().captureEnd() %} + {% endset %} + + {% do pimcore_head_script().appendScript(inlineScript ~ "") %} {% endblock %} diff --git a/src/Resources/views/back-office.html.twig b/src/Resources/views/back-office.html.twig index 13eb3077..a8a46bda 100644 --- a/src/Resources/views/back-office.html.twig +++ b/src/Resources/views/back-office.html.twig @@ -24,7 +24,7 @@ {% do pimcore_head_script().prependFile(asset('/bundles/pimcoreecommerceframework/vendor/bootstrap4/js/bootstrap-native-v4.min.js')) %} {% endapply %} - {% block head_stylesheets deferred %} + {% block head_stylesheets %} {{ pimcore_head_link() }} {% endblock %} @@ -79,7 +79,7 @@ {# output scripts added before #} - {% block scripts deferred %} + {% block scripts %} {{ pimcore_head_script() }} {% endblock %} diff --git a/src/Resources/views/voucher/voucher_layout.html.twig b/src/Resources/views/voucher/voucher_layout.html.twig index 86eed18c..e3144d6b 100644 --- a/src/Resources/views/voucher/voucher_layout.html.twig +++ b/src/Resources/views/voucher/voucher_layout.html.twig @@ -19,13 +19,13 @@ {% do pimcore_head_script().appendFile(asset('/bundles/pimcoreecommerceframework/js/voucherservice/voucherSeriesTabScript.js')) %} {% endapply %} - {% block head_stylesheets deferred %} + {% block head_stylesheets %} {{ pimcore_head_link() }} {% endblock %} {# output scripts added before #} - {% block scripts deferred %} + {% block scripts %} {{ pimcore_head_script() }} {% endblock %} {% set colors = {