frankenphp icon indicating copy to clipboard operation
frankenphp copied to clipboard

Support for Magento / Adobe Commerce

Open MagePsycho opened this issue 2 years ago • 4 comments

Do you have any plans to support Magento/Adobe Commerce in the near future?

MagePsycho avatar Dec 21 '23 20:12 MagePsycho

I haven't used Magento in years, so not in a near future, but contributions are welcome! It's also possible to sponsor us to do it :)

dunglas avatar Dec 21 '23 21:12 dunglas

My first attempt of using frankenphp in a default Magento caused an app crash:

image

allanmfx avatar Mar 02 '24 21:03 allanmfx

@allanmfx This seems to be comming from the usage of apache_request_headers() php function in vendor/laminas/laminas-http/src/PhpEnvironment/Request.php :

if (function_exists('apache_request_headers')) {
    $apacheRequestHeaders = apache_request_headers();
    if (! isset($this->serverParams['HTTP_AUTHORIZATION'])) {
        if (isset($apacheRequestHeaders['Authorization'])) {
            $this->serverParams->set('HTTP_AUTHORIZATION', $apacheRequestHeaders['Authorization']);
        } elseif (isset($apacheRequestHeaders['authorization'])) {
            $this->serverParams->set('HTTP_AUTHORIZATION', $apacheRequestHeaders['authorization']);
        }
    }
}

Avoiding the call to this function by commenting this will allow reaching frontend. Didn't go further into debugging for now.

sebastienbird avatar Mar 09 '24 10:03 sebastienbird

@allanmfx you can follow our POC here : https://github.com/opengento/magento2-frankengento We are testing it during a Hackathon, and it shows good performance (50% faster TTFB)

anthony-blackbird avatar Mar 09 '24 11:03 anthony-blackbird