Closed asgraf closed 2 years ago
Closing as the issue isn't directly related to this plugin.
Are the detectors defined by ApiListener needed? They are defined here: https://github.com/FriendsOfCake/crud/blob/ace4262d8c1c6d4b26937cb19f8d3b1b954aeb4b/src/Listener/ApiListener.php#L36-L38
Commenting out the following lines keeps ApiListener from overriding the CakePHP detectors and things work for me again: https://github.com/FriendsOfCake/crud/blob/ace4262d8c1c6d4b26937cb19f8d3b1b954aeb4b/src/Listener/ApiListener.php#L392-L394
While the is(xml)
and is(json)
checks will continue working, without the overrides the custom is(api)
check won't. So the overrides will have to be updated to include the new exclude
key for XML as done in core.
In cakephp 4.4
$this->getRequest()->is('xml')
always returns true, even for regular html requests (tested on latest Firefox). This break ApiListener because$this->getRequest()->is('api')
is now always true and this causes it to throwMethod Not Allowed
exception for all GET requestsProbably bug in cakephp 4.4 it self