manually merged dev into MWEB-794, resolved conflicts and fixed PHP unit tests