Create Three Symfony Back Ends - Part #25 - PATCH data in FOSRESTBundle
526 views
Feb 14, 2023
Much like in our Symfony 4 JSON API PATCH implementation, the PATCH implementation for FOSRESTBundle will be extremely similar to our putAction. FOSRESTBundle once again provides us with a convention to follow. We need to name our controller method as patchAction, and FOSRESTBundle will take care of most of the heavy lifting for us. As a heads up: this isn't a true PATCH implementation. It's one pragmatic approach, but it's neither essential to implement nor potentially a good match for your needs. I've written about this before, so please read that link if at all curious. Anyway, with the 'disclaimer' out of the way, let's first see the test, then cover the implementation.