most spray foam is flamable unless it is intumicent, so beware of where you use it .
Intumicent through cable penetrations.Smoke barriers holes in walls.
your normal foam is a building aid not protective against heat/smoke penetration.
Intumicent is similar to the door seals Expands with heat to seal.
If you have to run cables through a large gap and might want to do it in the future use
intumicant bags to seal any penetrations, handy for data installations.
Check the can. Happy hole filling.