Replies: 2 comments 1 reply
-
Hey @bnzo thank you for pointing this out. Admittedly I think I might have been too quick to deprecate the method, it's just I thought it wasn't very widely used and every time I tried to use it, it didn't work. I'd be happy to un-deprecate it. I didn't consider it to be used like this - you can't really do this super easily in XML Wrangler, it's mostly for just reading OR writing, not overwriting something you're reading. |
Beta Was this translation helpful? Give feedback.
-
Hey @bnzo just a quick update on this one - in the latest release of Saloon I have chosen to remove the deprecation warning, but I've added some additional wording to help people choose the methods. It's not the best to have |
Beta Was this translation helpful? Give feedback.
-
Hey 👋
I am not sure to understand why returning a response as a SimpleXMLElement is deprecated.
saloon/src/Http/Response.php
Line 240 in bf41570
I actually do a lot of manipulations using SimpleXMLElement objects on a specific API.
I tried to use the XmlWrangler but I am not sure how to use it for specific cases like root attributes updates and also simply return the full modified xml from the reader.
Example of actual usage (simplified)
For now I just made a custom response class (which is fine to prevent phpstan yelling at me and continue XML manipulations:
Maybe I am missing something on how to properly use the XMLWrangler? Any Advices?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions