vienthuong / shopware-php-sdk

A PHP SDK for Shopware 6 Admin API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AdminActionService::execute should support upper case action string

mschop opened this issue · comments

Calling the AdminActionService's action method with $method = 'POST' causes throwing \InvalidArgumentException

(new AdminActionService(...))->execute('POST', ...);

The allow list check should be made case insensitive.

Instead of:

if (!in_array($method, ['get', 'post', 'put', 'patch', 'delete'])) {

This:

if (!in_array(strtolower($method), ['get', 'post', 'put', 'patch', 'delete'])) {

I updated it in the lastest version, feel free to reopen ticket if you have any issue
#44