Expanding foams are not safe with plastics, see the picture.
The foam makes the plastic brittle on the water fittings causing leaks. Avoid using any foam.
The fitting had to be changed as it was dripping water through into the ceiling.
Even I did not think it was possible for foam to damage a...