Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BP-3628 Add support for Magento 2.4.7 + PHP 8.3 #986

Closed
TomMeijnaerts opened this issue Jun 3, 2024 · 4 comments
Closed

BP-3628 Add support for Magento 2.4.7 + PHP 8.3 #986

TomMeijnaerts opened this issue Jun 3, 2024 · 4 comments
Assignees
Labels
Priority: Normal This issue has a normal/medium priority. Status: In progress We are working on this issue.

Comments

@TomMeijnaerts
Copy link

TomMeijnaerts commented Jun 3, 2024

We would like to roll out the update of magento 2.4.7 & php8.3 ... when will this extension have compatibility for those versions ?

@TomMeijnaerts TomMeijnaerts changed the title magento 2.4.7 + php8.3 compatability magento 2.4.7 + php8.3 compatibility Jun 3, 2024
@dlabsnl
Copy link

dlabsnl commented Jun 11, 2024

Im waiting for this also.

@boldhedgehog
Copy link

boldhedgehog commented Jun 14, 2024

Please note, that inline scripts on the checkout will stop working if they are not rendered with the secure renderer.

More about this here: https://developer.adobe.com/commerce/php/development/security/content-security-policies/#whitelist-an-inline-script-or-style

Example: https://github.com/buckaroo-it/Magento2/blob/v1.48.0/view/frontend/templates/checkout/mrcash/pay.phtml#L16

<script>
    require(['buckaroo/mrcash/pay'], function (mrcashPay) {
        var transactionKey = "<?= /* @noEscape */ ($block->getTransactionKey()); ?>";

        mrcashPay.setTransactionKey(transactionKey);
        mrcashPay.showQrCode();
    });
    cancelPayment = function() {
        require(['buckaroo/mrcash/pay'], function (mrcashPay) {
            mrcashPay.cancelPayment();
        });
    }
</script>

This should be either put into a variable or wrapped into ob_start() like this:

<?php
$key = $block->getTransactionKey();
$script = <<<JS
    require(['buckaroo/payconiq/pay'], function (payconiqPay) {
        var transactionKey = "$key";

        payconiqPay.setTransactionKey(transactionKey);
        payconiqPay.showQrCode();
    });
    cancelPayment = function() {
        require(['buckaroo/payconiq/pay'], function (payconiqPay) {
            payconiqPay.cancelPayment();
        });
    }
JS;
?>
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $script, false); ?>

This was recently backported from 2.4.7 to older versions with the latest security patch and is enabled by default. After upgrade to 2.4.5-p8 inline script added in a conventional unsafe way stopped to work.

@Buckaroo-Rene Buckaroo-Rene changed the title magento 2.4.7 + php8.3 compatibility BP-3628 Add support for Magento 2.4.7 + PHP 8.3 Jun 25, 2024
@Buckaroo-Rene Buckaroo-Rene added Status: In progress We are working on this issue. Priority: Normal This issue has a normal/medium priority. labels Jun 25, 2024
@larsmbm
Copy link

larsmbm commented Jul 23, 2024

Could you please provide an update on this ticket? We're experiencing the same problem and would be grateful for any news.

@Buckaroo-Rene Buckaroo-Rene self-assigned this Aug 13, 2024
@Buckaroo-Rene
Copy link
Contributor

Hi everyone,

Sorry for the late reply, but Magento 2.4.7-p1 and PHP 8.3 are supported from version 1.49.0 and 1.49.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Normal This issue has a normal/medium priority. Status: In progress We are working on this issue.
Projects
None yet
Development

No branches or pull requests

5 participants