Fedir Zinchuk
Fedir Zinchuk
@carlitorweb that is correct, you cannot run `skiptoTest2` with `format=raw`, only with `format=json`. As in my instruction. Because `format=raw` cannot handle anything else than scalar or stringable objects, and `skiptoTest2`...
> we think this is a b/c break What kind of b.c break? I do not see any
pThis comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43530.
I have update PR, to be more backward compatible. Please test again.
If you want extend `JsonResponse`, you can see it in the test: ```php new class ('test 1') extends \Joomla\CMS\Response\JsonResponse implements \Joomla\CMS\String\StringableInterface {}; ``` Or make your own: ```php $response =...
> but there is no simplicity in this solution It is transitioning to native PHP `Stringable`, which we cannot use now because some backward compatibility problem can happen in some...
> But it's obvious that the values are the same No. String is a string and Object is object (even when it implement Stringable). `new JsonResponse($string)` will produce: `{"data":"the string...
> which means backward compatibility is quite simple Nope, when existing extension provides result as `JsonResponse`, then it will be wrapped in to another `JsonResponse`. So in result we will...
No, `JsonResponse` already implements `Stringable` **implicitly**. > Unlike most interfaces, Stringable is implicitly present on any class that has the magic __toString() method defined And currently we cannot add our...
@brianteeman I forgot it exists, should be good now. @dgrammatiko updated