This is just a suggestion, I don't know if it will disrupt other use cases for the beforesave hook..
But I needed the MIGX object to be available to it already, so I could change decimal values back to having a . as separator. Otherwise, the save action would throw an SQL error before the value could be altered in an aftersave hook.
closing this, because this would break existing beforesave hook-snippets, which manipulate the $config - reference. Feel free to reopen or create another pull with a solution, which doesn't break this behaviour.
This is just a suggestion, I don't know if it will disrupt other use cases for the beforesave hook..
But I needed the MIGX object to be available to it already, so I could change decimal values back to having a . as separator. Otherwise, the save action would throw an SQL error before the value could be altered in an aftersave hook.